Ciro Santilli $$ Sponsor Ciro $$ 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
Born: 1965
Died: 2010+-ish
This is the lowest level of abstraction computer, at which the basic gates and power are described.
At this level, you are basically thinking about the 3D layered structure of a chip, and how to make machines that will allow you to create better, usually smaller, gates.
Video 1. imec: The Semiconductor Watering Hole by Asianometry (2022) Source. A key thing they do is have a small prototype fab that brings in-development equipment from different vendors together to make sure the are working well together. Cool.
What a legendary place.
As mentioned at from Video 4. "Applied Materials by Asianometry (2021)", originally the companies fabs would make their own equipment. But eventually things got so complicated that it became worth it for separate companies to focus on equipment, which then then sell to the fabs.
As of 2020 leading makers of the most important fab photolithography equipment.
Video 2. ASML: TSMC's Critical Supplier by Asianometry (2021) Source.
Video 3. How ASML Won Lithography by Asianometry (2021) Source.
First there were dominant Elmer and Geophysics Corporation of America dominating the market.
Then a Japanese government project managed to make Nikon and Canon Inc. catch up, and in 1989, when Ciro Santilli was born, they had 70% of the market. In 1995, ASML had reached 25% market share. Then it managed the folloging faster than the others:
Parent/predecessor of ASML.
Video 4. Applied Materials by Asianometry (2021) Source. They are chemical vapor deposition fanatics basically.
This is the mantra of the semiconductor industry:
  • power and area are the main limiting factors of chips, i.e., your budget:
    • chip area is ultra expensive because there are sporadic errors in the fabrication process, and each error in any part of the chip can potentially break the entire chip. Although there are
      The percentage of working chips is called the yield.
      In some cases however, e.g. if the error only affects single CPU of a multi-core CPU, then they actually deactivate the broken CPU after testing, and sell the worse CPU cheaper with a clear branding of that: this is called binning,5892.html
    • power is a major semiconductor limit as of 2010's and onwards. If everything turns on at once, the chip would burn. Designs have to account for that.
  • performance is the goal.
    Conceptually, this is basically a set of algorithms that you want your hardware to solve, each one with a respective weight of importance.
    Serial performance is fundamentally limited by the longest path that electrons have to travel in a given clock cycle.
    The way to work around it is to create pipelines, splitting up single operations into multiple smaller operations, and storing intermediate results in memories.
They put a lot of expensive equipment together, much of it made by other companies, and they make the entire chip for companies ordering them.
A list of fabs can be seen at: and basically summarizes all the companies that have fabs.
AMD just gave up this risky part of the business amidst the fabless boom. Sound like a wise move. They then fell more and more away from the state of the art, and moved into more niche areas.
Video 5. SMIC, Explained by Asianometry (2021) Source.
One of the companies that has fabs, which buys machines from companies such as ASML and puts them together in so called "silicon fabs" to make the chips
As the quintessential fabless fab, there is on thing TSMC can never ever do: sell their own design! It must forever remain a fab-only company, that will never compete with its customers. This is highlighted e.g. at from Video 27. "How Nvidia Won Graphics Cards by Asianometry (2021)".
Video 6. How Taiwan Created TSMC by Asianometry (2020) Source. Some points:
  • UCM failed because it focused too much on the internal market, and was shielded from external competition, so it didn't become world leading
  • one of TSMC's great advances was the fabless business model approach.
  • they managed to do large technology transfers from the West to kickstart things off
  • one of their main victories was investing early in CMOS, before it became huge, and winning that market
Basically what register transfer level compiles to in order to achieve a real chip implementation.
After this is done, the final step is place and route.
They can be designed by third parties besides the semiconductor fabrication plants. E.g. Arm Ltd. markets its Artisan Standard Cell Libraries as mentioned e.g. at: This came from a 2004 acquisition:, obviously.
The standard cell library is typically composed of a bunch of versions of somewhat simple gates, e.g.:
  • AND with 2 inputs
  • AND with 3 inputs
  • AND with 4 inputs
  • OR with 2 inputs
  • OR with 3 inputs
and so on.
Each of those gates has to be designed by hand as a 3D structure that can be produced in a given fab.
Simulations are then carried out, and the electric properties of those structures are characterized in a standard way as a bunch of tables of numbers that specify things like:
  • how long it takes for electrons to pass through
  • how much heat it produces
Those are then used in power, performance and area estimates.
Open source ones:
A set of software programs that compile high level register transfer level languages such as Verilog into something that a fab can actually produce. One is reminded of a compiler toolchain but on a lower level.
The most important steps of that include:
The output of this step is another Verilog file, but one that exclusively uses interlinked cell library components.
Given a bunch of interlinked standard cell library elements from the logic synthesis step, actually decide where exactly they are going to go on 2D (stacked 2D) integrated circuit surface.
Sample output format of place and route would be GDSII.
Figure 1. 3D rendering of a GDSII file. Source.
The main ones as of 2020 are:
They apparently even produced a real working small RISC-V chip with the flow, not bad.
Very good channel to learn some basics of semiconductor device fabrication!
Focuses mostly on the semiconductor industry. from Video 5. "SMIC, Explained by Asianometry (2021)" from mentions he is of Chinese ascent, ancestors from Ningbo. Earlier in the same video he mentions he worked on some startups. He doesn't appear to speak perfect Mandarin Chinese anymore though based on pronounciation of Chinese names. gives an abbreviated name "Jon Y".
It is quite amazing to read through books such as The Supermen: The Story of Seymour Cray by Charles J. Murray (1997), as it makes you notice that earlier CPUs (all before the 70's) were not made with integrated circuits, but rather smaller pieces glued up on PCBs! E.g. the arithmetic logic unit was actually a discrete component at one point.
The reason for this can also be understood quite clearly by reading books such as Robert Noyce: The Man Behind the Microchip by Leslie Berlin (2006). The first integrated circuits were just too small for this. It was initially unimaginable that a CPU would fit in a single chip! Even just having a very small number of components on a chip was already revolutionary and enough to kick-start the industry. Just imagine how much money any level of integration saved in those early days for production, e.g. as opposed to manually soldering point-to-point constructions. Also the reliability, size an weight gains were amazing. In particular for military and spacial applications originally.
Video 7. A briefing on semiconductors by Fairchild Semiconductor (1967) Source.
Register transfer level is the abstraction level at which computer chips are mostly designed.
The only two truly relevant RTL languages as of 2020 are: Verilog and VHDL. Everything else compiles to those, because that's all that EDA vendors support.
Much like a C compiler abstracts away the CPU assembly to:
  • increase portability across ISAs
  • do optimizations that programmers can't feasibly do without going crazy
Compilers for RTL languages such as Verilog and VHDL abstract away the details of the specific semiconductor technology used for those exact same reasons.
The compilers essentially compile the RTL languages into a standard cell library.
Examples of companies that work at this level include:
In the past, most computer designers would have their own fabs.
But once designs started getting very complicated, it started to make sense to separate concerns between designers and fabs.
What this means is that design companies would primarily write register transfer level, then use electronic design automation tools to get a final manufacturable chip, and then send that to the fab.
It is in this point of time that TSMC came along, and benefied and helped establish this trend.
Examples under verilog, more details at Verilator.
Verilog simulator that transpiles to C++.
One very good thing about this is that it makes it easy to create test cases directly in C++. You just supply inputs and clock the simulation directly in a C++ loop, then read outputs and assert them with assert(). And you can inspect variables by printing them or with GDB. This is infinitely more convenient than doing these IO-type tasks in Verilog itself.
Some simulation examples under verilog.
First install Verilator. On Ubuntu:
sudo apt install verilator
Tested on Verilator 4.038, Ubuntu 22.04.
Run all examples, which have assertions in them:
cd verilator
make run
File structure is for example:
Example list:
The example under verilog/interactive showcases how to create a simple interactive visual Verilog example using Verilator and SDL.
You could e.g. expand such an example to create a simple (or complex) video game for example if you were insane enough. But please don't waste your time doing that, Ciro Santilli begs you.
Usage: install dependencies:
sudo apt install libsdl2-dev verilator
then run as either:
make run RUN=and2
make run RUN=move
Tested on Verilator 4.038, Ubuntu 22.04.
In those examples, the more interesting application specific logic is delegated to Verilog (e.g.: move game character on map), while boring timing and display matters can be handled by SDL and C++.
Examples under vhdl, more details at: GHDL.
Examples under vhdl.
First install GHDL. On Ubuntu:
sudo apt install verilator
Tested on Verilator 1.0.0, Ubuntu 22.04.
Run all examples, which have assertions in them:
cd vhdl
As of 2020's, it is basically a cheap/slow/simple CPU used in embedded system applications.
It is interpreted. It actually implements a Python (-like ?) interpreter that can run on a microcontroller. See e.g.: Compile MicroPython code for Micro Bit locally.
As a result, it is both very convenient, as it does not require a C toolchain to build for, but also very slow and produces larger images.
It basically replaces a bunch of discrete digital components with a single chip. So you don't have to wire things manually.
Particularly fundamental if you would be putting those chips up a thousand cell towers for signal processing, and ever felt the need to reprogram them! Resoldering would be fun, would it? So you just do a over the wire update of everything.
Vs a microcontroller: same reason why you would want to use discrete components: speed. Especially when you want to do a bunch of things in parallel fast.
One limitation is that it only handles digital electronics: There are some analog analogs, but they are much more restricted due to signal loss, which is exactly what digital electronics is very good at mitigating.
Video 8. First FPGA experiences with a Digilent Cora Z7 Xilinx Zynq by Marco Reps (2018) Source. Good video, actually gives some rationale of a use case that a microcontroller wouldn't handle because it is not fast enough.
Video 9. FPGA Dev Board Tutorial by Ben Heck (2016) Source.
Video 10. The History of the FPGA by Asianometry (2022) Source.
Video 11. The Coming AI Chip Boom by Asianometry (2022) Source.
Our definition of fog computing: a system that uses the computational resources of individuals who voluenteer their own devices, in which you give each of the volunteers part of a computational problem that you want to solve.
Folding@home and SETI@home are perfect example of that definition.
Advantages of fog: there is only one, reusing hardware that would be otherwise idle.
  • in cloud, you can put your datacenter on the location with the cheapest possible power. On fog you can't.
  • on fog there is some waste due to network communication.
  • you will likely optimize code less well because you might be targeting a wide array of different types of hardware, so more power (and time) wastage. Furthermore, some of the hardware used will not not be optimal for the task, e.g. CPU instead of GPU.
All of this makes Ciro Santilli doubtful if it wouldn't be more efficient for volunteers simply to donate money rather than inefficient power usage.
Figure 2. Cloud Computing market share in Q2 2022 by Source.
Basically means "company with huge server farms, and which usually rents them out like Amazon AWS or Google Cloud Platform
Figure 3. Global electricity use by data center type: 2010 vs 2018. Source. The growth of hyperscaler cloud vs smaller cloud and private deployments was incredible in that period!
Highly managed, you don't even see the Docker images, only some higher level JSON configuration file.
These setups are really convenient and cheap, and form a decent way to try out a new website with simple requirements.
This feels good.
One problem though is that Heroku is very opinionated, a likely like other PaaSes. So if you are trying something that is slightly off the mos common use case, you might be fucked.
Another problem with Heroku is that it is extremely difficult to debug a build that is broken on Heroku but not locally. We needed a way to be able to drop into a shell in the middle of build in case of failure. Otherwise it is impossible.
git push heroku HEAD:master
View stdout logs:
heroku logs --tail
PostgreSQL database, it seems to be delegated to AWS. How to browse database:
heroku pg:psql
Drop and recreate database:
heroku pg:reset --confirm <app-name>
All tables are destroyed.
Restart app:
heroku restart
Arghh, why so hard... tested 2021:
  • SendGrid: this one is the first one I got working on free tier!
  • Mailgun: the Heroku add-on creates a free plan. This is smaller than the flex plan and does not allow custom domains, and is not available when signing up on directly: And without custom domains you cannot send emails to anyone, only to people in the 5 manually whitelisted list, thus making this worthless. Also, gmail is not able to verify the DNS of the sandbox emails, and they go to spam.
    Mailgun does feel good otherwise if you are willing to pay. Their Heroku integration feels great, exposes everything you need on environment variables straight away.
  • CloudMailin: does not feel as well developed as Mailgun. More focus on receiving. Tried adding TXT and CNAME entires with custom domain to see if it works, took forever to find that page... Domain verification requires a bit of human contact via email.
    They also don't document their Heroku usage well. The envvars generated on Heroku are useless, only to login on their web UI. The send username and password must be obtained on their confusing web ui.
Some good insights on the earlier history of the industry at: The Supermen: The Story of Seymour Cray by Charles J. Murray (1997).
Figure 4. Intel supercomputer market share from 1993 to 2020. Source. This graph is shocking, they just took over the entire market! Some good pre-Intel context at The Supermen: The Story of Seymour Cray by Charles J. Murray (1997), e.g. in those earlier days, custom architectures like Cray's and many others dominated.
One of the most enduring forms of storage! Started in the 1950s, but still used in the 2020s as the cheapest (and slowest access) archival method. Robot arms are needed to load and read them nowadays.
Video 12. Web camera mounted insite an IBM TS4500 tape library by lkaptoor (2020) Source. Footage dated 2018.
In conventional speech of the early 2000's, is basically a synonym for dynamic random-access memory.
DRAM is often shortened to just random-access memory.
The opposite of volatile memory.
You can't just shred individual sSD files because SSD writes only at large granularities, so hardware/drivers have to copy stuff around all the time to compact it. This means that leftover copies are left around everywhere.
What you can do however is to erase the entire thing with vendor support, which most hardware has support for. On hardware encrypted disks, you can even just erase the keys:
TODO does shredding the
Video 13. The Engineering Puzzle of Storing Trillions of Bits in your Smartphone / SSD using Quantum Mechanics by Branch Education (2020) Source. Nice animations show how quantum tunnelling is used to set bits in flash memory.
Served as both input, output and storage system in the eary days!
Video 14. 1964 IBM 029 Keypunch Card Punching Demonstration by CuriousMarc (2014) Source.
Video 15. Using Punch Cards by Bubbles Whiting (2016) Source. Interview at the The Centre for Computing History.
Video 16. Once Upon A Punched Card by IBM (1964) Source. Goes on and on a bit too long. But cool still.
Video 17. The 1890 US Census and the history of punchcard computing by Stand-up Maths (2020) Source. It was basically a counting machine! Shows a reconstruction at the Computer History Museum.
Electronic Ink such as that found on Amazon Kindle is the greatest invention ever made by man.
Once E Ink reaches reasonable refresh rates to replace liquid crystal displays, the world will finally be saved.
It would allow Ciro Santilli to spend his entire life in front of a screen rather in the real world without getting tired eyes, and even if it is sunny outside.
Ciro stopped reading non-code non-news a while back though, so the current refresh rates are useless, what a shame.
OMG, this is amazing:
PDF table of contents feature requests:
Remarkable 2 is really, really good. Relatively fast refresh + touchscreen is amazing.
PDF table of contents could be better:
Display size: 10.3 inches. Perfect size
Way, way before instant messaging, there was... teletype!
Video 18. Using a 1930 Teletype as a Linux Terminal by CuriousMarc (2020) Source.
The main interface between the central processing unit and software.
A human readable way to write instructions for an instruction set architecture.
One of the topics covered in Ciro Santilli's Linux Kernel Module Cheat.
Intel is known to have created customized chips for very large clients.
This is mentioned e.g. at:
Intel is known to do custom-ish cuts of Xeons for big customers.
Those chips are then used only in large scale server deployments of those very large clients. Google is one of them most likely, given their penchant for Google custom hardware.
TODO better sources.
This ISA basically completely dominated the smartphone market of the 2010s and beyond, but it started appearing in other areas as the end of Moore's law made it more economical logical for large companies to start developing their own semiconductor, e.g. Google custom silicon, Amazon custom silicon.
It is exciting to see ARM entering the server, desktop and supercomputer market circa 2020, beyond its dominant mobile position and roots.
Ciro Santilli likes to see the underdogs rise, and bite off dominant ones.
The excitement also applies to RISC-V possibly over ARM mobile market one day conversely however.
Basically, as long as were a huge company seeking to develop a CPU and able to control your own ecosystem independently of Windows' desktop domination (held by the need for backward compatibility with a billion end user programs), ARM would be a possibility on your mind.
The leading no-royalties options as of 2020.
China has been a major RISC-V potential user in the late 2010s, since the country is trying to increase its semiconductor industry independence, especially given economic sanctions imposed by the USA.
E.g. a result of this, the RISC-V Foundation moved its legal headquarters to Switzerland in 2019 to try and overcome some of the sanctions.
Leading RISC-V consultants as of 2020, they are basically trying to become the Red Hat of the semiconductor industry.
This section is about companies that integrate parts and software from various other companies to make up fully working computer systems.
Their websites a bit shitty, clearly a non cohesive amalgamation of several different groups.
E.g. you have to create several separate accounts, and different regions have completely different accounts and websites.
The Europe replacement part website for example is clearly made by a third party called and has Flex written all over it, and the header of the home page has a slightly broken but very obviously broken CSS. And you can't create an account without a VAT number... and they confirmed by email that they don't sell to non-corporate entities without a VAT number. What a bullshit!
This is Ciro Santilli's favorite laptop brand. He's been on it since the early 2010's after he saw his then-girlfriend-later-wife using it.
Ciro doesn't know how to explain it, but ThinkPads just feel... right. The screen, the keyboard, the lid, the touchpad are all exactly what Ciro likes.
The only problem with ThinkPad is that it is owned by Lenovo which is a Chinese company, and that makes Ciro feel bad. But he likes it too much to quit... what to do?
Ciro is also reassured to see that in every enterprise he's been so far as of 2020, ThinkPads are very dominant. And the same when you see internal videos from other big tech enterprises, all those nerds are running... Ubuntu on ThinkPads! And the ISS.
Those nerds like their ThinkPads so much, that Ciro has seen some acquaintances with crazy old ThinkPad machines, missing keyboard buttons or the like. They just like their machines that much.
ThinkPads are are also designed for repairability, and it is easy to buy replacement parts, and there are OEM part replacement video tutorials: No visible planned obsolescence here! With the caveat that the official online part stores can be shit as mentioned at Section "Lenovo".
The only thing Ciro never understood is the trackpoint: Why would you use that with such an amazing touchpad? And vimium.
Enable SSH on boot:
  • sudo touch /boot/ssh
Model B V 1.1.
SoC: BMC2836
Model B V 1.2.
SoC: BCM2837
Serial from cat /proc/cpuinfo: 00000000c77ddb77
Some key specs:
  • SoC:
    • name: RP2040. Custom designed by Raspberry Pi Foundation, likely the first they make themselves rather than using a Broadcom chip. But the design still is closed source, likely wouldn't be easy to open source due to the usage of closed proprietary IP like the ARM
    • dual core ARM Cortex-M0+
    • frequency: 2 kHz to 133 MHz, 125 MHz by default
    • memory: 264KB on-chip SRAM
  • GPIO voltage: 3.3V
Figure 5. Source.
Has Serial wire debug debug. Why would you ever get one without unless you are a clueless newbie like Ciro Santilli?!?!
You can connect form an Ubuntu 22.04 host as:
screen /dev/ttyACM0 115200
When in screen, you can Ctrl + C to kill, and then execution stops and you are left in a Python shell. From there:
  • Ctrl + D: reboots
  • Ctrl + A K: kills the GNU screen window. Execution continues normally
but be aware of: Raspberry Pi Pico W freezes a few seconds after after screen disconnects from UART.
The first/only way Ciro could find was with ampy: That just worked and it worked perfectly!
python3 -m pip install --user adafruit-ampy
ampy --port /dev/ttyACM0 run
TODO: possible with rshell?
Install on Ubuntu 22.04:
python3 -m pip install --user adafruit-ampy
Ctrl + X. Documented by running help repl from the main shell.
Our examples at: rpi-pico-w/upython.
The examples can be run as described at Program Raspberry Pi Pico W with MicroPython.
Ubuntu 22.04 build just worked, nice! Much feels much cleaner than the Micro Bit C setup:
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib

git clone
cd pico-sdk
git checkout 2e6142b15b8a75c1227dd3edbe839193b2bf9041
cd ..

git clone
cd pico-examples
git checkout a7ad17156bf60842ee55c8f86cd39e9cd7427c1d
cd ..

export PICO_SDK_PATH="$(pwd)/pico-sdk"
cd pico-exampes
mkdir build
cd build
# Board selection.
# also says you can give wifi ID and password here for W.
cmake -DPICO_BOARD=pico_w ..
make -j
Then we install the programs just like any other UF2 but plugging it in with BOOTSEL pressed and copying the UF2 over, e.g.:
cp pico_w/blink/picow_blink.uf2 /media/$USER/RPI-RP2/
Note that there is a separate example for the W and non W LED, for non-W it is:
cp blink/blink.uf2 /media/$USER/RPI-RP2/
Also tested the UART over USB example:
cp hello_world/usb/hello_usb.uf2 /media/$USER/RPI-RP2/
You can then see the UART messages with:
screen /dev/ttyACM0 115200
TODO understand the proper debug setup, and a flash setup that doesn't require us to plug out and replug the thing every two seconds. appears to describe it, with SWD to do both debug and flash. To do it, you seem need another board with GPIO, e.g. a Raspberry Pi, the laptop alone is not enough.
For Ciro Santilli, this is not a computer keyboard. It is a fetish.
Season 1 was amazing. The others fell off a bit.
This section is about companies that design semiconductors.
For companies that manufature semiconductors, see also: company with a semiconductor fabrication plant.
Video 19. How AMD went from nearly Bankrupt to Booming by Brandon Yen (2021) Source.
They have been masters of second sourcing things for a long time! One can ony imagine the complexity of the Intel cross licensing deals.
This was the CPU architecure that saved AMD in the 2010's, see also: Video 19. "How AMD went from nearly Bankrupt to Booming by Brandon Yen (2021)"
Video 20. AMD Founder Jerry Sanders Interview (2002) Source. Source: Fun to watch.
Video 21. Arm 30 Years On: Episode One by Arm Ltd. (2022) Source.
Video 22. Arm 30 Years On: Episode Two by Arm Ltd. (2022) Source.
Video 23. Arm 30 Years On: Episode Three by Arm Ltd. (2022) Source. This one is boring US expansion. Other two are worth it.
This situation is the most bizarre thing ever. The dude was fired in 2020, but he refused to be fired, and because he has the company seal, they can't fire him. He is still going to the office as of 2022. It makes one wonder what are the true political causes for this situation. A big warning sign to all companies tring to setup joint ventures in China!
Video 24. ARM Fired ARM China’s CEO But He Won’t Go by Asianometry (2021) Source.
Video 25. Worst We've Tested: Broken Intel Arc GPU Drivers by Gamers Nexus (2022) Source.
"Intel Research Lablets", that's a terrible name.
Open source driver/hardware interface specification??? E.g. on Ubuntu, a large part of the nastiest UI breaking bugs Ciro Santilli encountered over the years have been GPU related. Do you think that is a coincidence??? E.g. ubuntu 21.10 does not wake up from suspend.
Video 26. Linus Torvalds saying "Nvidia Fuck You" (2012) Source.
Video 27. How Nvidia Won Graphics Cards by Asianometry (2021) Source.
Video 28. How Nvidia Won AI by Asianometry (2022) Source.
Ciro Santilli has always had a good impression of these people.
This company is a bit like Sun Microsystems, you can hear a note of awe in the voice of those who knew it at its peak. This was a bit before Ciro Santilli's awakening.
Those people created OpenGL for God's sake! Venerable.
Both of them and Sun kind of died in the same way, unable to move from the workstation to the personal computer fast enough, and just got killed by the scale of competitors who did, notably Nvidia for graphics cards.
Some/all Nintendo 64 games were developed on it, e.g. it is well known that this was the case for Super Mario 64.
Also they were a big UNIX vendor, which is another kudos to the company.
Video 29. Silicon Graphics Promo (1987) Source. Highlights that this was one of the first widely available options for professional engineers/designers to do real-time 3D rendering for their designs. Presumably before it, you had to do use scripting to CPU render and do any changes incrementally by modifying the script.
Video 30. China's Making x86 Processors by Asianometry (2021) Source.