Professional Documents
Culture Documents
Advanced Computer Systems Architecture Lect-6
Advanced Computer Systems Architecture Lect-6
Architecture
Course Teacher: Dr.-Ing. Shehzad Hasan
CIS, NED University
Lecture # 6
Unpack
Unpack Signs Exponents Significands
cout cin
Control Add
& sign
logic
Normalize
Round and
Pack selective complement
Division
( s1 b e1) / ( s2 b e2) = ( s1 / s2 ) b e1-e2
Adjust
Exponent Normalize
Round
Adjust
Normalize
Exponent
Pack
Product
–1
3. Round toward zero (inward)
4. Round toward + (upward)
–2
5. Round toward – (downward)
–3
–4
• Multiply
– 0 10000100 0100…. 00
– 1 00111100 1100…. 00
Distributive law a (b + c) = (a b) + (a c)
WB I1 I2 I3 I4 I5 I6
M I1 I2 I3 I4 I5 I6 I7
Stages
EX I1 I2 I3 I4 I5 I6 I7 I8
ID I1 I2 I3 I4 I5 I6 I7 I8 I9
IF I1 I2 I3 I4 I5 I6 I7 I8 I9 I10
1 2 3 4 5 6 7 8 9 10
Clock Cycles
Stages
EX I1 I2 I3 I4 I5 I6 I7 I8
ID I1 I2 I3 I4 I5 I6 I7 I8 I9
IF I1 I2 I3 I4 I5 I6 I7 I8 I9 I10
1 2 3 4 5 6 7 8 9 10
Clock Cycles
Instruction Latency (the time it takes to complete an instruction)
= 5 cycles
Instruction Throughput (for 10 cycles)
=6/10 IPC = 0.6 IPC
Speedup of k-stage pipeline for a program having n instructions
𝑛𝑘𝜏 𝑛𝑘
𝑆𝑝 = =
(𝑘 + 𝑛 − 1)𝜏 𝑘 − 1 + 𝑛
A resource conflict is indicated in CC5. That is, two different instructions attempt
to use the same hardware in the same cycle.
This can be averted by ensuring uniformity: make all instructions pass through all
the stages in the same order.
As a consequence, some instructions will do nothing (accomplished through
disabling corresponding control signals) in some stages
No instruction is initiated on clock cycle 4 (which normally would initiate instruction i+3).
Because the instruction being fetched is stalled, all other instructions in the pipeline
before the stalled instruction can proceed normally.
In the above figure it is assumed that instructions i+1 and i+2 are not memory references
4) The XOR instruction also operates properly because its register read occurs in clock
cycle 6, after the register write.