182 points · by greghn · 3y ago · 196 comments
I've been reading datasheets a lot at work. The datasheet for an STM32F4 is 149 pages long. The technical manual is over 800 pages long. That puts it into perspective a little bit better for me. I might spend days or weeks writing a driver for some little few pages of that datasheet. It's a dense 800 pages. Those manuals indicate just a fraction of the complexity that lies inside of the device -- they describe features that I can use, not even how those features are implemented or made. And that's for a tiny chip that costs a couple dollars.
A billion is a tough number to understand, but I recommend reading a datasheet of a chip sometime. It will put into perspective how much complexity there is in just a few millions of transistors.
I sometimes have to take a moment, because I remember descriptions of alien technology from sci-fi books. Complexity, opaqueness, power. Chips.
And even then:
1) There's parts of the manual which are brief summaries, written with the assumption you're already familiar with the larger standards they interface with. The SDIO and USBOTG sections of the reference manual come to mind in particular, not to mention all the external manuals it takes to describe the ARM Cortex-M architecture.
2) That's a fairly simple microcontroller. (Given the page count, it sounds like you're working with STM32F401.) The STM32H7 series reference manual is 3500+ pages.
I do miss working directly with small, simple (relatively), cheap chips. I don't miss dealing directly with the low level bus protocols though. I still have stress nightmares about diagnosing can bus and i2c bus problems with an oscilloscope. Like in the stress dream I'll either forget some important details about the protocol and not understand what is going on at all, or I will remember everything in perfect detail but be unable to speak and explain what's wrong to the other person who's there working on the issue.
Intel® 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes: 1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4
has over 5000 pages![0] https://www.intel.com/content/www/us/en/developer/articles/t...
It's because they were originally 3 volumes. volume 2 is the ASM reference, 3 is the "how to do things" reference (System programming guide). Volume 1 is more of a general reference so maybe that's why it didn't grow so much.
The GameBoy CPU is simple and easy to understand, sure, but modern ones are built upon the same basic principles, it's just that they run at much higher clock speeds and add lots and lots of parts (caches, pipelining, speculative execution, register renaming, multiple ALUs, SIMD ...) to execute as many instructions per clock cycle as possible. Also virtual memory support — MMU, TLB, all that stuff.
For the other side, if you want to build a CPU out of logic gates, there was a web-based game where you did exactly that. I don't remember the URL, sorry.
That’s not true for any post 1995 desktop CPU.
They just adhere to that model and pretend that that’s all they’re doing but in reality there’s layers of supercomputers inside the CPU: micro-op cache, branch predictor, reorder buffer, rename buffer.
They extract hidden parallelism out of the code, run it in blazing fast multiple instructions per clock cycle (!), and pretend that nothing out of the order happened.
CPUs are extremely complex and extremely smart. They can have errors in their implementation where the unseen branches that it executed can be accessed by some processes, etc. But there’s nothing dumb about CPUs. They are made of a million man-hours of engineering.
This is the one I played some time ago: https://nandgame.com/
Also I don't really have an idea, but I wouldn't be surprised, if a very significant part of transistor budget has been spent on SRAM or something similar, which is not very fascinating.
I love using the money analogy for this:
"If you earned $1 every single second, that's $60 per minute, $3,600 per hour, $86,400 per day. More than most people make in a year!
Assuming no tax or expenditure whatsoever, it would take only 11 days to become a millionaire at that salary.
It would take over 31 _years_ to become a billionaire.
And that's only a mere $1 billion, some people are worth _hundreds_ of billions."
There's no way in hell people can make sense of 19 billion separate concepts. Likely what's going on in the chip is just repeated patterns designed to make a very simple machine operate really really quickly.
But of course I'm not denying the complexity. But the 19 billion implication here is a bit too much. It's likely just as complex as say linux.
You are right about human designed chips. If you use something like simulated evolution or backpropagation or some other techniques from machine learning or mathematical optimization, you can get machines with billions of parts but not necessarily any clear pattern nor repetition.
The human brain might be an example of such a mechanism.
We've done it artificially as well with machine learning and genetic algorithms.
The amount of concepts in the neural network of an LLM is too large for us to fully understand.
At best we can only hope to understand these things as a sort of curve fitting optimization problem.
Sufficiently advanced technology is indistinguishable from magic.
you should do some coding closer to the chip
some bitshifting, some bit level manipulation
you dont have to be good at assembly, just do a hello world and make a mental visualization of the registers being hit
look up the OPCODES in your specific chipset , make some code to hit that specifically
make a process that does it as fast as possible and benchmark it, do it faster or slower on a different chipset, or a resource constrained environment
it makes it all really easy to follow and visualize
I dont think you need to write a driver for that map
i tried to read an Espressif ESP32 manual, blew my fucking mind on how complex it is relative to how cheap it is.
The Apollo guidance computers had "several tens of thousands of transistors"[0], we now have 19 billion in our pocket!
0: https://www.aei.org/technology-and-innovation/apollo-11-mank....
The thing about the series though was that NASA was self funded and didn’t have to justify spending billions in taxpayer money.
Also, do we really have better propulsion technology to make space travel more efficient?
Unmanned probes do good work for science. (Though even there I am not sure about the bang-for-the-buck compared to other alternatives.)
Have a look at '20 Breakthroughs from 20 Years of Science aboard the International Space Station' https://www.nasa.gov/missions/station/20-breakthroughs-from-...
That's the list of the 20 best things they could come up with. And it scarcely has anything that couldn't have been done cheaper with unmanned craft. And it includes gems like counting spending money as a benefit, instead of a cost.
Go to the moon - check
Been there, done that, to expensive and the cocktails where shit.
What it seems like we're seeing is the compounding of science. Much like how compound interest works. I often wish I was born today just so I could see the progress in the next 50-100 years.
Single lifetime from flying a powered wooden glider to flying a rocket to the moon and back
sort of like - a few guys fly across a field to me and my entire high school class can buy tickets and fly across the pacific.
https://www.wired.com/story/i-saw-the-face-of-god-in-a-tsmc-...
I'm short Immortality is achieved by stopping aging.
https://news.gallup.com/poll/505745/depression-rates-reach-n...
I don’t post that to be negative, because I agree with what you are saying about a unique time to be alive and have done the same Atari to Xbox Series X glow-up and I marvel at the improvements there. But I do think happiness (and decreased mortality, increased lifespan) should be the ultimate end goal we are striving for for humanity and we seem to be failing, at least in the USA. The reasons are certainly multifaceted, but increased transistor density may be one of the reasons just like obesity, environmental toxins, etc.
One possible way of getting at this is to ask if people were more ‘happy’ when there wasn’t this level of tech available - and I’m not sure the answer is yes - I mean, there’s the mythos of ‘a simple life’ and ‘noble savages’, but from what I’ve read of life even a 100 years back - I would surmise folks were as unhappy / miserable then too - but likely for different reasons.
I think expecting just tech to make us happy is framing the wrong problem space.
so technological progress in itself, regardless of its use, is a consideration
I think this is valid for most people. But as I've tried to integrate more gratitude into my life, I've noticed that it is possible to feel happiness from these things. I find it all too easy to disregard many of the things I have because they've always been there and available. But as soon as I don't have some of my comforts (being outside in the cold, camping and batteries are dying, my car needs an unexpected repair, a pain in my arm that I can't treat myself, etc.), it becomes easier to realize just now nice things really are.
A washing machine is a fantastic piece of machinery you could even build on a small scale that saves hard labor
A patent by Sony that forces the TV viewer to stand up and lift their hands and say "McDonalds!" to continue watching TV, is not
That's why it's important to understand context, both local and historical, to understand our place in the world and how we should feel about it.
There are happy monks and unhappy billionaires.
Humanity must push forward on all fronts.
I think you could apply a similar theory to the modern capitalist world.
Having to choose between one or the other would suck. I wonder if we can have both?
I would like to see some data comparing modern, fit worker against average hunter gatherer.
I've heard the cache is the biggest part. Per https://en.wikipedia.org/wiki/Apple_A17, the A17 has 72MB of cache. Cache is typically SRAM. Per https://en.wikipedia.org/wiki/Static_random-access_memory, a single bit of SRAM typically uses 6 transistors, but it could be anywhere from 4 to 10. So that's between 2.3B and 5.7B transistors for the cache.
That leaves about 1B transistors for each of the 12 cores (6 CPU + 6 GPU). The instruction set is a few hundred instructions. Surely it doesn't take millions of transistors to implement each instruction. Other than the cache, which parts of the processor need millions of transistors?
Seems to me that all that extra processing power is still looking for a use case.
LLMs on your phone are a few hardware generations out, but they are coming.
It is a useful feature. In particular in Google translate (lens function) which I am pretty was also there on the X (perhaps requiring a trip to Google’s server).
I like to keep around test devices that somewhat represent the average user’s device, and when it’s practical a low end device and test against those every so often just to make sure the app performs reasonably well.
This has been in my experience more important for Android apps than for iOS apps, though, because the gulf in power between currently-sold devices in the Android world is vastly more large than in the iOS world. With few exceptions, I find that reasonably efficient apps tested and developed chiefly on newer iPhones work fine on older iPhones, but developing and testing an Android app only on flagships will make for a miserable experience for users of low end or older Android devices.
https://books.google.com/ngrams/graph?content=submicron+lith...
You're misremembering. Matrox cards were also terribly slow in DOS and anything adjacent to 3D. I own several models with SGRAM. Even GeForce 2 GTS: 25m transistors. G200: 10m. Voodoo2: 4m.
Nope, it was the Parhelia released in 2002 - so somewhat later than the hardware you're considering. The Parhelia was what I was thinking of, with a truly insane number of transistors: 80 million! ("something like" was bearing quite a lot of weight in my first comment :D ). However it was only in the same ballpark, not actually faster that the Geforce 4 Ti or the Radeon 8500, and it was more expensive, so failed in the market.
The relevant anandtech review: https://www.anandtech.com/show/936 (post 936, vs this week's Qualcomm which is post 21112 :D )
https://m.youtube.com/watch?v=lXUWmHgLiyU
At the end of the talk, he mentions the staggering complexity of the design and manufacturing of chips with billions of transistors. We have long reached a point where nobody fully understands how the chips work. IIRC, only two companies can do the manufacturing.
That modern chips work at all almost seems like a miracle. Do we really need chips this complex?
Now here that is on one chip. That change blows my mind.
A gigantic chunk of those transistors are just SRAM memory cells for various caches. The number of transistors used to actually implement the logic of the SoC is significantly smaller. I would be surprised if it was more than 5%.
The growth of this number between generations is also likely not very large. Most of the growth is also probably cache sizes.
It seems sort of like asking a programmer how many instructions there are in a binary we maintain. We could find out if we decided it mattered.