While originally waiting for my board to arrive I found and got a Z80 soft core working (in simulation) I was a little disappointed that tri-state logic seems to cause issues with yosys (I think that might be what was causing the logic “loops” later down the toolchain anyhow). Having recently gotten around to soldering the tiny OLED (its only 96×64 but could be handy for some types of info you wouldn’t want on a main display) I looked through Emard’s excellent examples to check the OLED was working, when I remembered the galaksija project that he ported to the ULX3S… hang on thats verilog…. and its a Z80….
So hack, hack, slash, burn, bolt in, hammer it a bit…. job done! I shoe horned the galaksija Z80 core into my “support” code…
I now have a 25mhz Z80 running the FPGA version of hello world (blink) basically the Z80 is simply incrementing a 24 bit counter, the top 8 bits are put on the LED’s so you can see it running…. this 8 bit count takes about 18 seconds to overflow, so rough calculations seem to put everything in the right ball park…. (remember its multiple clocks for multiple instructions before the counter is incremented….!) oh happy days!
While it may see odd I’m so happy to get a simple Z80 running, I have to explain that I’m old enough to remember when the Z80 was the peak of home micro computing (yes that old!), and I cut my teeth as it were on Z80 assembly (the only assembly I prefer more is the 68000 – you can see where this is going eventually can’t you!)
I haven’t even pushed anything really, the only reason its running at 25mhz is because that’s the speed of the external oscillator on the board, I will probably add a PLL at some point and see how far I can push the clock, just to see how far I can take things with this new board (not for any practical reason!) – I guess it could go quite a bit faster!
I guess this means I have to add video output and a keyboard and so forth… oh happy days!