A beginner in chip design with zero basics, designing a CPU in two weeks
????If you want to see each other often, please mark it as a star???? and add it to your collection~
According to Tomshardware, a software engineer named Adam Majmuda recently shared his experience of designing a CPU from scratch in just two weeks on the X platform without “any experience.”
In this short time, Adam claimed that he had understood the basics of chip architecture, absorbed the details of chip fabrication, and prepared his first complete chip layout using EDA tools. The next step on his "speed-running the chip stack" to-do list is to design a GPU from scratch, which he will then tape out.
The budding chip designer, who describes himself as one of the founding engineers of a web3 development company, outlines the steps he has taken so far in his exploration. Below, we've listed the steps he's completed so far:
1.
Learn the basics of chip architecture - a deep understanding is the key foundation;
2.
Learn the basics of chip manufacturing—materials, wafer preparation, patterning, and packaging;
3.
Begin electronic design automation by fabricating CMOS transistors layer by layer;
4.
Creating my first complete circuit in Verilog - "My first experience using software to program hardware.";
5.
Implement simulation and formal verification of my circuit;
6.
Designed my first complete chip layout - designed and optimized using OpenLane, an open source EDA tool;
As mentioned earlier, the important step for Majmudar now is to design the GPU from scratch. He knew it would be a difficult task. He also admitted that after preliminary investigation, this was more difficult than expected. The budding chip designer explained that there were no online learning resources for building GPUs. "Because GPU companies try to keep each other's secrets, most GPU architecture data is proprietary and closed source," the engineer found.
Despite this obstacle, Majmudar said the secrecy surrounding the big GPU manufacturers made this part of the project more interesting for him. Majmudar emphasized that Anthropic's Claude Opus AI tool is very useful during the GPU design phase.
“I keep giving Claude an idea of how each unit must work, and then it will somehow lead me to the right implementation, which I can then confirm through the open source repository,” explains the engineer. However, he observed, "If I publicly search for something, nothing comes up, which is a testament to how hidden the implementation details are."
Having completed three-fifths of the tasks on the list in only about two weeks, the above concerns about the GPU may make readers worry that Majmudar may have hit a roadblock, or even an insurmountable wall. But that doesn't appear to be the case, as he optimistically predicts that his GPU design will be completed "within the next few days" and a stripped-down version will be sent for tapeout.
Next, let’s take a look at how this person with zero foundation learned chip design.
preliminary plan
Here’s how Adam Majmuda plans to speed up the entire learning process of chip design and manufacturing (suggestions are welcome)
1.
start preparing
-
Review of circuit physics - (semiconductors, pn, junctions, diodes, capacitors)
-
Review of 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 (author: Peter Van Zant, a popular science book on semiconductor processing and manufacturing)
-
Test: rewatch @szeloof chip making video, everything should make sense and should be able to explain it
-
Learn about the development of ASML machines
-
Learn more about how EUV works
3.
Architecture - What are the main chip designs used in today's chips?
-
Understanding x86 vs. ARM vs. RISC-V
-
Learn RISC-V in depth (chip tape-out will use RISC-V CPU)
4.
Electronic Design Automation -
How do you design and verify your own chips that are sent out for manufacturing?
-
Learn a blogger’s course on designing chips from scratch (learn chip design, verification, etc.)
-
Designing and testing my own RISC-V ASIC using Verilog/OpenLANE/Caravel - right now I'm thinking of making a minimal GPU or converter accelerator, but open to any ideas
-
Submit chip design to TinyTapeout
5.
ASIC - What application specific chips are used in different industries?
How do they work?
-
AI accelerator - Untether, Tenstorrent, Etched, Groq
-
Telecommunications - network switches, routers, network cards, etc.
-
Automotive - Engine Control Unit (ECU), Advanced Driver Assistance System (ADAS), etc.
-
Finance - FPGA for high frequency trading
6.
Technological Advances - Over the past few decades,
What is the technological progress of the chip industry?
-
Advances leading to Moore's Law
-
Advances in NVIDIA GPUs
-
Progress in TSMC’s manufacturing processes
7.
Industry and Commerce -
What are the dominant forces shaping today’s chip industry?
-
Read Chip Wars
-
Understanding the CHIPS Act and Geopolitics
-
Understand the business of each link in the chip industry value chain (IP core, EDA, wafer fab equipment, fabless chip companies, integrated device manufacturers, chip foundries, OSAT)
8.
Opportunities - What are the significant opportunities in this area?
-
What are the big opportunities for big companies?
-
What are the key areas of opportunity for young entrepreneurs?
-
Where will venture capital’s big bets be?
-
Which companies are still good investments?
Step 1: Learn the basics of chip architecture
I first learned how the chip works from binary to C, this part is critical. In order to design a chip, you need a deep understanding of all architectural fundamentals as you need to constantly deal with logic, gates, memory, etc.
I looked at the whole stack:
-
Binary - uses voltages to encode data
-
Transistor - Using semiconductors to create digital switches
-
CMOS - Using transistors to build the first energy-saving inverter
-
门 - 使用晶体管计算更高级别的布尔逻辑
-
组合逻辑 - 使用门构建布尔逻辑电路
-
顺序逻辑 - 使用组合逻辑持久化数据
-
内存 - 使用顺序逻辑为数据创建存储系统
-
CPU - 结合内存和组合逻辑来创建冯·诺依曼架构,这是图灵完备的第一步(忽略内存约束)
-
机器语言 - 程序存储器中的指令如何映射以控制 CPU 上的信号
-
程序集 - 程序集如何直接映射到 CPU
-
C - C 如何编译成汇编语言,然后编译成机器语言
我有软件背景,充分了解这些层之间的联系,为我解锁了许多直觉。
步骤二:学习芯片制造的基础知识
接下来,我了解了晶体管的实际制造方式。
芯片设计工具都是围绕特定的制造工艺(称为工艺节点)构建的,所以我需要了解这一点才能完全掌握芯片设计流程。
我专注于学习:
-
材料 - 半导体制造需要大量的材料,包括半导体、蚀刻剂、溶剂等,每种材料都有特定的品质,值得使用。
-
晶圆制备 - 制造具有多晶硅晶体的硅晶圆,并在其上“生长”二氧化硅层
-
图案化 - 使用分层(氧化/层沉积/金属化)、光刻和蚀刻在芯片上创建实际晶体管图案的 10 步工艺
-
封装 - 将芯片封装在保护盖中,以防止损坏、创建 I/O 接口、帮助散热等。
-
污染 - 有趣的是,随着晶体管尺寸的减小,污染控制的焦点有多大/它变得多么重要
在这些主题中,有很多深度需要深入研究,制程的每个部分都有许多不同的方法,每种方法都使用不同的材料和机器。我更专注于广泛了解制程的重要部分。
这里最重要的直觉是,芯片是通过定义不同层的布局来生产的。这些层的设计是芯片设计 (EDA) 过程的输出。
步骤三:通过逐层制作 CMOS 晶体管
开始电子设计自动化
CMOS晶体管是使数字计算起飞的基本结构,因为它具有独特的能源效率
手动绘制CMOS的每一层,使晶体管的设计更加清晰。
在计算机体系结构中,对晶体管的常见解释实际上过于简单化,而逐层设计实际的晶体管迫使我更多地研究实际的实现细节。
查看单个nMOS晶体管的电压和电流图(右图)与等效图的比较,也使CMOS的功率效率提升更加明显。
在下图中,每种不同的颜色都指定了不同的层,每层都由不同的材料/离子/等制成,并在制造过程的不同步骤中创建 - 例如,红色多晶硅层是顶部nMOS和底部pMOS晶体管的实际GATE,浅蓝色metal 1层是输入和输出的实际连接。
步骤四:在Verilog中创建第一个完整电路
这部分对我来说是一个很酷的解锁,我第一次使用软件对硬件进行编程。我使用硬件描述语言 (HDL) Verilog 制作了我的第一个电路。
我制作了一个 RGB 混频器电路(mixer circuit),将来自 3 个旋转拨盘的信号(rotating dials )转换为 3 个 LED 的脉冲。
您可以使用HDL来指定单个门,但非常感谢大多数晶圆代工厂都提供标准单元库供客户使用。
标准单元只是常见用途的晶体管排列(如 AND gate),它针对效率进行了大量优化,并专为特定的代工厂制造工艺而设计。
这些标准单元库几乎包含大多数设计实际需要的所有逻辑单元,因此您无需过多地关注 gate level。
我使用 Skywater 130nm 工艺节点的标准单元库创建了这个电路(来自一家名为 Skywater 的代工厂的特定制造工艺)。
我知道代码大多是无用的,但我想把它包括给任何好奇的人。时序图显示 3 个不同的旋钮被转动,相应的 LED 被打开。
步骤5:为电路实现仿真和形式验证
由于硬件中的错误成本远远高于软件(因为一旦你的设计被制造出来,你就无法改变东西),使用广泛的测试和形式验证是设计过程的关键部分。
在整个 EDA 流程中,您可以使用:
-
静态定时分析 - 确保没有由于信号在电路中传播而产生的时序误差;
-
有界模型检查和 k 感应 (Bounded model checking & k-induction)- 确保您的设计不可能进入某些无效状态
-
您还需要确保电路能够进入特定的有效状态
我实施了所有这些步骤,以正式验证我的RGB混频器电路和其他设计是否有效(发生正确的预期状态转换)
步骤六:设计我的第一个完整芯片布局
这是迄今为止最酷的部分。我使用 OpenLane(一种开源 EDA 工具)对我的设计执行整个综合、优化和布局过程,并提出了一个完整的芯片设计。
只是看到我的Verilog代码变成了实际的芯片布局,并且能够进入并玩弄所有层并点击进入每个门,这真是一个病态的解锁。
OpenLane 流程处理以下所有内容:
-
仿真 - 运行仿真以验证您的设计是否通过了所有测试用例
-
综合 - 将 HDL 转换为显示设计中所有栅极之间连接的网表
-
优化 - 优化设计的面积、性能和功耗
-
布局 - 在物理芯片上布置所有标准单元
-
接线 - 通过正确的接线将所有组件连接在一起
-
验证 - 对最终设计进行形式验证
-
GDS - 创建最终输出文件,称为 GDS2 文件,用于指定要发送到晶圆代工厂进行流片的确切层
在EDA工具:
-
我可以放大并查看单个cell和晶体管
-
我可以有选择地隐藏不同的金属层,以了解所有东西是如何连接的
-
我可以在我的设计中查看能量密度、组件密度等
步骤七:从头开始逆向工程和设计 GPU
我的项目的最初目标是构建一个最小的 GPU。我没有意识到这将有多难。我的期望是,构建 GPU 将类似于构建 CPU,在线上有大量学习资源来弄清楚如何做到这一点。
但是我错了。
由于 GPU 公司都试图相互保密,因此大多数 GPU 架构数据都是专有和闭源的。
NVIDIA 和 AMD 发布了高级架构概述,但完全没有记录其 GPU 如何在低级别工作的所有细节。这让我的事情变得更有趣了——我基本上有一些高级架构文档+一些开源 GPU 设计的尝试,以及关于 GPU 架构的公共学习资源为零。
From this point on I've been trying to reverse engineer the details of how the GPU architecture works (on a simpler level of course) based on what I know of how it works + what has to be true.
Claude Opus has been a huge help here - I've been pitching my ideas to Claude on how each unit must work and then somehow (either by inference from what it knows, or training on proprietary data ) it will lead me towards the correct implementation, which I can then go and confirm with the open source repository. However, if I publicly search for something, nothing shows up, which proves how hidden the implementation details are.
So right now, I'm still building a minimal GPU design. I'll also document how everything works and make a post about it so anyone else who's curious can understand it more clearly.
This will ship in the next few days, and a stripped-down version will likely be shipped for tapeout on the Skywater 130nm process node.
Very excited about this project! We will also pay attention to this final sharing in the future.
Original link
https://www.tomshardware.com/pc-components/cpus/engineer-creates-cpu-from-scratch-in-two-weeks-begins-work-on-gpus
END
*Disclaimer: This article is original by the author. The content of the article is the personal opinion of the author. The reprinting by Semiconductor Industry Watch is only to convey a different point of view. It does not mean that Semiconductor Industry Watch agrees or supports the view. If you have any objections, please contact Semiconductor Industry Watch.
Today is the 3734th issue of "Semiconductor Industry Observation" shared with you. Welcome to pay attention.
Recommended reading
★ EUV lithography machine blockbuster report, released in the United States
★ Silicon carbide "surges": catching up, involution, substitution
★ The chip giants all want to “kill” engineers!
★ Apple, playing with advanced packaging
★ Continental Group, developing 7nm chips
★
Latest interview with Zhang Zhongmou: China will find a way to fight back
"Semiconductor's First Vertical Media"
Real-time professional original depth
Public account ID: icbank
If you like our content, click "Watching" to share it with your friends.