Unit 3 Problems
Unit 3 Problems
Problem 1
Consider the following code.
DIV R2 , R5 , R8
SUB R9 , R2 , R7
ADD R5 , R14, R6
MUL R11, R9 , R5
BEQ R10, #10 , R12
OR R8 , R15, R2
The time delay for the 4 segment in the pipeline are as follows t1= 50
ns, t2 = 30 ns, t3 = 95 ns and t4 = 45 ns. The interface register delay
time tr = 5 ns
(a) How long would it take to add 100 pairs of numbers in the pipeline?
(b)How can we reduce the total time to about one half of the time
calculate in part(a)
Problem 3
Ans:
clock cycle =95 + 5 = 100 ns
for n = 100, k = 4, tp = 100 ns
time to add 100 number = (k+n-1)tp = (4+99) x 100 = 10,300 ns = 10.3 s
(b) Divide the segment 3 into two segment of 50 + 5 = 55 ns
and 45 + 5 = 50 ns
This makes the tp = 55 ns , k = 4
Therefore (k+n-1) tp = (5+99) x 55 = 5720 = 5.72 ns
Problem 4
Assume that individual stages of the data path have the following
latencies:
IF ID EX MEM WB
• If we can split one stage of the pipelined datapath into two new
stages, each with half the latency of the original stage, which stage
would you split and identify the new clock cycle time of the
processor?
Problem 6
Ans: The stage with longest processing time can be chosen. ID stage
and next highest processing time 350ps
Problem 9
• What is the longest chain of dependent operations (including the
name dependencies) in the following program?
LD r7,(r8)
SUB r10,r11,r1
MUL r13,r7,r11
ST (r9),r13
ADD r13,r2,r1
LD r5,(r6)
SUB r3,r4,r5.
Problem 9
• Ans:
LD r7,(r8)
MUL r13,r7,r11
ST (r9),r13
ADD r13,r2,r1
Quiz Problem 1