This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using an external clock - experts only

I'm looking to emulate a 6502 on the ARM but I would like to make it cycle accurate so I need some way to interface to an external clock. I can't rely on an internal clock as there are external components that will rely on the external clock as well and the emulator needs to be able to run in lockstep with everything else. One thing to keep in mind is once everything is in working order I will want to increase my clock to several hundred MHz so the mechanism with which I interface with the external clock has to be extremely fast, preferably a pin on the ARM itself that I can poll and sync with. I don't want to utilize interrupts either since the code is performance sensitive. Any ideas on whether this is possible on the ARMv8 such as the A53/A57? From what I understand, the Raspberry Pi 3 uses a low speed protocol for communication and is interrupt based, and for my purposes those two are big no-no's for what I'm doing so that won't work. I'd appreciate some expert advice as this is starting to stretch the limits of what may be possible. 

Parents
  • I doubt that any SoC has an input which can sample "several hundred MHz" signals. I do not know the limits of AHB or AXI by heart, but what I remember on AHB you have something about 100 or 133MHz.
    I wonder, did you start to emulate the 6502 already? I doubt you can achieve several hundred MHz of simulated clock.
    Even a simple instruction like "nop" needs a dozen of ARM instructions.  So for simplicity, if you need "only" 10 instructions and running the ARM with 1.5GHz, you cannot be better than 150MHz..
    Unless you do a JIT compilation of the 6502 code.
    You might want to go for an FPGA and do the 6502 in HW and only the peripherals in SW.

Reply
  • I doubt that any SoC has an input which can sample "several hundred MHz" signals. I do not know the limits of AHB or AXI by heart, but what I remember on AHB you have something about 100 or 133MHz.
    I wonder, did you start to emulate the 6502 already? I doubt you can achieve several hundred MHz of simulated clock.
    Even a simple instruction like "nop" needs a dozen of ARM instructions.  So for simplicity, if you need "only" 10 instructions and running the ARM with 1.5GHz, you cannot be better than 150MHz..
    Unless you do a JIT compilation of the 6502 code.
    You might want to go for an FPGA and do the 6502 in HW and only the peripherals in SW.

Children