Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Use the following code fragment: Loop: DADDI R4, R4, #4 LW R6, 0(R4) ADD R8, R6, R6 SW R8, 0(R1) DADDI R1, R1, #4

1) Use the following code fragment: Loop: DADDI R4, R4, #4 LW R6, 0(R4) ADD R8, R6, R6 SW R8, 0(R1) DADDI R1, R1, #4 DSUB R3, R4, R2 BNEZ R3, Loop Assume that the initial value of R2 is R4 + 192. Assume early evaluation of branch instruction, i.e., the branch outcome (whether the condition is true or false and where is the next instruction) is known after the Decode stage., but the branch instruction will still go through all the five pipeline stages. For both 1a and 1b, assume that the branch is handled by predicting it as not taken, i.e. the next instruction in program sequence is fetched (Continue with next instruction as usual). However, it is a wrong instruction except for the last iteration, and will be flushed after the branch outcome is known. 1a. Show the timing of this instruction sequence for the 5-stage RISC pipeline without any forwarding or bypassing hardware but assuming that a register read and a write in the same clock cycle forwards through the register file, as shown in Figure C.6. Use a pipeline timing chart like that in Figure C.5. Assume that the branch is handled by flushing the pipeline. If all memory references take 1 cycle, how many cycles does this loop take to execute? 1b. Show the timing of this instruction sequence for the 5-stage RISC pipeline with full forwarding and bypassing hardware. Use a pipeline timing chart like that shown in Figure C.5. If all memory references take 1 cycle, how many cycles does this loop take to execute?

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

ISBN: 321321367, 978-0321321367

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago