Question: ( 1 5 points ) [ Pipeline Processing Time ] In this exercise, we examine how pipelining affects the clock cycle time of the processor.
pointsPipeline Processing Time
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 data path have the following
latencies, and the instructions are broken out by percentage of the type:
a What is the clock cycle time in a pipelined and nonpipelined processor?
b What is the total latency of an LW instruction in a pipelined and nonpipelined processor?
c If we can split one stage of the pipelined data path into two new stages, each with half the
latency of the original stage, which stage would you split and what is the new clock cycle
time of the processor?
d Assuming there are no stalls or hazards, what is the utilization of the data memory?
e Assuming there are no stalls or hazards, what is the utilization of the writeregister port of
the "Register Library" unit?
f If we split one stage of the data path into two new stages, each with half the latency of the
original stage, which stage would you split and what is the new clock cycle time of the
pipelined and nonpipelined processor? What would be the speed up of the pipelined and
nonpipelined processor when this new data path is implemented?
g If the control system has dedicated ALUs and with the new data path included, an
alternative general ALU is available that will run additions and subtractions in half the
time ex: ps vsps but nonaddition ALU operations now take a stall as
processing time overhead. What would be the total speedup with all improvements of the
pipelined system if of ALU operations were additions?
h What alternatives would there be on how to use this new ALU on the nonpipelined
system and how would it affect it
pointsPipeline Design
What is the minimum number of cycles needed to completely execute n instructions on a
CPU with a k stage pipeline? Justify your formula.
pointsData Hazards
Assume that register $s is initialized to and $s is initialized to Suppose you
executed the code below on the pipeline from class stages IF ID EX MEM, WB that does
not handle data hazards ie the programmer is responsible for addressing data hazards by
inserting NOP instructions where necessary
addi $s $s
add $s $s $s
addi $s $s
add $s $s $s
a What would the final values of registers $s $s and $s be if run as is
b Rewrite the code segment and add NOP instructions so that it will run correctly on a
pipeline that does not handle data hazards.
pointsHazard Control Costs
Consider a version of the pipeline that does not handle data hazards ie the
programmercompiler is responsible for addressing data hazards by inserting NOP
instructions where necessary Suppose that after optimization a typical ninstruction
program requires an additional n NOP instructions to correctly handle data hazards.
a Suppose that the cycle time of this pipeline without forwarding is ps Suppose also
that adding forwarding hardware will reduce the number of NOPs from n to n but
increase the cycle time to ps What is the speedup of this new pipeline compared to
the one without forwarding?
b Different programs will require different amounts of NOPs. How many NOPs as a
percentage of code instructions can remain in the typical program before that program
runs slower on the pipeline with forwarding?
c Now instead of additional NOPs let that additional amount be unknown x What is
the resulting formula for determining the maximum number of NOP instructions before
the pipeline is slower than the nonpipelined machine?
d Can a program with only n NOPs possibly run faster on the pipeline with
forwarding? Explain why or why not.
e At minimum, how many NOPs as a percentage of code instructions must a program
have before it can possibly run faster on the pipeline with forwarding?
pointsStructural Hazards
Consider the fragment of MIPS assembly below:
sw $s$s
lw $s$s
sub $s $s $s
beq $s $zero, label
add $s $s $s
sub $s $s $s
Suppose we modify the pipeline so that it has only one memory that handles both
instructions and data In this case, there will be a structural hazard every time a program
needs to fetch an instruction during the same cycle in which another instruction accesses
data.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
