You are on page 1of 7

Floating Pt. Mult.

Pipeline
Exponent add S1

Partial products
S2

Accumulator
S3

Normalize
S4

S5
Round

Reservation Table for Multiplier


1 2 3 4 5 6
S1 X

S2
X X
S3
X X

S4 X

S5 X

1
Construction of State Diagram
l 1. Create set of States Q. Initialize Q= q0 where q0= C (collision
vector)
l 2. Take a state q in Q, for each 0 in q find the state q’obtained if
new task is initiated when corresponding 0 is output
l For each bit i in q: if i=0 then

• shift q left i times to get q*


• compute next state q’= q* + C (bitwise OR)
l 3. If q’is new state then add q’to Q
l 4. Draw edge labelled with the latency (i in step 2) from q to q’
l 5. Add edge from q’to q0 labelled n
l goto to step 1. If no state can be found in 1 then terminate

Analysis of State Diagram


l A simple strategy is to use greedy approach:
l at each state send a task at the earliest possible time

l we perform an analysis based on this greedy strategy


l Definitions:
l average latency of a cycle is sum of latencies divided by number of

states in the cycle


l note that maximum throughput is achieved by a cycle with

Minimum Average Latency (MAL)


l simple cycles are cycles which do not have repeated states

l simple cycle is greedy cycle if each latency in cycle is minimal

latency from each state in the cycle.


l Performance of the pipeline using greedy strategy can be analyzed by
determining all greedy cycles and picking the one with minimum
latency.

2
STATE DIAGRAMS

Example 1: CV = 10010110 {c1c2… … … … .c7,c8}


Initial State
8
10010110
8 3 8
8 5
2
11011110 10110110 8
2
3 5
3
0101100 11110110 11010110
+ 1001011 5
3
1101111

Cycles in Ex 1

Cycle Avg Latency


(2,3,8) 13/3 =4.3
(2,3,5,8) 18/4 = 4.5
(2,8) 10/2 = 5.0
(3,5,3,2)* 13/4 = 3.25

3
STATE DIAGRAMS
CV = 100011010
Example 2:
Initial State {c1c2… … … … .c7,c8,c9}
8
100011010 7,>= 9
7, >=9 7,>=9 2 7,>=9
3
111011010 101111010

3 4 2

110111010 111111010

Some Simple Cycles in Ex .2

(7) 7.0
(3,7) 10/2=5
(3,4)* 7/2 = 3.5
(2,2,7)* 11/3 = 3.67
(3,4,7) 14/3 = 4.67

3 <= MAL <= 4


MAL = 3.5

4
State Transitions with Shift Register 23

Initial collision vector

CONTROL ALGO.

Begin SR = 0000..0
goto*
1. Grant request during cycle in which Output from SR = 0.
Deny if SRout = 1 (after shifting Srold)& Hold request
2. If granted then Sr = Srold + CV
3. If no request granted then
SR := Srold
* Next Cycle Shift Left SR
Goto 1

5
Dual Function in Pipe Controller
CV. CV.
MULT,MULT MULT,ADD

GATE GATE
OR
MULT ADD
GRANT 0
GRANTED MULT (if 0) SR. For Mult GRANTED
ADD,MULT ADD,ADD

GATE GATE
OR
GRANT
SR for ADD 0
ADD (If 0)

Example

0 1 2 3 4
S1 A B A B
S2 A B
S3 B AB A

B Cross Collision Vectors


after VAA = 01100 VAB = 11010
A
VBA = 01010 VBB = 01100

MA ( 01100,01010) MB =(11010,01100)

6
State Diagram
Initial
with A 0 B-5+
A
Initial with B
B 0 B-4
01100
A-5+ 11010
01010 B-4
01100
A-5
B-3
A-1 11010 B-4 B-1
11110
11100 B-1 A-3
A-4 11100
B-3
11100 A-4 A-3
11110 11100
01010

You might also like