Building a CPU from Scratch cover

Building a CPU from Scratch

Rating 4.0
Word count
547K words
Chapters
1
Series
Turing Programming Series · DIY Series
ISBN
9787115338181

Tags

Summary

This book is a hands-on guide to building your own computer with FPGAs, written by three members of the RESPON group at Keio University. Originally published in Japanese as *CPU Jisaku Nyumon: HDL ni yoru Ronri Sekkei, Kiban Seisaku, Puroguramingu* (Introduction to Building Your Own CPU: Logic Design with HDL, Board Fabrication, and Programming), it is designed so that even readers with no chip design experience can truly build a working computer. The authors break a computer into three parts and implement each in turn: first logic design with Verilog HDL, then designing and fabricating a circuit board, and finally writing programs for the self-made computer and debugging them on the machine. Chapter 1 begins with the fundamentals—what a computer, CPU, memory, I/O, and bus are—and fills in the basics of digital circuits and Verilog HDL syntax before moving on to implement the bus, memory, the authors' own AZ Processor, and I/O modules such as timers and a serial port, assembling them into a complete small computer system. Chapter 2 covers the design and fabrication of the circuit board, including component selection, schematics, and layout and routing. Chapter 3 has you write and run assembly programs on this computer, completing full hardware-software co-debugging. Throughout, the book leads with concrete examples and explains principles through practice, helping software engineers understand the hardware layer and write more efficient code, while helping hardware engineers customize their own hardware systems on this foundation.

Editor's review

多数讲计算机组成的书止步于原理图,这本书却要求你把整台机器真正做出来。它的价值在于“全栈贯通”:同一套系统里,逻辑设计、电路板制作、底层编程三个层面被串成一条线,读者能亲眼看到自己写的Verilog如何变成上电后会跑程序的硬件。作者来自日本庆应义塾大学RESPON小组,是三位年轻的硬件爱好者,行文带着DIY的轻松感,难度却一点不打折——从MOSFET结构、CMOS门电路、建立与保持时间讲起,一路到作者自研的AZ Processor实现,逻辑清晰、代码完整。第1章体量最大,几乎是一部可动手的计算机组成原理教材;第2章转向电烙铁与PCB,第3章回到软件,用汇编把整台机器“点亮”。对于被黑盒式开发困住的工程师,这是一本能把抽象补齐的硬核读物。翻译流畅,专业术语处理到位,是中文硬件自学书里难得的实践型作品。

Who it's for

A good fit for

  • 想理解硬件底层的软件工程师、后端与嵌入式开发者
  • 学习计算机组成原理、希望把理论落到实处的本科生与研究生
  • 有FPGA或数字电路基础、想亲手造一台计算机的硬件爱好者
  • 准备做毕业设计或DIY项目的电子、自动化专业学生

Not a good fit for

  • 完全没有编程基础、也没接触过任何逻辑电路的入门读者
  • 只想快速学会写代码、不打算动手做硬件的读者
  • 期待现成完整套件与保姆级步骤截图、不愿查阅资料的人

Reading tips

  1. 先通读第1章的1.2至1.4节,把数字电路和Verilog HDL基础打牢,再进入总线与处理器的实现。
  2. 边读边动手:配套代码务必在仿真环境中跑通,理解每一段模块的输入输出时序后再合入系统。
  3. 第2章电路板制作部分建议量力而行,可用现成FPGA开发板替代自制板卡完成上机验证。
  4. 遇到AZ Processor的指令与微架构内容时,可配合一本计算机组成原理教材交叉阅读,效果更佳。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Turing Programming Series · DIY Series

FAQ

这本书需要什么基础才能读?
作者定位是“只需编程基础”。实际阅读中,若具备C语言编程经验,并从第1章的数字电路和Verilog HDL部分起步,理解会顺畅很多;完全没有编程或逻辑电路经验会比较吃力。
书里的CPU是用什么实现的?
书中使用Verilog HDL做逻辑设计,并以FPGA作为实现平台,自行设计了一款名为AZ Processor的处理器,再配合总线、存储器和I/O模块组成完整的小型计算机系统。
会不会需要自己买FPGA开发板和焊接电路板?
第2章确实讲电路板设计与制作,但并非必须自制板卡。多数读者可用现成FPGA开发板替代,同样能完成逻辑下载与上机测试,动手条件可以按自身情况调整。
这本书和《CPU设计实战》有什么区别?
本书成于2014年,覆盖逻辑设计、电路板制作、汇编编程三段流程,偏全面动手实践;《CPU设计实战》更偏RISC-V流水线CPU的工程化设计。两者可互补阅读。
内容是否过时,现在还值得读吗?
书中Verilog HDL、数字电路、总线与指令集的基本原理长期有效,不会被淘汰;具体芯片型号与开发工具版本可能已旧,选用替代器件时需自行查阅最新资料。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category