Question

c. The classic five-stage pipeline MIPS architecture is used to execute the code fragments. Assume the...

c. The classic five-stage pipeline MIPS architecture is used to execute the code fragments. Assume the followings:

  • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle,
  • Branches are resolved in the second stage of the pipeline and the architecture does not utilize any branch prediction mechanism
  • Forwarding is fully supported

Clock Cycle à

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

add      R4, R5, R6

IF ID EX MEM WB

lw        R1, 0(R2)

IF

ID

EX

MEM

WB

beq      R1, R4, target

IF

stall

stall

ID

EX

MEM

WB

I4

IF

ID

EX

MEM

WB

This is what I have so far, and I believe this is correct, but could someone please verify it, and if incorrect tell me why and where corrections should be made.

With it having Forwarding fully supported, I believe that cycle for the beq should be stalled, but it could also be that there are NO stall cycles and that the I4 instruction would end up looking like this table below. Please help

Clock Cycle à

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

add      R4, R5, R6

IF ID EX MEM WB

lw        R1, 0(R2)

IF

ID

EX

MEM

WB

beq      R1, R4, target

IF

ID EX MEM WB

I4

IF

ID EX MEM WB

Thank you

0 0
Add a comment Improve this question Transcribed image text
Answer #1

As Forwarding is fully supported we can forward the EX stage result of the instruction "lw R1, 0(R2)" to the execute stage of the instruction 'beq   R1, R4, target" without any stall in the pipeline. So the second diagram is correct.

Add a comment
Know the answer?
Add Answer to:
c. The classic five-stage pipeline MIPS architecture is used to execute the code fragments. Assume the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem....

    The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 200. L1: lw lw...

  • The classic five-stage pipeline MIPS architecture is used to execute the code fragments. Assume the followings:...

    The classic five-stage pipeline MIPS architecture is used to execute the code fragments. Assume the followings: Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, Branches are resolved in the SECOND stage of the pipeline and the architecture does not utilize any branch prediction mechanism Forwarding is FULLY supported. Assuming there is no dependence other than one(s) given in the code, show the pipeline diagram....

  • The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem....

    The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: The architecture fully supports forwarding, Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, Register R4 is initially 100. L1:  lw    R1, 0(R4)   add   R3, R1, R2 sw   ...

  • help Question 11 The classic five-stage pipeline MIPS architecture is used to execute the code fragments...

    help Question 11 The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 200....

  • The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem....

    The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 100. L1: lw add...

  • he classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem....

    he classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 100. Ll: lw add SW...

  • The latencies of individual stages in five-stage MIPS (Microprocessor without Interlocked Pipeline Stages) Architecture are given...

    The latencies of individual stages in five-stage MIPS (Microprocessor without Interlocked Pipeline Stages) Architecture are given below. Instruction Instruction Fetch Register Read Arithmetic Logic Unit (ALU) Memory Access Register Write Latency 200ps 100ps 200ps 300ps 100ps a. (10 pts) What is the clock cycle time in a pipelined and non-pipelined processor? Pipelined version : ______________ Non-pipelined version : ______________ b. The classic five-stage pipeline MIPS architecture is used to execute the code fragments. Assume the followings: Register write is done...

  • add SW addi bne The classic five-stage pipeline MIPS architecture is used to execute the code...

    add SW addi bne The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 100....

  • Question 11 add sw addi bne The classic five-stage pipeline MIPS architecture is used to execute...

    Question 11 add sw addi bne The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings • The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction med • Register R4...

  • Assembly code time

    Consider the following assembly language code:I0: add $R4,$R1,$R0                             //ADD R4 = R1 + R0;I1: lw $R1,100($R3)                             //LDW R1 = MEM[R3 + 100];I2: lw $R9,4,($R1)                                // LDW R9 = MEM[R1 + 4];I3: add $R3,$R4,$R9                             //ADD R3 = R4 + R9;I4: lw $R1,0($R3)                                 //LDW R1 = MEM[R3 + 0];I5: sub $R3,$R1,$R4                             //SUB R3 = R1 - R4;I6: and $R9,$R9,$R7                             //AND R9 = R9 & R7;I7: sw $R2,100($R4)                             //STW MEM[R4 + 100] = R2;I8: and $R4,$R2,$R1                             //AND R4 = R2 & R1;I9: add...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT