The Elements of Computing Systems阅读笔记(2)

昨天忙了点别的事情,今天发两篇补上昨天的。模拟电路笔记也会更新的。
接上上一篇讲的布尔逻辑运算,今天这篇博客要引入一个新名词:“门”。
“与”门
上面的就是与门(左边的两个O就是输入端口,右边的O就是输出端口,只有两个输入端口都是输入1右边的输出端口才会输出1),只是一个例子。通常的“门”指的就是类似上面这种“器件”,能够输入n个布尔值(上面的例子就是2个),输出m个布尔值(上面的例子就是1个)。多于2个的输入是可以的,例如下面这个“与门”,就有3个输入。
有3个输入的与门
上面的这个与门只有在3个输入都是1的时候才会在右边的输出输出1。
多个输出的门类似上面的那样,就懒得列举了。
其实上面的3个输入的与门可以被分解为2个与门的组合。
3输入与门的内部
类似的例子还有异或门,这种门是由一个或门和两个与门两个非门组成的(Or(And(a, Not(b)), And(Not(a), b))(也可以是其他组合,但是这个组合比较简洁,能用最简单的方法完成的事情就没有必要搞得太复杂)。
其实一开始的时候我们就开始用这种思路:把这些工具当成黑箱看待,只管输入和输出,不理它的内部结构。上面有3个输入的与门也类似这样,在把2个与门组合起来后,直接把这2个与门当成1个黑箱看待,并用这种”新“的工具来制作更复杂的玩意。

然后要引入的另一个名词就是HDL,硬件描述语言。因为直接拿着一堆铜丝、焊锡、各种门来搭个复杂的电路实在是太不优雅,所以现代的工程师们通常会用HDL来直接“画出”电路,然后再在电脑程序上仿真,出bug了再改改,直到符合预期了为止(输入输出满足需求为止)。然后才开始制作样品,进行测试,看看功耗怎么样,性能达不达标之类的。

HDL定义的芯片(这里的“芯片”与市场上常见的复杂芯片无关,主要指各种门搭起来的电路)包含了两个部分,header和parts部分。header定义了芯片的接口(interface,我理解成输入输出),包括芯片名称、输入接口和输出接口。parts部分描述了芯片内部的更低一层次的元件(例如更低层次的芯片或门),记录了这些元件名字和各个部分的连接状况。

HDL更详细的介绍会放在下一篇博客。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
In the early days of computer science, the interactions of hardware, software, compilers, and operating system were simple enough to allow students to see an overall picture of how computers worked. With the increasing complexity of computer technology and the resulting specialization of knowledge, such clarity is often lost. Unlike other texts that cover only one aspect of the field, The Elements of Computing Systems gives students an integrated and rigorous picture of applied computer science, as its comes to play in the construction of a simple yet powerful computer system. Indeed, the best way to understand how computers work is to build one from scratch, and this textbook leads students through twelve chapters and projects that gradually build a basic hardware platform and a modern software hierarchy from the ground up. In the process, the students gain hands-on knowledge of hardware architecture, operating systems, programming languages, compilers, data structures, algorithms, and software engineering. Using this constructive approach, the book exposes a significant body of computer science knowledge and demonstrates how theoretical and applied techniques taught in other courses fit into the overall picture. Designed to support one- or two-semester courses, the book is based on an abstraction-implementation paradigm; each chapter presents a key hardware or software abstraction, a proposed implementation that makes it concrete, and an actual project. The emerging computer system can be built by following the chapters, although this is only one option, since the projects are self-contained and can be done or skipped in any order. All the computer science knowledge necessary for completing the projects is embedded in the book, the only pre-requisite being a programming experience. The book's web site provides all tools and materials necessary to build all the hardware and software systems described in the text, including two hundred test programs for the twelve projects. The projects and systems can be modified to meet various teaching needs, and all the supplied software is open-source.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值