Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following MIPS code: (also assume, as with the assignment, variable timing CPU cycles rather than fixed time) add $s0, $t0, $t1 sub $t2,

Consider the following MIPS code:

(also assume, as with the assignment, variable timing CPU cycles rather than fixed time)

add $s0, $t0, $t1

sub $t2, $s0, $t3

beq $t2, $s3, LBL #assume they arent equal

add $s4, $t2, 1

done # as in our done macro, you don't need to do anything with this line

LBL: 
 mul $s4, $t2, 2 done #as in our done macro, you don't need to do anything with this line

Where instructions have the following pipeline stage times.

IF

ID

EX

MEM

WB

Case 1

20

15

20

20

15

Case 2

25

5

30

10

20

  1. Ignoring any hazards (and assume no speculative execution or branch prediction), what is the execution time in both cases.
  2. Accounting for hazards (shared data and instruction cache) and assuming branches resolve in the mem stage what is the execution time in both cases

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

Principles Of Cost Accounting

Authors: Edward J. Vanderbeck

15th Edition

978-0840037039, 0840037031

More Books

Students also viewed these Accounting questions