by kragen | 2025-05-22 16:57:49+00:00
I agree with almost everything you say. One minor quibble: I said the Z80 variants were not below ARM in cost, power consumption, or transistor count, while you seem to be implicitly accepting (and partially rebutting) a claim that they are below ARM in those metrics. That is, I think ARMs cost less, consume less power, and contain fewer transistors.

For example, you say, "A Z80 has less gates, but...", but I don't think that's true in this context, though this is the most dubious of my five claims. The original Z80 had 8500 transistors, which is less than the ARM 2's 27000 (according to https://en.wikipedia.org/wiki/Transistor_count) but couldn't run anywhere close to 48MHz; I think the eZ80 we're talking about is actually bigger than the ARM 2, because, although it supports the Z80 instruction set, its datasheet advertises, "Single-cycle instruction fetch, high-performance, pipelined eZ80® CPU core". And I think there may be more recent ARMs that are smaller than the ARM 2; I think the Cortex-M0 is about 48000 transistors¹, and the simplified Cortex-M0+ version is presumably a bit smaller.

The eZ80 definitely costs more than an ARM. It's not even close; an ARM costs about 5% of the cost of an eZ80. The cheapest eZ80 Digi-Key has in stock is https://www.digikey.com/en/products/detail/zilog/EZ80F93AZ02..., which costs US$5.27 in quantity 10, and LCSC lists https://lcsc.com/product-detail/Microcontrollers-MCU-MPU-SOC... for US$1.8562 in quantity 200+, though it's not in stock. By contrast, Puya's PY32F002, which is in stock, is 8.51¢ in quantity 500: https://lcsc.com/product-detail/Microcontrollers-MCU-MPU-SOC.... I've previously seen Cypress's CY8C4045 for even cheaper, 1.5¢ in quantity 1000 https://lcsc.com/product-detail/Microcontrollers-MCU-MPU-SOC... but they're out of stock at the moment and have been for a long time. That would be less than 1% of the cost of an eZ80.

You say, "The difference in cost and transistor count could be relevant only for someone who uses millions of such chips. As an individual you do not care whether a CPU costs ten cents more or ten cents less," but I don't think I agree about cost. When you have cheaper CPUs you can use more of them.

You say, "a Z80 is likely to have been manufactured in an older CMOS process, which consumes more energy per gate switching," and point out that needing less instructions for the same task on the ARM lowers the power consumption, which is true, but really understates the situation. ARMs utterly blow the eZ80 out of the water when it comes to low power consumption, even for simple instructions like increment, decrement, memory load, and memory store. Zilog's datasheet https://lcsc.com/datasheet/lcsc_datasheet_2411220235_Zilog-E... shows power consumption numbers on the order of 1 milliamp per megahertz; if we assume it's mostly one clock per instruction (as the datasheet claims, unlike the original Z80) at 3.3V that's still 3.3 nanojoules per instruction. That's 3300 picojoules. Low-power conventional-CMOS-logic ARMs like the STM32L0 family typically use on the order of 200 picojoules per instruction, 6% of the eZ80's consumption, while Ambiq's subthreshold-logic Apollo3 ARM (also mostly one clock per instruction) claims numbers in the neighborhood of 20μA/MHz at 3.3V, which works out to about 70 picojoules per instruction, a third of the STM32L0 and only 2% of the power consumption of the eZ80.

I think there are ARMs that use as much power as the eZ80, but they're high-performance chips, compromising on efficiency to go faster, rather than microcontrollers. Even back in the 01990s the StrongARM used only in the neighborhood of 1000 picojoules per instruction.

So, in summary, some ARMs consume 2% of the energy the eZ80 does (when running very simple instructions like increment and decrement), other ARMs cost 5% as much as the eZ80 does while using closer to 10% of the eZ80's energy, and while they are probably comparable in transistor count I think the ARM is probably smaller.

______

¹ This is based on the comment that it's 12000 gates in https://community.arm.com/support-forums/f/architectures-and..., where Joseph Yiu of ARM corrects dr.indira's higher estimate of 72000 to 100k transistors, saying, "Without going into details, some of the low cost Cortex-M0 microcontrollers on the market has less than 50K gates and that included bus system, peripehrals [sic], and possibly DMA support, etc (exclude memory area and analog components). The 12K gate number is based on minimum configuration at 180ULL process."