計算機組織與結構›Ch5 管線化(Pipeline)
第 31 題/共 58 題
◀ CC 31/58
31. Pipeline、Forwarding、Data Hazard
#CC-05-031中PipelineForwardingData Hazard
題組題幹(本題:第27題,共 3 小題)點擊展開

P is a single-issue, in-order execution, five-stage pipeline implementation of the MIPS ISA without a branch prediction unit and without any data-forwarding path. The registers are read at the second half cycle of the Decode stage. The registers are written at the first half cycle of the Writeback stage. The branch decisions and targets are determined at the Execute stage. The fetch of the next instruction after a branch will be stalled until the branch decision is made. Answer the following questions when P is used to execute Program 3:

      addi $s1, $zero, 8
      addi $s2, $s1, $zero
Loop: lw   $t0, 100($s1)
      addu $t0, $t0, $s2
      sw   $t0, 100($s1)
      addi $s1, $s1, -4
      bne  $s1, $zero, Loop
      addi $s2, $zero, $zero

(Program 3)

How many stall cycles can be removed by adding only the forwarding path from the EX/MEM register to one of the inputs of the ALU in the execute stage?

📄 交大113
跳轉到第題
▤完整推導請見《WH 資工筆記 · 計算機組織與結構》Ch5 管線化(Pipeline)
本章題號 · 21–40 / 58