Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your program consists of arithmetic instructions, load / store instructions, branch instructions, and unconditional jumps in the given ratio: 5 0 % , 2 5

Your program consists of arithmetic instructions, load/store instructions, branch instructions, and unconditional jumps in the given ratio: 50%,25%,20%, and 5%. For the branch instructions, assume that 70% of all branches are Taken. Assume CPI=1 for arithmetic instructions, CPI=3 for Load/Store, base CPI=1 for branch instructions, and CPI=1 for unconditional jumps.
Your processor can support 3 control hazard strategies, and you are supposed to choose one for the given program:
1. Strategy 1: Unconditional stall Stalls pipeline for 1 cycle until the branch is resolved.
2. Strategy 2: Branch prediction Predicts Taken by default; Stall pipeline for 2 cycles if the branch is Not Taken.
3. Strategy 3: Branch prediction Predicts Not Taken by default; Stall pipeline for 1 cycle if the branch is Taken.
Which strategy would result in the fastest runs for the given program?
Hint: Calculate the Global CPI for each strategy. SHOW YOUR WORK.Q2(10 pts)
Your program consists of arithmetic instructions, load/store instructions, branch instructions, and
unconditional jumps in the given ratio: 50%,25%,20%, and 5%. For the branch instructions, assume
that 70% of all branches are Taken. Assume CPI=1 for arithmetic instructions, CPI=3 for Load/Store,
base CPI =1 for branch instructions, and CPI =1 for unconditional jumps.
Your processor can support 3 control hazard strategies, and you are supposed to choose one for the
given program:
Strategy 1: Unconditional stall - Stalls pipeline for 1 cycle until the branch is resolved.
Strategy 2: Branch prediction - Predicts Taken by default; Stall pipeline for 2 cycles if the branch
is Not Taken.
Strategy 3: Branch prediction - Predicts Not Taken by default; Stall pipeline for 1 cycle if the
branch is Taken.
Which strategy would result in the fastest runs for the given program?
Hint: Calculate the Global CPI for each strategy. SHOW YOUR WORK.
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

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

Find dy/dx if x = te, y = 2t2 +1

Answered: 1 week ago

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago