《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程序。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值