4 ms·
It took me about 20 minutes to make a basic FPGA-friendly implementation of the CPU core in Verilog, but the 256KB of ram is pretty expensive (16-bit color seem
by mechagodzilla 2y ago
It took me about 20 minutes to make a basic FPGA-friendly implementation of the CPU core in Verilog, but the 256KB of ram is pretty expensive (16-bit color seems excessive for such a simple core!).
- boutell 2y agoI wondered how long it would take for someone to do this. An amount of time approaching zero apparently. Nice.
- mechagodzilla 2y agoImplementing a CPU, if you're not trying to hyper-optimize it, is reasonably straightforward. This is a very simple design. It would take a little bit more work to add proper video output and mouse input, but those blocks are easy to find for VGA and PS/2 mice. I think this would run > 100 MHz very easily on anything made in the last decade.
- mechagodzilla 2y agoUgh, I just noticed it's even worse - the display is double-buffered, so you actually need 384KB of ram (128KB for system RAM and 2 x 128KB display buffers!).
- sfn42 2y agoOut of curiosity - why do you care? Do you want to run this thing on a calculator from the 90s or something like that?
- mechagodzilla 2y agoBlock RAM in FPGAs is very limited and adding something like a DDR3 controller is a hassle - of the dev boards I have lying around, they have between 48KB and 200KB of block RAM. The actual CPU logic is probably <5% of those chips. I have a board with a 16-bit, 16MB PSRAM interface, but then the memory interface is shared between the video generation and the CPU. Going with 4-bit colors or something seems like it would be more in-line with the design philosophy (but it was targeted to be emulated on a modern PC, where memory and color depth are largely free).
- sfn42 2y agoAfter looking up the term "FPGA" I realize that my question was a bit silly. Makes sense, thanks for elaborating
- imglorp 2y agoHave FPGAs been evolving very slowly? Modern CPUs have some 20 billion transistors and these limitations don't seem to have grown at the same rate since the '90s the last time I looked at them.
- rdc12 2y agoFPGA's also have billions of transistors now, but adding more block memory means removing transistors from something else, such as LUT's, registers, DSP blocks etc. As always it is a tradeoff, and given many designs don't need much block memory, or need so much memory that external memory is a better choice anyway.
- naitgacem 2y agoHi. Care to share the source code perhaps?