Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question a1 120 Points]: Consider the following code fragment. Assume this program is executed on a 5 -stage pipelined Mips processor with the longest stage

image text in transcribed
image text in transcribed
image text in transcribed
Question a1 120 Points]: Consider the following code fragment. Assume this program is executed on a 5 -stage pipelined Mips processor with the longest stage pipeline equals to 200 ps. Predict the branch instruction as always taken. Moreover, assume that the conditional branch is always resolved at the decode stage. Answer the following questions. Uregistex initialization $1=0,$2=0,$3=0, and $4=400. Loop: 1 w $1,0($4) 1w $2,400($4) add $3,$1,$2 an $3,0($4) addi $4,$4,4 bnez $4, Loop Initialiy, 1. 15 Points| List all of the data dependences in the first iteration of the code above by filing the table below. You can refer to the instructions above as x1,12,13,14,15, and x. 2. [4 Points] Calculate the CPI and the execution time of the code above when the processor does not implement data forwarding. 3. [6 Points] Calculate the CPI and the execution time of the code above when the processor implements data forwarding. Calculate the speedup gain due to forwarding. 4. [5 Points] Assume you are asked to run the code above on another machine that relies on the compiler to order the instructions or insert nop instructions, such that, the dependent instructions are correctly executed. Reorder the instructions in the code above and/or insert nop instructions, such that, it runs on this machine with minimal latencies. Then, compute the average CPI after the reordering

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

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago