Beginner’s Guide to Chip Design: Create a CPU in Two Weeks

Beginner's Guide to Chip Design: Create a CPU in Two Weeks
Source: Semiconductor Industry Observation
Original Author: Editorial Department
According to reports, a software engineer named Adam Majmuda recently shared his experience of designing a CPU from scratch in just two weeks with “no prior experience.”
During this short period, Adam claims he has grasped the basics of chip architecture, absorbed the details of chip manufacturing, and prepared his first complete chip layout using EDA tools. His next step in the “speed-running the chip stack” checklist is to design a GPU from scratch, after which he will tape out this design.
Beginner's Guide to Chip Design: Create a CPU in Two Weeks
This novice chip designer outlined the steps he has taken so far in his exploration. Below, we list the steps he has completed to date:

1.

Learn the basics of chip architecture – a deep understanding is key;

2.

Learn the basics of chip manufacturing – materials, wafer preparation, patterning, and packaging;

3.

Start electronic design automation by building CMOS transistors layer by layer;

4.

Create my first complete circuit using Verilog – “My first experience programming hardware with software.”;

5.

Implement simulation and formal verification for my circuit;

6.

Design my first complete chip layout – using OpenLane (an open-source EDA tool) for design and optimization;

Beginner's Guide to Chip Design: Create a CPU in Two Weeks
As mentioned earlier, Majmuda now faces the important next step of designing a GPU from scratch. He acknowledges that this will be a daunting task. He also admits that, after preliminary investigation, it is more challenging than expected. This novice chip designer explains that there are virtually no online learning resources available for building GPUs. “Because GPU companies try to keep each other’s secrets, most data on GPU architecture is proprietary and closed-source,” the engineer found.
Despite this hurdle, Majmuda states that the confidentiality of large GPU manufacturers makes this part of the project even more interesting for him. Majmuda emphasizes that Anthropic’s Claude Opus AI tool has been very helpful during the GPU design phase.
“I have been asking Claude how each unit must work, and then it somehow guides me to find the right implementation method, which I can confirm through open-source repositories,” the engineer explained. However, he noted, “If I search for something publicly, nothing comes up, which demonstrates the degree of hidden implementation details.”
Having completed about three-fifths of the checklist in just two weeks, the concerns regarding the GPU may lead readers to worry that Majmuda might face obstacles, even insurmountable walls. But that does not seem to be the case, as he optimistically predicts that his GPU design will be completed “in the coming days” and that he will send a streamlined version for tape-out.
Next, let’s take a look at how this beginner is learning chip design.

Initial Plan Formulated

Below is Adam Majmuda’s plan for accelerating the entire learning process of chip design and manufacturing (suggestions are welcome)

1.

Start Preparing

  • Review circuit physics – (semiconductors, p-n junctions, diodes, capacitors)
  • Review computer systems – (transistors, gates, combinational logic, sequential logic, memory, ALU, CPU, and von Neumann architecture, machine language, assembly, C)

2.

Chip Manufacturing – How are chips actually made?

  • Read “Microchip Fabrication” by Peter Van Zant, a popular science book on semiconductor processing and manufacturing
  • Test: Rewatch @szeloof’s chip manufacturing video; everything should make sense and should be able to explain it
  • Understand the development of ASML machines
  • Deep dive into how EUV works

3.

Architecture – What are the main chip designs used in today’s chips?

  • Understand x86 vs ARM vs RISC-V
  • Deep dive into RISC-V (the chip tape-out will use RISC-V CPU)

4.

Electronic Design Automation –

How do you design and verify your own chip to be sent for manufacturing?

  • Learn from a blogger’s course on designing chips from scratch (learning chip design, verification, etc.)
  • Design and test my own RISC-V ASIC using Verilog/OpenLANE/Caravel – I am currently considering making a minimal GPU or converter accelerator, but I am open to any ideas
  • Submit chip designs to TinyTapeout

5.

ASIC – What specific application chips are used in different industries?

How do they work?

  • AI Accelerators – Untether, Tenstorrent, Etched, Groq
  • Telecommunications – Network switches, routers, network cards, etc.
  • Automotive – Engine Control Units (ECUs), Advanced Driver-Assistance Systems (ADAS), etc.
  • Finance – FPGAs for high-frequency trading

6.

Technological Advances – How has technology progressed in the chip industry over the past decades?

  • Advancements leading to Moore’s Law
  • Advancements in NVIDIA GPUs
  • Progress in TSMC manufacturing processes

7.

Industry and Commerce – What are the dominant forces shaping today’s chip industry?

  • Read “Chip War”
  • Understand the CHIPS Act and geopolitics
  • Learn about the business of each stage of the chip industry value chain (IP cores, EDA, fab equipment, fabless chip companies, integrated device manufacturers, foundries, OSAT)

8.

Opportunities – What are the major opportunities in this field?

  • What major opportunities do large companies have?
  • What important opportunity areas are suitable for young entrepreneurs?
  • Where will venture capital bets be placed?
  • Which companies are still good investments?

Step One: Learn the Basics of Chip Architecture

I first learned how chips work from binary to C, which is critical. To design a chip, you need a deep understanding of all the architectural fundamentals, as you will constantly deal with logic, gates, memory, etc.
I looked at the entire stack:
  • Binary – Encoding data using voltage
  • Transistors – Creating digital switches using semiconductors
  • CMOS – Building the first energy-efficient inverter using transistors
  • Gates – Computing higher-level Boolean logic using transistors
  • Combinational Logic – Building Boolean logic circuits using gates
  • Sequential Logic – Persisting data using combinational logic
  • Memory – Creating storage systems for data using sequential logic
  • CPU – Combining memory and combinational logic to create the von Neumann architecture, which is the first step towards Turing completeness (ignoring memory constraints)
  • Machine Language – How instructions in memory map to control signals on the CPU
  • Assembly – How assembly maps directly to the CPU
  • C – How C compiles to assembly language and then to machine language
I have a software background and am well aware of the connections between these layers, which unlocked many intuitions for me.
Beginner's Guide to Chip Design: Create a CPU in Two Weeks

Step Two: Learn the Basics of Chip Manufacturing

Next, I learned how transistors are actually manufactured.
Chip design tools are built around specific manufacturing processes (called process nodes), so I need to understand this to fully grasp the chip design flow.
I focused on learning:
  • Materials – Semiconductor manufacturing requires a lot of materials, including semiconductors, etchants, solvents, etc., each with specific qualities that are worth using.
  • Wafer Preparation – Manufacturing silicon wafers with polycrystalline silicon crystals and “growing” a silicon dioxide layer on them
  • Patterning – Creating the actual transistor patterns on the chip using a 10-step process involving layering (oxidation/deposition/metalization), photolithography, and etching
  • Packaging – Encapsulating the chip in a protective cover to prevent damage, create I/O interfaces, assist with heat dissipation, etc.
  • Contamination – Interestingly, as transistor sizes shrink, the focus on contamination control becomes significantly greater/important
There is a lot of depth to dive into on these topics, and each part of the process has many different methods, each using different materials and machines. I focused more on gaining a broad understanding of the important parts of the process.
The key intuition here is that chips are produced by defining the layouts of different layers. The design of these layers is the output of the chip design (EDA) process.
Beginner's Guide to Chip Design: Create a CPU in Two Weeks

Step Three: Start Electronic Design Automation by Building CMOS Transistors Layer by Layer

CMOS transistors are the fundamental structure that allowed digital computing to take off due to their unique energy efficiency

Manually drawing each layer of the CMOS made the design of the transistors clearer.
In computer architecture, the common explanation of transistors is often overly simplified, while designing the actual transistors layer by layer forced me to study the implementation details more closely.
Comparing the voltage and current diagrams of a single nMOS transistor (right) with the equivalent diagram also made the power efficiency boost of CMOS more apparent.
In the diagram below, each different color specifies a different layer, each made from different materials/ions/etc., created at different steps in the manufacturing process – for example, the red polysilicon layer is the actual GATE of the top nMOS and bottom pMOS transistors, and the light blue metal 1 layer is the actual connections for inputs and outputs.
Beginner's Guide to Chip Design: Create a CPU in Two Weeks

Step Four: Create My First Complete Circuit in Verilog

This part was a cool unlock for me, as it was my first experience programming hardware with software. I created my first circuit using the hardware description language (HDL) Verilog.
I made an RGB mixer circuit that converts signals from three rotating dials into pulses for three LEDs.
You can use HDL to specify individual gates, but most foundries provide standard cell libraries for customers.
Standard cells are simply transistor arrangements for common uses (like AND gates), optimized for efficiency and designed specifically for certain foundry manufacturing processes.
These standard cell libraries contain almost all the logic units needed for most designs, so you don’t have to focus too much on gate level.
I created this circuit using the standard cell library of the Skywater 130nm process node (from a foundry called Skywater).
I know the code is mostly useless, but I wanted to include it for anyone curious. The timing diagram shows three different knobs being turned, with corresponding LEDs being lit.
Beginner's Guide to Chip Design: Create a CPU in Two Weeks

Step Five: Implement Simulation and Formal Verification for the Circuit

Since the cost of errors in hardware is far greater than in software (because once your design is manufactured, you can’t change things), extensive testing and formal verification is a key part of the design process.
Throughout the EDA process, you can use:
  • Static Timing Analysis – Ensuring there are no timing errors caused by signals propagating through the circuit;
  • Bounded Model Checking and k-Induction – Ensuring your design cannot enter certain invalid states
  • You also need to ensure the circuit can enter specific valid states
I implemented all these steps to formally verify whether my RGB mixer circuit and other designs were valid (i.e., whether they occurred in the correct expected state transitions)
Beginner's Guide to Chip Design: Create a CPU in Two Weeks

Step Six: Design My First Complete Chip Layout

This has been the coolest part so far. I used OpenLane (an open-source EDA tool) to execute the entire synthesis, optimization, and layout process for my design and came up with a complete chip design.
Just seeing my Verilog code turn into an actual chip layout and being able to go in and mess with all the layers and click into each gate was a sick unlock.
The OpenLane process handles all of the following:
  • Simulation – Running simulations to verify your design passes all test cases
  • Synthesis – Converting HDL into a netlist that shows the connections between all the gates in the design
  • Optimization – Optimizing the design for area, performance, and power consumption
  • Layout – Arranging all standard cells on the physical chip
  • Wiring – Connecting all components together through proper wiring
  • Verification – Performing formal verification on the final design
  • GDS – Creating the final output file, called a GDS2 file, to specify the exact layers to be sent to the foundry for tape-out
Beginner's Guide to Chip Design: Create a CPU in Two Weeks
In the EDA tools:
  • I can zoom in and view individual cells and transistors
  • I can selectively hide different metal layers to understand how everything is connected
  • I can view energy density, component density, etc., in my design

Step Seven: Reverse Engineer and Design a GPU from Scratch

The initial goal of my project was to build a minimal GPU. I did not realize how difficult this would be. My expectation was that building a GPU would be similar to building a CPU, with plenty of learning resources available online to figure out how to do it.
But I was wrong.
Because vendors try to keep each other’s secrets, most GPU architecture data is proprietary and closed-source.
NVIDIA and AMD have released high-level architecture overviews, but there is no documentation on how their GPUs work at a low level. This made things more interesting for me – I basically have some high-level architecture documents + some attempts at open-source GPU designs, and zero public learning resources about GPU architecture.
From this point onward, I have been trying to reverse-engineer the details of how GPU architecture works based on what I know about GPU architecture + it must be real content (of course at a simpler level).
Claude Opus has been a huge help here – I have been asking Claude about how each unit must work, and then somehow (by inferring from what it knows or training on proprietary data) it guides me toward the correct implementation method, which I can then confirm with open-source repositories. However, if I search for something publicly, nothing shows up, which demonstrates the degree of hidden implementation details.
So as of now, I am still building a minimal GPU design. I will also document how everything works and publish a post about it so that anyone else curious can have a clearer understanding.
This will tape out in the coming days and may send a streamlined version for tape-out at the Skywater 130nm process node.
Beginner's Guide to Chip Design: Create a CPU in Two Weeks

Original Link

https://www.tomshardware.com/pc-components/cpus/engineer-creates-cpu-from-scratch-in-two-weeks-begins-work-on-gpus
END
Reprinted content only represents the author’s views
Does not represent the position of the Institute of Semiconductor, Chinese Academy of Sciences
Editor: Renowned Wei Classmate
Editor in Charge: Six-Dollar Fish
Submission Email: [email protected]
Previous Recommendations
1.Significant progress made by the Semiconductor Institute in the research of bionic covered neuron models and learning methods
2.Significant progress made by the Semiconductor Institute in inverted structure perovskite solar cells
3. Why is copper used as interconnect metal in chips?
4.What exactly is 7nm in chips?
5.Silicon-based integrated optical quantum chip technology
6.How unusual is the quantum anomalous Hall effect? It may bring about the next revolution in information technology!
Beginner's Guide to Chip Design: Create a CPU in Two Weeks

Leave a Comment