Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this exercise, we will see the effectiveness of different solutions to control hazards. Consider the following MIPS assembly code, which calculates the sum ofa

In this exercise, we will see the effectiveness of different solutions to control hazards. Consider the following MIPS assembly code, which calculates the sum ofa 32-bit integer array. The input parameters $a0 and $a1 are the base address and the number of elements in the array, respectively. The program is executed on the 5-stage MIPS pipelined CPU shown below.
a)Which forwarding paths are used during the execution of the program?
b)For bne at 0x1C, we assumethat the processor will always read thenext instruction and continue to normal execution before the branchdecision. When bne detects that the branchis takenin MEM stage, the IF/ID/EX stages are flushed(the same as the execution flow of beq). Assuming that the valuein $a1 is 1000, how many cycles does it take for execution?What if the processor always reads the instruction at the branch target after the bne instruction?(In detail, assuming that bne needs to stall 1 clock cycle to calculate the branch target PC, and then execute the instruction at the branch target?
image text in transcribed

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions