Professional Documents
Culture Documents
Jordi Cortadella (UPC, Barcelona, Spain), Mike Kishinevsky (Intel Strategic CAD Labs, Oregon), Alex Kondratyev (Berkeley Cadence Research Labs, CA), Luciano Lavagno (Politecnico di Torino, Italy ), Alex Yakovlev (University of Newcastle, UK)
Outline
Part 1: The Petrify Method
Overview of the Petrify synthesis flow Specification: Signal Tranistion Graphs State graph and next-state functions State encoding Implementation conditions Speed-independent circuits
Complex gates C-element architecture
Design flow
Specification (STG)
Reachability analysis
State Graph
State encoding
SG with CSC
Boolean minimization
Next-state functions
Logic decomposition
Decomposed functions
Technology mapping
Gate netlist
ASYNC2003 - Tutorial on Petrify Method and Tool 3
Specification
x y
z
x
y z z+ x-
x+
y+
y-
z-
Token flow
x y z z+ x+ y+ yxz-
State graph
xyz 000
x+ z+
100
z+ x+ y+ y-
xzyx-
y+
101
y+
110 111
xz+
001
y+
011
z-
010
ASYNC2003 - Tutorial on Petrify Method and Tool 6
Next-state functions
xyz 000
x+
x z (x y)
z+ x-
100
y+
y zx
z x y z
101
y+
110 111
xz+
y-
001
y+
011
z-
010
ASYNC2003 - Tutorial on Petrify Method and Tool 7
Gate netlist
x z (x y)
x y
y zx
z x y z
Design flow
Specification (STG)
Reachability analysis
State Graph
State encoding
SG with CSC
Boolean minimization
Next-state functions
Logic decomposition
Decomposed functions
Technology mapping
Gate netlist
ASYNC2003 - Tutorial on Petrify Method and Tool 9
VME bus
Bus
DSr Data Transceiver LDS
LDTACK D DSr DSw DTACK DTACK LDS VME Bus Controller LDTACK D
Device
Read Cycle
10
LDS+
LDTACK+
D+
DTACK+
DSr-
D-
LDTACK-
LDS-
LDS
LDTACK
11
LDTACK-
LDS-
LDTACK-
LDS-
LDTACK-
LDS-
Circuit synthesis
Goal:
Derive a hazard-free circuit under a given delay model and mode of operation
15
Speed independence
Delay model
Unbounded gate / environment delays Certain wire delays shorter than certain paths in the circuit
16
Design flow
Specification (STG)
Reachability analysis
State Graph
State encoding
SG with CSC
Boolean minimization
Next-state functions
Logic decomposition
Decomposed functions
Technology mapping
Gate netlist
ASYNC2003 - Tutorial on Petrify Method and Tool 17
LDS+
LDTACK+
D+
DTACK+
DSr-
D-
LDTACK-
LDS-
LDS
LDTACK
18
DTACK-
LDTACKDSr+
LDTACKDTACK-
LDTACK-
LDTACK+
LDSDSr+
LDSDTACK-
LDS-
D+
DDTACK+ DSr-
19
DSr+
DTACK-
LDTACKDSr+
LDTACKDTACK-
LDTACK-
10010
LDTACK+
01100
LDS-
LDSDSr+
LDSDTACK-
10110
D+
01110
10110
00110
D-
DTACK+
DSr-
20
QR (LDS-)
LDS-
LDS-
LDS-
QR (LDS+)
ER (LDS-)
21
Next-state function
01
LDS+
00
LDSLDS-
11
10110
LDS-
10
10110
22
LDS = 1 10
D LDTACK DTACK DSr
00
01
11
00
01
11
10
00
00
01
01
1 0
11 10
11 10
- 0/1?
23
Design flow
Specification (STG)
Reachability analysis
State Graph
State encoding
SG with CSC
Boolean minimization
Next-state functions
Logic decomposition
Decomposed functions
Technology mapping
Gate netlist
ASYNC2003 - Tutorial on Petrify Method and Tool 24
Concurrency reduction
DSr+
LDS+ DSr+
LDSDSr+
LDS-
LDS-
10110 10110
25
Concurrency reduction
DSr+
DTACK-
LDS+
LDTACK+
D+
DTACK+
DSr-
D-
LDTACK-
LDS-
26
LDS+
LDTACK-
LDTACK+
LDS-
10110 10110
27
Signal Insertion
CSC+
LDS+
LDTACK-
LDTACK+
LDS-
101101 101100
D-
DSr-
CSC-
28
Design flow
Specification (STG)
Reachability analysis
State Graph
State encoding
SG with CSC
Boolean minimization
Next-state functions
Logic decomposition
Decomposed functions
Technology mapping
Gate netlist
ASYNC2003 - Tutorial on Petrify Method and Tool 29
Complex-gate implementation
LDS D csc DTACK D D LDTACKcsc csc DSr (csc LDTACK )
ASYNC2003 - Tutorial on Petrify Method and Tool 30
Implementation conditions
Consistency
Rising and falling transitions of each signal alternate in any trace
Persistency
No event can be disabled by another event (unless they are both inputs)
ASYNC2003 - Tutorial on Petrify Method and Tool 31
Implementation conditions
Consistency + CSC + persistency
There exists a speed-independent circuit that implements the behavior of the STG
(under the assumption that ay Boolean function can be implemented with one complex gate)
ASYNC2003 - Tutorial on Petrify Method and Tool 32
Persistency
100
b+ a c b is this a pulse ? Speed independence glitch-free output behavior under any delay
ASYNC2003 - Tutorial on Petrify Method and Tool 33
a-
000
c+
001
b+
a c
a+
b+ a-
0000
a+
1000
b+
1100
a-
c+
d+ a+ b-
0100
c+
0110
d+ d-
0111
a+
1111
ba-
1011
c- a-
c-
ad-
c-
0011
1001
0001
ab cd
00 01 00 01 11 10
0000
a+
0 0 1
0 1
1000
b+
1100
a-
0100
ER(d+)
c+
11 10
1 1
0110
d+ d-
0111
a+
1111
ba-
1011
c- a-
c-
0011
ER(d-)
1001
0001
ab cd
00 01 00 01 11 10
0000
a+
0 0 1
0 1
1000
b+
1100
a-
0100
c+
11 10
1 1
0110
d+ d-
0111
a+
1111
d ad ac
Complex gate
ba-
1011
c- a-
c-
0011
1001
0001
S+ z+ S- R+ z- R-
S (set) and R (reset) must be mutually exclusive S must cover ER(z+) and must not intersect ER(z-) QR(z-) R must cover ER(z-) and must not intersect ER(z+) QR(z+)
37
ab cd
00 01 00 01 11 10
0000
a+
0 0 1
0 1
1000
b+
1100
a-
0100
c+
11 10
1 1
0110
d+ d-
0111
a+
1111
b-
S R
ac
a-
1011
c- a-
c-
0011
1001
0001
0000
a+
1000
b+
1100
but ...
c
S R
a-
0100
c+
0110
d+ d-
0111
a+
1111
b-
ac
a-
1011
c- a-
c-
0011
1001
0001
Assume that R=ac has an unbounded delay Starting from state 0000 (R=1 and S=0):
a+ ; R- ; b+ ; a- ; c+ ; S+ ; d+ ; R+ disabled (potential glitch)
0000
a+
1000
b+
1100
a-
0100
c+
0110
d+ d-
0111
a+
1111
b-
S R
ac
a-
1011
c- a-
c-
0011
1001
0001
ab cd
00 01 00 01 11 10
0000
a+
0 0 1
0 1
1000
b+
1100
a-
0100
c+
11 10
1 1
0110
d+ d-
0111
a+
1111
b-
S R
ab c
a-
1011
c- a-
c-
0011
1001
0001
Monotonic covers
C-based implementations
c
S R
ab c
c
c b a
weak
d a b
weak
d a
Speed-independent implementations
Implementation conditions
Consistency Complete state coding Persistency
Circuit architectures
Complex (hazard-free) gates C elements with monotonic covers ...
ASYNC2003 - Tutorial on Petrify Method and Tool 43
Synthesis exercise
yz1001 yw0001 1011 w+
y+
1000
z-
w-
w+
w- z0000
x+
0011 x0111
1010
w- y+ 0010
0101 x+ z0100 z+
y+
x+
z+
x-
x+ y+ 0110
Derive circuits for signals x and z (complex gates and monotonic covers)
ASYNC2003 - Tutorial on Petrify Method and Tool 44
Synthesis exercise
wx
z00 01 11 10
1001
yw0001
1011 w+
yz
00 01
1
1 0 1
1 1 0 1
y+
1010
1000
w- z0000
x+
0011 x0111
0
0 0
w- y+ 0010
0101 x+ z0100 z+
11 10
x+ y+ 0110
Signal x
ASYNC2003 - Tutorial on Petrify Method and Tool 45
Synthesis exercise
wx
z00 01 11 10
1001
yw0001
1011 w+
yz
00 01
0 0 1 0
0 0
y+
1010
1000
w- z0000
x+
0011 x0111
0 1
0
w- y+ 0010
0101 x+ z0100 z+
11 10
1
1
x+ y+ 0110
Signal z
ASYNC2003 - Tutorial on Petrify Method and Tool 46
filter
47
+ IN
Rin Ain
Rx
x
Ax Ry
y
Ay Ra Aa
OUT
control
Rout Aout
x and y are level-sensitive latches (transparent when R=1) + is a bundled-data adder (matched delay between Ra and Aa) Rin indicates the validity of IN After Ain+ the environment is allowed to change IN (Rout,Aout) control a level-sensitive latch at the output
ASYNC2003 - Tutorial on Petrify Method and Tool 48
x
Ax Ry
y
Ay Ra
+
Aa
OUT
Rout Aout
Rin+
Ain+
Rin-
Ain-
Aa-
Ain
Aout Rout
Rin
Rin+
Rx+
Ax+
Ain+
Rin-
RxAx-
Ain-
z Ain Rin
Aout C Rout
Rin+
AinRyA a+ zRout+
R x+
A x+
A aRinAout+
R aAin+ z+
AyR a+
A xRout-
R xAout-
Ay+ Ry+
51
Following slides borrowed from Ran Ginosar, Technion (VLSI Architectures course) with thanks
52
Generalized C Element
a b c
c b
+ C -
reset z
c c b a z b a b
reset
set z
c b a
a z
b a
set
set
reset
DYNAMIC (Pseudostatic)
STATIC
STG Rules
Any STG:
Input free-choiceOnly inputs may control the choice) BoundedMaximum k (given bound) token per place Livenessevery signal transition can be activated
Synthesizable STG:
Complete state codingDifferent markings must represent different states
ASYNC2003 - Tutorial on Petrify Method and Tool 54
req ack
REQ ACK
55
1-Bounded (Safety)
STG is safe if no place or arc can ever contain more than one token Often caused by one-sided dependency
req+ ack-
ack+ req-
REQ+ ACK-
ACK+ REQ-
STG is not safe: If left cycle goes fast and right cycle lags, then arc ack+ REQ+ accumulates tokens. (REQ+ depends on both ack+ and ACK- ) Possible solution: stop left cycle by right cycle
ASYNC2003 - Tutorial on Petrify Method and Tool 56
Liveness
STG is live if from every reachable marking, every transition can eventually be fired
reset-
reset_ok-
req+ ack-
ack+ req-
The STG is not live: Transitions reset, reset_ok cannot be repeated. But non-liveness is useful for initialization
ASYNC2003 - Tutorial on Petrify Method and Tool 57
a+
a+
a-
a-
58
Persistency
STG is persistent if for all non-input transitions once enabled the transition cannot be disabled by another transitions. Non-persistency may be caused by arbitration or dynamic conflict relations STG must have places
ackreqreq+ ack+ REQ+ ACKACK+ REQ-
STG is not persistent: there is a place between req+ andack+ in which a token is needed in order to fire REQ+ . So there is some sort of nondeterminism either REQ+ manages to fire before ack+ or not Possible solution: introduce proper dependence of the left cylce on the right one (e.g., an arc from req+ to REQ+, and from REQ+ to ack+)
ASYNC2003 - Tutorial on Petrify Method and Tool 59
ack0100
0000
req+ ack+
1000
1010
REQ+ ACK1000
ACK+
1011
reqcd\ab 00 00 01 11 10
REQ1001
1100
01
11
10
Disaster!
60
ack-
req+
10000
10100
REQ+
ACK+
x-
x+
req-
ack+
11001 10001
ACK-
REQ-
61
A faster STG?
Does it need an extra variable?
req+ REQ+
ack+
ACK+
req-
REQ-
ack-
ACK62
Drawn by draw_astg
64
The SG
req,ack,REQ,ACK: 0000 r+ 1000 R+ a+ 1100 1010 R+ ra+ 0100 1110 A+ R+ ar0110 1111 A+ ar0111 Ra0011 0101 Rr+ a1011 0001 RAa+ r+ 1111 1001 RAra+ 0111 1101 ARra0101 Aa-
A+
1011 Ra+ 1001 RAa+ 1101 1000 Ara+ 1100 Ar0100 a-
65
The SG
req,ack,REQ,ACK: 0000 r+ 1000 R+ a+ 1100 1010 R+ ra+ 0100 1110 A+ R+ ar0110 1111 A+ ar0111 Ra0011 0101 Rr+ a1011 0001 RAa+ r+ 1111 1001 RAra+ 0111 1101 ARra0101 Aa-
A+
1011 Ra+ 1001 Ra+ 1101 Ar1100 Ar0100 R+ a-
A1000 R+ a+ R+
67
68
Rearranged STG
req+ REQ+ ACK+ c2REQACKc2+ c0+
70
71
Technology Mapping
INORDER = r A a R csc0 csc1 csc2; OUTORDER = [a] [R] [csc0] [csc1] [csc2]; [0] = R'; [1] = [0]' A' + csc2'; [a] = a csc0' + [1]; [3] = csc1'; [4] = csc0' csc2' [3]'; [5] = [4]' (csc1' + R'); [R] = [5]'; [7] = (csc2' + a') (csc0' + A'); [8] = csc0'; [csc0] = [8]' csc1' + [7]'; [csc1] = A' (csc0 + csc1); [11] = R'; [12] = csc0' ([11]' + csc1'); [csc2] = [12] (r' + csc2) + r' csc2;
# # # # # # # # # # # # # # gate gate gate gate gate gate gate gate gate gate gate gate gate gate inv: combinational oai12: combinational sr_nor: asynch inv: combinational nor3: combinational aoi12: combinational inv: combinational aoi22: combinational inv: combinational oai12: combinational rs_nor: asynch inv: combinational aoi12: combinational c_element1:asynch
72
onto gC
onto gC onto gC onto gC onto gC
73
Petrify Environment
write_sg
STG
petrify
lib
SG
draw_astg
EQN
ps
74
Petrify
Unix (Linux) command line tool petrify h for help (flags etc.) petrify cg for complex gates petrify gc for generalized C-elements petrify tm for tech mapping draw_astg to draw write_sg to create state graphs Documented on line, including tutorial
75
References
See the attached Practical Exercise manual for various design examples using Petrify commands Additional references:
Petrify and all documentation can be downloaded from: http://www.lsi.upc.es/~jordic/petrify/petrify.html J. Cortadella, M. Kishinevsky, A. Kondratyev, L. Lavagno and A. Yakovlev, Logic Synthesis of Asynchronous Controllers and Interfaces, Springer, Berlin, 2002, ISBN3-540-43152-7
76