Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

computer organization Q2. 4.13 This exercise is intended to help you understand the relationship between forwarding, hazard detection, and ISA design. Problems in this exercise

image text in transcribed

image text in transcribed

computer organization

Q2. 4.13 This exercise is intended to help you understand the relationship between forwarding, hazard detection, and ISA design. Problems in this exercise refer to the following sequence of instructions, and assume that it is executed on a 5-stage pipelined datapath: add r5,r2,r1 w lw r3,4(r5) lw r2,0(r2) or r3,r5,r3 sw r3,0(r5) 4.13.1 [5] If there is no forwarding or hazard detection, insert nops to ensure correct execution. 4.13.2 [10] Repeat 4.13.1 but now use nops only when a hazard cannot be avoided by changing or rearranging these instructions. You can assume register R7 can be used to hold temporary values in your modified code. 4.13.3 [10] If the processor has forwarding, but we forgot to implement the hazard detection unit, what happens when this code executes? 4.13.4 [20] If there is forwarding, for the first five cycles during the execution of this code, specify which signals are asserted in each cycle by hazard detection and forwarding units in Figure 4.60. 4.13.5 (10] If there is no forwarding, what new inputs and output signals do we need for the hazard detection unit in Figure 4.60? Using this instruction sequence as an example, explain why each signal is needed. 4.13.6 [20] For the new hazard detection unit from 4.13.5, specify which output signals it asserts in each of the first five cycles during the execution of this code. ID/EX. MemRead Hazard detection unit IF/DWrite ID/EX WB EX/MEM WB M u Control M PCWrite MEM/WB WB IF/ID EX M Registers > ALU PC Instruction memory Data memory IF/ID. RegisterRs IF/ID. RegisterRt IF/ID.Register IF/ID.RegisterRd ID/EX.RegisterRt Rd Rs Forwarding unit FIGURE 4.60 Pipelined control overview, showing the two multiplexors for forwarding, the hazard detection unit, and the forwarding unit. Although the ID and EX stages have been simplified-the sign-extended immediate and branch logic are missing- this drawing gives the essence of the forwarding hardware requirements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions