計算機組織與結構›Ch5 管線化(Pipeline)
第 29 題/共 58 題
◀ CC 29/58
29. Pipeline、Stall Cycles、Control Hazard、Forwarding
#CC-05-029中PipelineStall CyclesControl HazardForwarding
題組題幹(本題:第25題,共 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 total stall cycles will be inserted into the pipeline for proper execution throughout the entire program?

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