《Computer Organization and Design》Chap.4 笔记

摘要:

  1. 怎样建立datapath?需要哪些elements?如何连接这些elements?
  2. 怎样控制datapath?8bits的control linel包含了哪些signals?
  3. pipeline!
  4. 其他提高性能的方法,如并行、循环展开。

4.7-4.9、4.11待看。

内容:
elements盘点——
1.Instruction memory——a memory unit to store the instructions of a program and supply instructions given an address.
Instruction memory
2.PC(Program Counter)——a register that holds the address of the current instruction.
3. An adder to increment the PC to the address of the next instruction.

以上三个elements组成了instruction fetch的datapath。

4.Register file——A register file is a collection of registers in which any register can be read or written by specifying the number of the register in the file.
Register file
5.ALU
ALU
6.Data memory unit——A state element with inputs for the address and the write data, and a single output for the read result.
Data memory unit

7.Immediate generation unit——sign-extend the 12-bit offset field in the instruction to a 64-bit signed value.
ImmGen
8.Control unit——2bits ALUOp、RegWrite、ALUSrc、PCSrc、MemRead、MemWrite和MemtoReg。
ALUOp
在这里插入图片描述
以上8个elements组成一个麻雀虽小五脏俱全的datapath——
Datapath with control unit
一图说明pipeline如何起作用:
Pipeline
Pipeline Hazards: structural hazard, data hazard and control hazard.
Figure 4.17 之 single-cycle——
在这里插入图片描述
Figure 4.31 之 pipeline version——
在这里插入图片描述
在pipeline中加入control之后——
Pipeline datapath with control
4.10讲instruction-level parallelism (ILP)的技巧,还建议去看Computer Architecture: A Quantitative Approach,这部分看得似懂非懂还有待琢磨。循环展开的技巧在CSAPP Chap.5中刚看过。
4.12用了循环展开去优化Matrix Multiply程序。

猜你喜欢

转载自blog.csdn.net/u013213111/article/details/85316167