lab3复杂流水线实验报告

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Lab3复杂流水化实验

Experiment1: To study the basics of forwarding. For all the programs please select Stall Detection and Forwarding should be ON.

(a)Write a sample program that forwards between EXE stage and MEM stage on

upper input of the the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION.

其中ADD指令中在MEM阶段的ALUout-555(R2+R3)前递到SUB指令的EXE阶段的upper input。

(b)Write a sample program that forwards between EXE stage and WB stage on upper

input of the the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION.

其中ADD指令中在WB阶段的输出555(R2+R3)前递到SUB指令的EXE阶段的upper input。

(c)Write a sample program that forwards between EXE stage and MEM stage on

lower input of the the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION.

其中ADD指令中在MEM阶段的ALUout-555(R2+R3)前递到SUB指令的EXE阶段的upper input。

(d) Write a sample program that forwards between EXE stage and WB stage on lower input of the the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION.

其中ADD指令中在WB阶段的输出555(R2+R3)前递到SUB指令的EXE阶段的upper input。

(e) Write a sample program that forwards between MEM stage and WB stage. Write the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded.

其中ADD指令在WB阶段的输出555(R2+R3)前递到SW指令的MEM阶段。

(f) Write a program that causes Load Use Delay Stall. See what data is to be moved and notice exactly when the required Data is passed on to the waiting instruction. Show it as an arrow on the following diagram.

BRANCH HAZARDS. (Lab Experiment 2)

(a) Let us now study some branch hazard. First of all make sure that the Aggressive branching option is OFF, Stall Detection is ON and Forwarding is ON. Select Always Flush option from the branch Policy and write the following program. Does this program work properly. If not modify the program so that it works properly. It fills 10 memory locations memory with a value 222. Check what should be the values of all the registers if this program work is to properly (no useful instruction turning into NOP or getting flushed). Carefully note the use of SLTI instruction in the following loop.

ADDI R3, R0, 0

ADDI R1, R0, 0

ADDI R2, R0, 222

Loop: Addi R1, R1, 4

SW R2, 100(R1)

ADDI R3, R3, 1

SLTI R5, R3, 10

相关文档
最新文档