3 ms·
In an unrelated Z80 testing situation, my son in college was asked to verify a gate-array implementation of a Z80 for a NASA project. He wrote an opcode-by-opco
by JoeAltmaier 4y ago
In an unrelated Z80 testing situation, my son in college was asked to verify a gate-array implementation of a Z80 for a NASA project. He wrote an opcode-by-opcode comparison of a real Z80 and the DUT and stored internal state on both before and after. The DUT failed to set flags consistently on some opcodes! It was some gate-array implementation for custom hardware (a radar unit with a built-in FFT processor). He did some other projects, but still tells the story of getting a part stepped for NASA.
Anyway years later I'm gratified to see a short animation posted here on HN, of the Juno space probe flying by Jupiter. Some of his code (unrelated to testing) was flying on that!
- flohofwoe 4y agoIf you get in a similar situation again, thanks to the visual6502 project there's now a transistor-level simulation of the Z80 (has been for several years actually, the URL was just never as popular as the 6502 simulation): http://www.visual6502.org/JSSim/expert-z80.html http://www.visual6502.org/JSSim/expert-z80.html ...or my own "remix" (using the same netlist and simulation code): https://floooh.github.io/visualz80remix/ https://floooh.github.io/visualz80remix/ One thing to be aware of is that the various Z80 clones had slightly different undocumented behaviour though, so some differences where the undocumented behaviour leaks into the outside world are to be expected (like the "X" and "Y" flag bits at bit positions 3 and 5).
- JoeAltmaier 4y agoIn his case, he had to test the DUT he was given, and not a simulator. If he'd used a simulator for the reference design, he'd have to have verified that against an actual Z80 first. Which would be the same effort he went through to test his DUT anyway!