落了一节课,直接lecture3
Lecture3 Basic Pipeline
1、Single-cycle implementation: seldom used
取指 译码 执行 读mem/cache 写回WB
2、How to make it fast?
To decrease the clock cycle time? difficult!
What's the problem?资源浪费 串行 Start work ASAP
3、Multi-cycled implemention
4、Pipelining
why pipelining? decrease CPUtime improving the throughput
5、Pipeline hazard: the major hurdle
A hazard is a condition that prevents an instruction in the pipe from excuting its next scheduled pipe stage
Taxonomy of hazard:
Structrural hazards: These are comflicts over hardzards resources.
Data hazards: Instruction depends on result of prior computation which is not ready yet.
Control hazards: PC are not available in time to fetch an instruction on the next clock.
6、 Hazards can always be resolved by stall
7、浮点数运算:解决结构竞争(Structrural hazards)
方法1:fully pipelined adder:overhead(体积、执行时间)过大
方法2:multiple unpipelined adder:overhead(成本)过大
方法3:插入stall
8、coping with data hazards
方法1:增加数据通路(Forwarding Path)
方法2:Forwarding not always work,so implement load Interlock :load指令比较常见,这个方法开销较大
方法3:编译器端,进行代码调度,进行代码块顺序改变