Question

We found that the instruction fetch and memory stages are the critical path of our 5-stage...

We found that the instruction fetch and memory stages are the critical path of our 5-stage pipelined MIPS CPU. Therefore, we changed the IF and MEM stages to take two cycles while increasing the clock rate. You can assume that the register file is written at the falling edge of the clock.

Picture5.png

Assume that no pipelining optimizations have been made, and that branch comparisons are made by the ALU. Here’s how our pipeline looks when executing two add instructions:

Clock Cycle #

1

2

3

4

5

6

7

8

add $t0, $t1, $t2

IF1

IF2

ID

EX

MEM1

MEM2

WB

add $t3, $t4, $t5

IF1

IF2

ID

EX

MEM1

MEM2

WB

a. How many stalls would a data hazard between back-to-back instructions require?

b. How many stalls would be needed after a branch instruction?

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

a.Answer:Three stalls are required that a data hazard between back to back instructions.

b.Answer: Four stalls are needed after a branch instruction.

Add a comment
Know the answer?
Add Answer to:
We found that the instruction fetch and memory stages are the critical path of our 5-stage...
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
  • A 5-Stage pipeline is composed of the following stages Instruction Fetch (IF), Decode (DE), Execute (EX), Memory Access...

    A 5-Stage pipeline is composed of the following stages Instruction Fetch (IF), Decode (DE), Execute (EX), Memory Access (ME) and Register Write-back (WB). Assume the pipeline does not have a branch prediction unit, does not have superscalar support and does not support out of order execution. Assume that all memory accesses are in the L1 cache and therefore do not introduce any stalls. Show a pipeline diagram that shows the execution of each stage for the assembly code below. Also...

  • The necessary steps in RTL (Register Transfer Languag fetch and execute to the instructions addi ...

    the necessary steps in RTL (Register Transfer Languag fetch and execute to the instructions addi (add immediate), bne (branch not equal), and j Üump) on a multicycle MIPS machine. (10 points) Stepl: (IF) Instruction Fetch Step2: (ID) Instruction Decode and Rek. Fetch Step 3 (EX) Exerution Stepi: (MEM) Memory Access itepl: (WB) Whte Back 1. Write the necessary steps in RTL (Register Transfer Language), to fetch and execute (10 points) the instructions addi (add immediate), bne (branch not equal), and...

  • (Pipelining 20%) The 5 stages of a processor have the following latencies: Fetch Decode Execute Memory...

    (Pipelining 20%) The 5 stages of a processor have the following latencies: Fetch Decode Execute Memory Write-back 250 350ps 300ps 500ps 80ps a. If the processor is non-pipelined: what is the clock cycle time for the processor? What is the latency of an R-type instruction in the processor? b. If the processor is pipelined: What is the clock cycle time for the processor? What is the latency of an R-type instruction in the processor? C. If you could split one...

  • Consider a standard 5-stage MIPS pipeline of the type discussed during the class sessions: IF- ID-EX-M-WB....

    Consider a standard 5-stage MIPS pipeline of the type discussed during the class sessions: IF- ID-EX-M-WB. Assume that forwarding is not implemented and only the hazard detection and stall logic is implemented so that all data dependencies are handled by having the pipeline stall until the register fetch will result in the correct data being fetched. Furthermore, assume that the memory is written/updated in the first half of the clock cycle (i.e. on the rising edge of the clock) and...

  • In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems...

    In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath have the following latencies: [17pts] 3. IF ID EEX MEM | WB 250ps 350ps 150ps300ps200ps a. what is the clock cycle time in a pipelined and non-pipelined (ie, single cycle) processor? what is the total latency of one lw instruction in a pipelined and non-pipelined (i.e., single cycle) processor? b. What is the total...

  • 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...

  • I need help plz 6. 4-stage MIPS pipeline: It has "IF, ID-EX, MEM, WB" stages. Specify...

    I need help plz 6. 4-stage MIPS pipeline: It has "IF, ID-EX, MEM, WB" stages. Specify how many stalls (or bubbles) are required for the following cases. Assume that there is a forwarding logic and branch condition is determined at ID-EX stage. No delayed branch is assumed. (a) lw $1, 4($0) add $2, $1, $1 (b) lw $1, 4($0) beq $1, $2, add $3, $4, $5 X: sub $3, $3, $5 7. For problem 2 (c), how many bubbles are...

  • The following MIPS program is to be run on a MIPS pipeline processor of 5 stages...

    The following MIPS program is to be run on a MIPS pipeline processor of 5 stages (IF-ID-EX-MEM-WB). Work out and diagram the optimal pipeline schedule using full forwarding from EX or MEM stages to any other stage, Draw the pipeline execution diagram for this code and then compute the pipeline CPI: addi $t6, $t6, 10 sub $t5, $t6, $t4 srl $t5, $t5, 2 sw $t5, 20($t5) lw $t2, 0($t6) add $t7, $t2, $t3 beq $t5, $t7, End

  • A machine is called “underpipelined” if additional levels of pipelining can be added without changing the...

    A machine is called “underpipelined” if additional levels of pipelining can be added without changing the pipeline stall behavior appreciably. Suppose that the MIPS integer pipeline was changed to four stages by merging EX and MEM stages and lengthening the clock cycle by 50%. How much faster would the conventional MIPS pipeline be versus the underpipelined MIPS on integer codes only? Assume that the branch is resolved in the ID stage and forwardings are available. Make sure that you include...

  • 1. Assume that individual stages of the datapath have the following latencies: IF ID EX MEM...

    1. Assume that individual stages of the datapath have the following latencies: IF ID EX MEM WB 250 ps 350 ps 150 ps 300 ps 200 ps Also, assume that instructions executed by the processor are broken down as follows: alu beq lw sw 45% 20% 20% 15% What is the total latency of an ?w instruction in a pipelined and non-pipelined processor? Instead of a single-cycle organization, we can use a multi-cycle organization where each instruction takes multiple cycles...

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