On 4/21/24 20:06, Peter Coghlan via cctalk wrote:
Why is that? Did the Z80 take more cycles to
implement it's more complex
instructions? Is this an early example of RISC vs CISC?
Z80 is blessed with a
4-bit ALU, verified by reverse engineering dieshots (
https://www.righto.com/2013/09/the-z-80-has-4-bit-alu-heres-how-it.html ).
Die real estate forced the design to do without a full 8-bit ALU. When
you have a 4-bit ALU, and you are doing 16-bit math, you will need 4
cycles through the ALU.
Neither 6502 nor Z80 are RISC. 6502 simply runs very efficiently thanks
to the design decisions made; 8 bit ALU, 8 bit registers for everything,
including stack. Math is fast. Biphase clocking allows what could be
considered a precursor of double-data-rate designs. The Visual6502
project shows the 'tick-tock' of it very well.
If you want to see what can be done with sufficient real estate on the
chip and using more modern design methodologies, pick up a copy of Monte
Dalrymple's book "Microprocessor Design using Verilog HDL' (
https://www.elektor.com/products/microprocessor-design-using-verilog-hdl-e-…
)in either ebook or paperback form (I bought both); Monte was
responsible for Z380 among other designs, and they are very efficient.
Today's eZ80 builds on that, and is as efficient as the 6502 and much,
much faster.
There are many softcores out there, so Z80 lives on in both those as
well as the Z180 (several parts are EoL (either last-time-buy or
obsolete) but some parts are still Active) and the eZ80 (most
instructions on eZ80 are single-cycle, and the chip is pipelined; eZ80
has a 24-bit ALU; plus, eZ80 is a very capable microcontroller). The
Z84015, in both 6 and 10MHz variants, still shows as Active at Digikey.
ALL are of course surface mount. Through-hole anything is a dying breed.
The Z80 is dead; long live the Z80.