[30 marks] Consider the following code is executed on pipelined datapath with only structural hazard solved. lw $s0, 4($

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

[30 marks] Consider the following code is executed on pipelined datapath with only structural hazard solved. lw $s0, 4($

Post by answerhappygod »

[30 marks] Consider the following code is executed on pipelined
datapath with only structural hazard solved.
lw $s0, 4($t0)
addi $t0, $s0, 100
add $s1, $s0, $t0
addi $s1, $t0, 1
and $t5, $s1, $s1
(a) Referring to the above code, which registers and how many times
each of those registers are affected by Data Hazard.
(b) Draw a diagram, by using arrow(s) to indicate Forwarding and
cross (X) to indicate Stall [Referring to an example below], to
illustrate how Forwarding and Stall are used to execute the above
code without having Data Hazard. The arrow should correctly
indicate the Forwarding to the upper or lower input of the ALU.
(c) Based on your answer at part (b), how many cycles are
required to execute the above code?
30 Marks Consider The Following Code Is Executed On Pipelined Datapath With Only Structural Hazard Solved Lw S0 4 1
30 Marks Consider The Following Code Is Executed On Pipelined Datapath With Only Structural Hazard Solved Lw S0 4 1 (113.03 KiB) Viewed 119 times
6. (30 marks] Consider the following code is executed on pipelined datapath with only structural hazard solved. Iw addi add $50, 4($t0) $t0,$50, 100 $51, $50, $t0 $51, $t0, 1 $t5, $s1, $s1 addi and (a) Referring to the above code, which registers and how many times each of those registers are affected by Data Hazard. (b) Draw a diagram, by using arrow(s) to indicate Forwarding and cross (X) to indicate Stall [Referring to an example below), to illustrate how Forwarding and Stall are used to execute the above code without having Data Hazard. The arrow should correctly indicate the Forwarding to the upper or lower input of the ALU. 1st instruction Reg! Reg Stall X X X X X 車內 十十十四 自由 IM Reg 2nd instruction 3rd instruction (c) Based on your answer at part (b), how many cycles are required to execute the above code?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply