Re: 6502 Emulator in Verilog
Posted: Tue Jul 18, 2017 7:25 am
I'm sure you're right - verification comes after code complete, for this. I don't think this kind of task is a terribly good fit for test-driven design.
The sync/async RAM question comes up all the time - the usual approach is to build a core for traditional async RAM, and then find you need to do something like double-clock the on-chip sync RAM. That can cause something like a 2x clock speed penalty (which of course isn't important if your intent is a 2MHz core, but more important if you wanted to hit 100MHz.)
The other approach is the one Arlet took: design the core for sync RAM in the first place, which is possibly a little more of a brain-teaser. Then, to connect it to off-chip SRAM, you just need a shim which registers the core's outputs on the regular clock. This way, you get the fastest core and it's readily adaptable for both situations.
(At least, that's my understanding... I also think it mightn't be too difficult to take the usual kind of core and rejig it to produce unregistered outputs which are just prior to the clock, such that it now works with clocked memory. But this might depend on the way it's coded.)
The sync/async RAM question comes up all the time - the usual approach is to build a core for traditional async RAM, and then find you need to do something like double-clock the on-chip sync RAM. That can cause something like a 2x clock speed penalty (which of course isn't important if your intent is a 2MHz core, but more important if you wanted to hit 100MHz.)
The other approach is the one Arlet took: design the core for sync RAM in the first place, which is possibly a little more of a brain-teaser. Then, to connect it to off-chip SRAM, you just need a shim which registers the core's outputs on the regular clock. This way, you get the fastest core and it's readily adaptable for both situations.
(At least, that's my understanding... I also think it mightn't be too difficult to take the usual kind of core and rejig it to produce unregistered outputs which are just prior to the clock, such that it now works with clocked memory. But this might depend on the way it's coded.)