470 HW2 W14 Ans
470 HW2 W14 Ans
470 HW2 W14 Ans
1)
a) Main ones: There is a free reservation station. (You might also want to note that
the instruction needs to have been fetched.)
b) Main ones: There is a free reservation station; any branch in front of the
instruction has been completed.
c) Main ones: All of its arguments have been gotten, an execution unit is
available, gets selected (others might also be wanting the same execution unit
d) Main ones: Execution is completed, CDB is available.
2)
Consider 100 instructions. Of those 100 instructions, 4 will be mispredicted
branches. There is no reason to suspect bias in the distribution of branches to pipelines,
so half will squash 6 instructions, half will squash 7. Thus you have 204 "slots"
(4*6.5+100) utilized to execute these 100 instructions. 126 slots take up 63 cycles. So
IPC is 100/63=1.59. (CPI is 0.63).
3) No answer provided. But so you know how it was graded the grading guidelines are
(1 point each)
Say something about all listed processors
Supply a timeline that has at least 4 relevant points
Scoreboarding is distinguished from Tomasulo’s
Overall is readable and on-point.
4a)
P1=MEM[R2+0]
P2=MEM[R2+4]
Branch done if(P2==0)
P3=P1+R3
Branch start
P4=MEM[P2+0]
P5=MEM[P2+4]
Branch done if(P5==0)
P6=P4+P3
Branch start
P7=MEM[P5+0]
P8=MEM[P5+4]
Branch done if(P8==0)
Halt
4b)
It appears to be walking a linked list which includes a data element (MEM[R2+0]) as
well as a pointer to the next element in the list. It sums up all the data elements but the
last one.
5)
Instruction FD X W
A 1 3 4
B 4 9 10
C 10 12 13
D 13 15 16
E 16 21 22
F 22 24 25
G 25 27 28
H 28 29 30
I 30 32 33
J 33 43 44
K 44 45 46
6a)
A(2)
B(5)
C(2)
F(2) D(2)
E(5)
G(2)
J(10)
H(1) K(1)
Instruction FD Start X End X W
A 1 2 3 4
D 1 2 3 4
I 1 2 3 4
B 4 5 9 10
E 4 5 9 10
F 4 5 6 7
G 7 8 9 10
C 10 11 12 13
H 10 11 11 12
J 10 11 20 21
K 21 22 22 23