In particular, at least for Stratix V (compiles for other FPGAs may very well react differently), separating write enables and data for A/X/Y/P writing instructions reduced multiplexer complexity quite a bit, and yielded roughly 30 MHz. The current critical path reported by the timing analyzer seems like the end of the line (i.e. cannot be optimized further).
Yet another (unnamed) 65C02 core
Re: Yet another (unnamed) 65C02 core
BigEd wrote:
Any idea if careful HDL (re)coding could improve fmax?
In particular, at least for Stratix V (compiles for other FPGAs may very well react differently), separating write enables and data for A/X/Y/P writing instructions reduced multiplexer complexity quite a bit, and yielded roughly 30 MHz. The current critical path reported by the timing analyzer seems like the end of the line (i.e. cannot be optimized further).
Re: Yet another (unnamed) 65C02 core
There's always a brick wall eventually! What does the critical path look like - is it more or less expected?
Re: Yet another (unnamed) 65C02 core
BigEd wrote:
There's always a brick wall eventually! What does the critical path look like - is it more or less expected?
Re: Yet another (unnamed) 65C02 core
200 MHz now. But that must truly be the (far) end of the line. 420 MHz benchmark. Take that emulator guys (just kidding, 370 is damn respectable, and the underlying hardware is far more practical).
Re: Yet another (unnamed) 65C02 core
So, the IPC (instructions per clock) is about double the 6502's? That's a good stake in the ground for what can be done.
200MHz is a nice round number too.
200MHz is a nice round number too.
Re: Yet another (unnamed) 65C02 core
BigEd wrote:
So, the IPC (instructions per clock) is about double the 6502's? That's a good stake in the ground for what can be done.
Re: Yet another (unnamed) 65C02 core
Windfall wrote:
200 MHz now. But that must truly be the (far) end of the line. 420 MHz benchmark. Take that emulator guys (just kidding, 370 is damn respectable, and the underlying hardware is far more practical).
Re: Yet another (unnamed) 65C02 core
(I suspect John is referring to PiTubeDirect, which runs on the super-cheap Raspberry Pi, also an approx 1GHz machine, but with the 6502 emulation written in super-tight ARM code, mostly by dp11 here. On a Pi Zero the latest code runs at 290MHz, on a less-cheap 1.5GHz Pi 4 it runs at 370MHz, approx. It's not a clock-for-clock accurate kind of emulator, it's an as-fast-as-you-can kind.)
Re: Yet another (unnamed) 65C02 core
BigEd wrote:
(I suspect John is referring to PiTubeDirect, which runs on the super-cheap Raspberry Pi, also an approx 1GHz machine, but with the 6502 emulation written in super-tight ARM code, mostly by dp11 here.)
Re: Yet another (unnamed) 65C02 core
It is also quite interesting to see, right here, that emulation on dedicated hardware can compete on speed with implementations on flexible hardware (FPGAs). The price you pay for having all the flexibility, in terms of coins and performance, is pretty high. It will be interesting to see if this changes, especially since clock speed on contemporary processors has been flattening out.
Re: Yet another (unnamed) 65C02 core
Another interesting tidbit is that a reduced RAM version of the core, using 2.0 instead of 3.5 Mb (both resulting in 64 KB of usable memory), is slower by only 5% (benchmarked). This involves moving absolute operand reads (+0, +X, +Y) from the first to the second execution cycle, and then multiplexing all absolute and indirect addresses into one (so only one true dual ported RAM block is used for all six addressing modes). Of course, the speed reduction depends ultimately on the frequency with which absolute addressing is used in code, but on average, an extra cycle for all instructions using absolute addressing seems relatively inconsequential for speed.
Re: Yet another (unnamed) 65C02 core
Is that almost saying that you've managed to halve the size and lose only 5% performance? Not a bad tradeoff, I'd say!
Re: Yet another (unnamed) 65C02 core
This core is now part of my 'soft' Acorn 6502 Second Processor for hardware development boards. If you have an Acorn BBC, and one of the supported development boards, you may want to have a look here :
http://www.zeridajh.org/hardware/soft65 ... /index.htm
http://www.zeridajh.org/hardware/soft65 ... /index.htm
Re: Yet another (unnamed) 65C02 core
I've now put the source for this 65C02 core on my website. See https://www.zeridajh.org/articles/me_various_sources/ under 'Verilog HDL'.
Re: Yet another (unnamed) 65C02 core
Thanks for sharing your sources!