Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: Use the following code fragment: Loop: LD R2,0(R1) ;load R2 from address 0+R1 DADDI R3,R2,#2 ;R3=R2+2 DADD R2,R2,R3 ;R2=R2+R3 SD 0(R1),R2 ;store R2

Question 1: Use the following code fragment: Loop: LD R2,0(R1) ;load R2 from address 0+R1 DADDI R3,R2,#2 ;R3=R2+2 DADD R2,R2,R3 ;R2=R2+R3 SD 0(R1),R2 ;store R2 at address 0+R1 DSUB R4,R1,R3 ;R4=R1-R3 BNEZ R4,Loop ;branch to Loop if R4=!0 Use the classic RISC five-stage integer pipeline and assume all memory accesses take 1 clock cycle. Show the timing of this instruction sequence for the basic 5-stage RISC pipeline with full forwarding or bypassing hardware. Assume that a conditional branch is evaluated at the decode stage, and the fetch of the target instruction is delayed until the branch direction is known. Use 'F', 'D', 'X', 'M', 'W' for stages, '-' for a stall, '=' for indicating delayed fetching due to waiting for branch resolution, and 'b' for all blanks. [For the spacing concern of the Webcourses, the timeline is put in rows, and instructions are put in columns. The first column is filled out for your reference.] LD R2,0(R1) DADDI R3,R2,#2 DADDI R2,R2,R3 SD 0(R1),R2 DSUB R4,R1,R3 BNEZ R4,Loop 2nd: LD R2,0(R1)

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_2

Step: 3

blur-text-image_3

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

Persuasive Speaking Organizing Patterns in Persuasive Speaking?

Answered: 1 week ago