Hacker News new | ask | show | jobs
by PaulHoule 1034 days ago
I have so much moe for the various post-Z80 chips Zilog made that people think failed in the marketplace but are still around and perfectly viable for applications that don't need 32-bit

https://en.wikipedia.org/wiki/Zilog_eZ80

But the thing is that you keep getting dragged kicking and screaming to ARM because even if it is boring it is capable, affordable and everywhere.

4 comments

The latest round of STM32G0 is about $1 in quoted price before you start haggling. TI is launching a $0.40 (!) ARM micro soon. A modern toolchain, an ALU that doesn't suck, and a ton of ecosystem support are genuine improvements over z80. It's just the new default in the same way that z80 was a default (though less so, I grant).

And I say this as someone who still knows z80 opcodes from high school programming TI calculators. I love the thing but man is 32-bit nice.

Z80 does seem to be on borrowed time, but the real sea change is going to be displacing 8051
Fact. Its core is embedded in so many things.
I saw a tweet once that went something like, "Mankind strayed from god when we invented the IC", and some days I feel that. Economies of scale crush everything, including our nerdy fondness for particularly elegant ISAs.
Mankind stole fire when they acquired VLSI. We're paying the price, but the upsides are fantastic. Eagles, Liver and all.
You're right there. As transistors got cheaper, we've got into the habit of using them en-mass to prop up horrible architectures with weird (but effective) tricks like enormous look-ahead, stupendous pipelines, and gigantic caches.

I recall with considerable fondness those ISAs that could be understood in ultimate detail by a simple human - the monolithic supercomputers like the Cray 1.

I dunno. There was that strange time in the 1980s where progress in microprocessors hung in the air, where Apple couldn't really find a sequel to the Apple ][, where the TRS-80 Model 4 wasn't much better than the Model 3 which wasn't better than the model 1, where Commodore came out with a new machine every year but only a few of them made any traction.

Coding assembly for the 8088 it was painfully obvious that instructions were competing on the bus with data, which is why the string instructions were so important

http://www.righto.com/2023/04/8086-microcode-string-operatio...

Today people would scoff at that sort of thing because a tight loop can sit in the I cache and be just as efficient as a microcoded string instruction.

I traded my Coco 3 (which unlike the PC had a real multitasking OS) for an 80286 machine and that was a massive jump in performance because the 80286 was starting to get those complex features that would start the "Moore's Law" period where computers got notably better on a year by year basis. The awful truth of memory latency really forces you do those "horrible" things if you want to get near the performance that is possible.

Today I am an AVR8 fan because it has separate buses for instructions and data and gets awesome performance for something very simple that doesn't use all the tricks that later processors use. It's the last 8-bit processor so it stands head and shoulders above the rest in terms of clean design and it's got a mainframe-sized register file. In assembly language you can frequently keep most of the variables you use all the time in registers, dedicate a few registers to the interrupt handler so you don't need to swap registers, etc.

As for the Cray and the IBM 3090's vector units it was nice that those things had vector instructions that weren't bound to a particular implementation length unlike the SIMD instructions that Intel has so often fumbled with that require you to rewrite your code every two year if you want to keep up, aren't available across the line (so people other than national labs and Apple don't use them) and are arguably a waste of power and die area at this point.

I find it intriguing that memory is not just A bottleneck these days, but that memory is SO much slower than CPU. A big part of the performance difference must be the move off the main chip, but it just seems that when cache can be so quick, memory should be faster than it is.
>TI is launching a $0.40 (!) ARM micro soon. [...] It's just the new default in the same way that z80 was a default.

And yet many cheap electronic devices will continue to be built and sold with 4-bit microcontrollers because 32 bit is overkill for those use cases and $0.40 is too expensive when 4-bit dies cost $0.05 or even $0.01, and $0.35 in savings is huge in high enough volume.

You won't see any new products developed in the west using such microcontrollers but they're still alive and kicking and there's still developers for them in Asia.

We're getting closer. There are riscv chips in the <$0.10 range. https://www.hackster.io/news/wch-launches-a-sub-10-risc-v-mi...

At some point you get to a weird place where the logic transistors are so small you get some gate count for free just fitting around the pad drivers and pin protection diodes. We're getting pretty rapidly to the ~10k gate count there where a stripped down classic RISC makes sense.

Out of curiosity what’s the cheapest microcontroller die you’ve come across? It would be interesting to know what you get at the lowest possible price point.
Over on EEVblog there was talk of a 3 cents uC from Padauk: (w/ several follow-ups)

https://www.eevblog.com/2018/11/07/eevblog-1132-the-3-cent-m...

That 3c is packaged & all :-) One-time programmable iirc.

Very interesting. Thanks!
The cheapest mask ROM microcontrollers you can't buy from distributors but only directly from the manufacturer and in large volumes they can be a couple of cents since you buy the dies and package it yourself directly on the PCB under the classic black blob of resin you see in watches/calculators and other cheap dollar store widgets.
Thanks! Do you know what you’d get for that couple of cents?
Something like the EM MICROELECTRONIC EM6680 or the Seiko-Epson S1C63004 but a bit more spartan. Also parts from OKI/Lapis/ROHM semi (they do the dies for Casio watches and calculators) and I think some Chinese vendors who bought out operations form Toshiba/Sharp/NEC for similar old school parts.
100% agree that you can easily pay an engineer's salary with the economy of scale savings from using spartan parts. I was simply marveling at how cheap the fully-packaged, high-schooler-can-use-it, definitely-works-for-your-application default ARM has become :)
$0.40 may well be a (very) expensive part in some contexts. I've seen companies develop ASICs to shave off four legs from a chip. Once the volume is high enough such small bits really add up.
> I have so much moe

I had to look it up, from urbandictionary.com:

also written as moé. A Japanese slang term (ironically, first employed by otaku) used to refer to the fetish for or sexual attraction to idealized people, usually a fictional perfect young girl.

Since then, moé has come to be used as a general term for a hobby, mania or fetish (non-sexual or otherwise). This is contrasted with otaku, which would be taking the specific hobby, mania or fetish to harmful levels.

In this case “an irrational attraction”. Note it is a Japanese word so you hear the o and the e, so unfortunately “I moe for Tamamo” doesn’t rhyme.
In late 80s you'd still have a significant cost difference between 8 (or 16) bit CPUs and more powerful ones like the 68K. 10k or 100k transistors mattered a lot.

These days most smaller cores are integrated with peripherals, which can easily take the bulk of the silicon area (+cost). Then it's effectively free to tack on a small 32 bit core like Cortex-Mx (or even small 64b core). Why bother with 8/16 bit one?

I suspect RISC-V may eat a lot of that market in years ahead.

For components where CPU core is a good portion of the silicon (microcontrollers, RFID tags, toys, etc etc), that may be different. That's why many old 8/16 bit architectures are still around in one form or another.

There's a reason you can still buy Z80s in DIP (and more modern) packages on Mouser, along with the better peripheral chips like the Zilog SCC. All in stock, all for reasonable (e.g. not Rochester "we know you have to have this and no one else does) prices.