《计算机系统要素》学习笔记:第三章时序逻辑
2017-01-21 14:11
465 查看
1.学习要点
1)本章内容基础知识属于数字电路的时序逻辑电路部分,和部分计算机组成原理的内容。
2)触发器相关的基础知识,如内部结构,时钟等,在书中被忽略,需要单独学习。
3)本章内容以D触发器为基本元件,其他元件的构造都基于它。
4)设计计算机时钟时,时钟周期的长度要比1个比特在计算机两个物理距离最长的芯片之间的传输时间稍长。
5)RAM芯片,注意结合计算机组成的知识,理解对应的地址线,数据线,控制线三部分。
6)PC(程序计数器机)是一个CPU的核心部件,与计算机的流水线(取指—译码—执行)结构有关,第四章的理解重点之一。
2.代码实现
(1)1比特位寄存器
(2)寄存器(16-bit)
(3)RAM8
(4) RAM64
(5) PC计数器
1)本章内容基础知识属于数字电路的时序逻辑电路部分,和部分计算机组成原理的内容。
2)触发器相关的基础知识,如内部结构,时钟等,在书中被忽略,需要单独学习。
3)本章内容以D触发器为基本元件,其他元件的构造都基于它。
4)设计计算机时钟时,时钟周期的长度要比1个比特在计算机两个物理距离最长的芯片之间的传输时间稍长。
5)RAM芯片,注意结合计算机组成的知识,理解对应的地址线,数据线,控制线三部分。
6)PC(程序计数器机)是一个CPU的核心部件,与计算机的流水线(取指—译码—执行)结构有关,第四章的理解重点之一。
2.代码实现
(1)1比特位寄存器
CHIP Bit { IN in, load; OUT out; PARTS: Mux(a=out1,b=in,sel=load,out=out2); DFF(in=out2,out=out1); And(a=out1,b=true,out=out); }
(2)寄存器(16-bit)
CHIP Register { IN in[16], load; OUT out[16]; PARTS: Bit(in=in[0],load=load,out=out[0]); Bit(in=in[1],load=load,out=out[1]); Bit(in=in[2],load=load,out=out[2]); Bit(in=in[3],load=load,out=out[3]); Bit(in=in[4],load=load,out=out[4]); Bit(in=in[5],load=load,out=out[5]); Bit(in=in[6],load=load,out=out[6]); Bit(in=in[7],load=load,out=out[7]); Bit(in=in[8],load=load,out=out[8]); Bit(in=in[9],load=load,out=out[9]); Bit(in=in[10],load=load,out=out[10]); Bit(in=in[11],load=load,out=out[11]); Bit(in=in[12],load=load,out=out[12]); Bit(in=in[13],load=load,out=out[13]); Bit(in=in[14],load=load,out=out[14]); Bit(in=in[15],load=load,out=out[15]); }
(3)RAM8
CHIP RAM8 { IN in[16], load, address[3]; OUT out[16]; PARTS: DMux8Way(in=load,sel=address,a=a1,b=b1,c=c1,d=d1,e=e1,f=f1,g=g1,h=h1); Register(in=in,load=a1,out=out1); Register(in=in,load=b1,out=out2); Register(in=in,load=c1,out=out3); Register(in=in,load=d1,out=out4); Register(in=in,load=e1,out=out5); Register(in=in,load=f1,out=out6); Register(in=in,load=g1,out=out7); Register(in=in,load=h1,out=out8); Mux8Way16(a=out1,b=out2,c=out3,d=out4,e=out5,f=out6,g=out7,h=out8,sel=address,out=out); }
(4) RAM64
CHIP RAM64 { IN in[16], load, address[6]; OUT out[16]; PARTS: DMux8Way(in=load,sel=address[3..5],a=a1,b=b1,c=c1,d=d1,e=e1,f=f1,g=g1,h=h1); RAM8(in=in,load=a1,address=address[0..2],out=out1); RAM8(in=in,load=b1,address=address[0..2],out=out2); RAM8(in=in,load=c1,address=address[0..2],out=out3); RAM8(in=in,load=d1,address=address[0..2],out=out4); RAM8(in=in,load=e1,address=address[0..2],out=out5); RAM8(in=in,load=f1,address=address[0..2],out=out6); RAM8(in=in,load=g1,address=address[0..2],out=out7); RAM8(in=in,load=h1,address=address[0..2],out=out8); Mux8Way16(a=out1,b=out2,c=out3,d=out4,e=out5,f=out6,g=out7,h=out8,sel=address[3..5],out=out); }
(5) PC计数器
CHIP PC { IN in[16],load,inc,reset; OUT out[16]; PARTS: Mux16(a=back,b=in,sel=load,out=in1); Mux16(a=in1,b=false,sel=reset,out=in2); Register(in=in2,load=true,out=out1); And16(a=out1,b=true,out=out); Inc16(in=out1,out=out2); Mux16(a=out1,b=out2,sel=inc,out=back); }
相关文章推荐
- 《C专家编程》学习笔记——第三章(二):关于联合
- 《JavaScript高级程序设计》学习笔记(第三章)- 中
- 《自顶向下法》学习笔记——第三章:运输层
- 《计算机系统要素》学习笔记:第六章汇编编译器
- 《算法导论》学习笔记 第一章&&第二章&&第三章
- 《计算机系统要素》学习笔记:第五章计算机体系结构
- 《μCOS-III源码分析笔记》学习笔记|2|第三章时间管理
- 《c++ templates》学习笔记(2)——第三章
- 【原创】《Spring 2.0 技术手册》学习笔记——第三章 Bean、消息、事件
- 《JavaScript高级程序设计》学习笔记(第三章)- 下
- 《计算机系统要素》学习笔记:第二章布尔运算
- 《unix/linux编程实践教程》学习笔记:第三章 编写ls
- 《Spring实战》学习笔记-第三章:最小化SpringXML配置
- 《JAVA并发编程实践》学习笔记(第三章)
- 《Spring实战》学习笔记-第三章:最小化SpringXML配置
- 《Thinking in C++》学习笔记(二)【第三章】
- 《Android进阶之光》学习笔记——第三章 View体系与自定义View
- you don't know js -- Scope and Closures学习笔记——第三章(函数VS块作用域)
- 《计算机系统要素》学习笔记:第四章机器语言
- 计算机系统要素:第三章 时序逻辑