Question: Problem 1 ( 6 0 points ) . Consider the complete MIPS pipelined datapath that we have learned, which is capable of detecting hazards, using

Problem 1(60 points). Consider the complete MIPS pipelined datapath that we have learned, which is capable of detecting hazards, using forwarding paths to resolve hazards, and computing branch outcomes in the ID stage. Specifically, for this problem assume there are forwarding paths, forwarding logic, and hazard detection logic that enables forwarding from the EX/MEM and MEM/WB pipeline registers to the ALU inputs and the ID stage (for determining branch outcomes). Also assume that branch prediction and delay slots are not used in this problem. An example of the datapath is given in Figure 1, noting that not all hardware is necessarily shown in the diagram. Figure 2: Sample pipeline execution diagram. Draw the pipeline execution diagram for the two sequences of instructions given below when
executed in the pipelined datapath described above. For sequence A assume the branch instruction is not taken, and for sequence B assume the branch instruction is taken. Your pipeline execution diagram should clearly indicate the forwarding paths that may be used and clearly mark a bubble (i.e., stalled instruction). An example of a pipeline execution diagram is given in Figure 2. You must draw a similar diagram but for the following sequences of instructions:
Sequence (A)
add $t0, $t1, $t2
ori $t1, $t0,0xF
lw t1,0(t1)
beq $t0, $t1, LABEL
sw t1,0(t0)
Sequence (B)
sub $t0, $t1, $t2
and $t0, $t0, $t2
add $t1, $t0, $t2
beq $t0, $t1, LABEL
lw t2,0(t3)
LABEL: 1w t3,0(t4) Problem 1(60 points). Consider the complete MIPS pipelined datapath that we have learned, which is capable of detecting hazards, using forwarding paths to resolve hazards, and computing branch outcomes in the ID stage. Specifically, for this problem assume there are forwarding paths, forwarding logic, and hazard detection logic that enables forwarding from the EX/MEM and MEM/WB pipeline registers to the ALU inputs and the ID stage (for determining branch outcomes). Also assume that branch prediction and delay slots are not used in this problem. An example of the datapath is given in Figure 1, noting that not all hardware is necessarily shown in the diagram.
Figure 1: Pipelined datapath depicting forwarding and branch computation in the ID stage.
Figure 2: Sample pipeline execution diagram.
Draw the pipeline execution diagram for the two sequences of instructions given below when executed in the pipelined datapath described above. For sequence A assume the branch instruction is not taken, and for sequence B assume the branch instruction is taken. Your pipeline execution diagram should clearly indicate the forwarding paths that may be used and clearly mark a bubble (i.e., stalled instruction). An example of a pipeline execution diagram is given in Figure 2. You must draw a similar diagram but for the following sequences of instructions:
Sequence (A)
```
add $t0, $t1, $t2
ori $t1, $t0,0xF
lw $t1,0($t1)
beq $t0, $t1, LABEL
sw $t1,0($t0)
```
Sequence (B)
sub \$t0,\$t1,\$t2
and \$t0,\$t0,\$t2
add \$t1,\$t0,\$t2
beq \$t0,\$t1, LABEL
1w \$t2,0(\$t3)
LABEL: 1w \$t3,0(\$t4)
Problem 1 ( 6 0 points ) . Consider the complete

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!