Download presentation
Presentation is loading. Please wait.
1
1 Petrify: Method and Tool for Synthesis of Asynchronous Controllers and Interfaces 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)
2
ASYNC2003 - Tutorial on Petrify Method and Tool2 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
3
ASYNC2003 - Tutorial on Petrify Method and Tool3 Specification (STG) State Graph SG with CSC Next-state functions Decomposed functions Gate netlist Reachability analysis State encoding Boolean minimization Logic decomposition Technology mapping Design flow
4
ASYNC2003 - Tutorial on Petrify Method and Tool4 x y z x+ x- y+ y- z+ z- Signal Transition Graph (STG) x y z Specification
5
ASYNC2003 - Tutorial on Petrify Method and Tool5 x y z x+ x- y+ y- z+ z- Token flow
6
ASYNC2003 - Tutorial on Petrify Method and Tool6 x+ x- y+ y- z+ z- xyz 000 x+ 100 y+ z+ y+ 101 110 111 x- 001 011 y+ z- 010 y- State graph
7
ASYNC2003 - Tutorial on Petrify Method and Tool7 Next-state functions xyz 000 x+ 100 y+ z+ y+ 101 110 111 x- 001 011 y+ z- 010 y-
8
ASYNC2003 - Tutorial on Petrify Method and Tool8 x z y Gate netlist
9
ASYNC2003 - Tutorial on Petrify Method and Tool9 Specification (STG) State Graph SG with CSC Next-state functions Decomposed functions Gate netlist Reachability analysis State encoding Boolean minimization Logic decomposition Technology mapping Design flow
10
ASYNC2003 - Tutorial on Petrify Method and Tool10 VME bus Device LDS LDTACK D DSr DSw DTACK VME Bus Controller Data Transceiver Bus DSr LDS LDTACK D DTACK Read Cycle
11
ASYNC2003 - Tutorial on Petrify Method and Tool11 STG for the READ cycle LDS+LDTACK+D+DTACK+DSr-D- DTACK- LDS-LDTACK- DSr+ LDS LDTACK D DSr DTACK VME Bus Controller
12
ASYNC2003 - Tutorial on Petrify Method and Tool12 Choice: Read and Write cycles DSr+ LDS+ LDTACK+ D+ DTACK+ DSr- D- LDS- LDTACK-DTACK- DSw+ D+ LDS+ LDTACK+ D- DTACK+ DSw- LDS- LDTACK-DTACK-
13
ASYNC2003 - Tutorial on Petrify Method and Tool13 Choice: Read and Write cycles DTACK- DSr+ LDS+ LDTACK+ D+ DTACK+ DSr- D- LDS- LDTACK- DSw+ D+ LDS+ LDTACK+ D- DTACK+ DSw- LDS- LDTACK-DTACK-
14
ASYNC2003 - Tutorial on Petrify Method and Tool14 Choice: Read and Write cycles DTACK- DSr+ LDS+ LDTACK+ D+ DTACK+ DSr- D- LDS- LDTACK- DSw+ D+ LDS+ LDTACK+ D- DTACK+ DSw- LDS- LDTACK-DTACK-
15
ASYNC2003 - Tutorial on Petrify Method and Tool15 Circuit synthesis Goal: –Derive a hazard-free circuit under a given delay model and mode of operation
16
ASYNC2003 - Tutorial on Petrify Method and Tool16 Speed independence Delay model –Unbounded gate / environment delays –Certain wire delays shorter than certain paths in the circuit Conditions for implementability: –Consistency –Complete State Coding –Persistency
17
ASYNC2003 - Tutorial on Petrify Method and Tool17 Specification (STG) State Graph SG with CSC Next-state functions Decomposed functions Gate netlist Reachability analysis State encoding Boolean minimization Logic decomposition Technology mapping Design flow
18
ASYNC2003 - Tutorial on Petrify Method and Tool18 STG for the READ cycle LDS+LDTACK+D+DTACK+DSr-D- DTACK- LDS-LDTACK- DSr+ LDS LDTACK D DSr DTACK VME Bus Controller
19
ASYNC2003 - Tutorial on Petrify Method and Tool19 Binary encoding of signals DSr+ DTACK- LDS- LDTACK- D- DSr-DTACK+ D+ LDTACK+ LDS+
20
ASYNC2003 - Tutorial on Petrify Method and Tool20 Binary encoding of signals DSr+ DTACK- LDS- LDTACK- D- DSr-DTACK+ D+ LDTACK+ LDS+ 10000 10010 10110 0111001110 01100 00110 10110 (DSr, DTACK, LDTACK, LDS, D)
21
ASYNC2003 - Tutorial on Petrify Method and Tool21 QR (LDS+) QR (LDS-) Excitation / Quiescent Regions ER (LDS+) ER (LDS-) LDS- LDS+ LDS-
22
ASYNC2003 - Tutorial on Petrify Method and Tool22 Next-state function 0 1 LDS- LDS+ LDS- 1 0 0 0 1 1 10110
23
ASYNC2003 - Tutorial on Petrify Method and Tool23 Karnaugh map for LDS DTACK DSr D LDTACK 00011110 00 01 11 10 DTACK DSr D LDTACK 00011110 00 01 11 10 LDS = 0 LDS = 1 01-0 000000/1? 1 111 - - - --- ---- - ---- ---
24
ASYNC2003 - Tutorial on Petrify Method and Tool24 Specification (STG) State Graph SG with CSC Next-state functions Decomposed functions Gate netlist Reachability analysis State encoding Boolean minimization Logic decomposition Technology mapping Design flow
25
ASYNC2003 - Tutorial on Petrify Method and Tool25 Concurrency reduction LDS- LDS+ LDS- 10110 DSr+
26
ASYNC2003 - Tutorial on Petrify Method and Tool26 Concurrency reduction LDS+LDTACK+D+DTACK+DSr-D- DTACK- LDS-LDTACK- DSr+
27
ASYNC2003 - Tutorial on Petrify Method and Tool27 State encoding conflicts LDS- LDTACK- LDTACK+ LDS+ 10110
28
ASYNC2003 - Tutorial on Petrify Method and Tool28 Signal Insertion LDS- LDTACK- D- DSr- LDTACK+ LDS+ CSC- CSC+ 101101 101100
29
ASYNC2003 - Tutorial on Petrify Method and Tool29 Specification (STG) State Graph SG with CSC Next-state functions Decomposed functions Gate netlist Reachability analysis State encoding Boolean minimization Logic decomposition Technology mapping Design flow
30
ASYNC2003 - Tutorial on Petrify Method and Tool30 Complex-gate implementation
31
ASYNC2003 - Tutorial on Petrify Method and Tool31 Implementation conditions Consistency –Rising and falling transitions of each signal alternate in any trace Complete state coding (CSC) –Next-state functions correctly defined Persistency –No event can be disabled by another event (unless they are both inputs)
32
ASYNC2003 - Tutorial on Petrify Method and Tool32 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)
33
ASYNC2003 - Tutorial on Petrify Method and Tool33 Persistency 100000001 a- c+ b+b+ b+b+ a c b a c b is this a pulse ? Speed independence glitch-free output behavior under any delay
34
a+ b+ c+ d+ a- b- d- a+ c-a- 0000 1000 1100 0100 0110 0111 1111 10111011 00111001 0001 a+ b+ c+ a- b- c- a+ c- a- d- d+
35
0000 1000 1100 0100 0110 0111 1111 10111011 00111001 0001 a+ b+ c+ a- b- c- a+ c- a- d- d+ ab cd 00011110 00 01 11 10 1 11 11 1 0 0000 ER(d+) ER(d-)
36
ab cd 00011110 00 01 11 10 1 11 11 1 0 0000 0000 1000 1100 0100 0110 0111 1111 10111011 00111001 0001 a+ b+ c+ a- b- c- a+ c- a- d- d+ Complex gate
37
ASYNC2003 - Tutorial on Petrify Method and Tool37 Implementation with C elements C R S z 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+)
38
ab cd 00011110 00 01 11 10 1 11 11 1 0 0000 0000 1000 1100 0100 0110 0111 1111 10111011 00111001 0001 a+ b+ c+ a- b- c- a+ c- a- d- d+ C S R d
39
0000 1000 1100 0100 0110 0111 1111 10111011 00111001 0001 a+ b+ c+ a- b- c- a+ c- a- d- d+ C S R d but...
40
0000 1000 1100 0100 0110 0111 1111 10111011 00111001 0001 a+ b+ c+ a- b- c- a+ c- a- d- d+ C S R d 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)
41
ab cd 00011110 00 01 11 10 1 11 11 1 0 0000 0000 1000 1100 0100 0110 0111 1111 10111011 00111001 0001 a+ b+ c+ a- b- c- a+ c- a- d- d+ C S R d Monotonic covers
42
ASYNC2003 - Tutorial on Petrify Method and Tool42 C-based implementations C S R d C d a b c a b c d weak a c d generalized C elements (gC) weak
43
ASYNC2003 - Tutorial on Petrify Method and Tool43 Speed-independent implementations Implementation conditions –Consistency –Complete state coding –Persistency Circuit architectures –Complex (hazard-free) gates –C elements with monotonic covers –...
44
ASYNC2003 - Tutorial on Petrify Method and Tool44 Synthesis exercise y- z-w- y+x+ z+ x- w+ 1011 0111 0011 1001 1000 1010 0001 00000101 00100100 0110 y- y+ x- x+ w+ w- z+ z- w- z- y+ x+ Derive circuits for signals x and z (complex gates and monotonic covers)
45
ASYNC2003 - Tutorial on Petrify Method and Tool45 Synthesis exercise 1011 0111 0011 1001 1000 1010 0001 00000101 00100100 0110 y- y+ x- x+ w+ w- z+ z- w- z- y+ x+ wx yz 00011110 00 01 11 10 - - - - Signal x 1 0 1 1 1 1 1 0 0 0 0 0
46
ASYNC2003 - Tutorial on Petrify Method and Tool46 Synthesis exercise 1011 0111 0011 1001 1000 1010 0001 00000101 00100100 0110 y- y+ x- x+ w+ w- z+ z- w- z- y+ x+ wx yz 00011110 00 01 11 10 - - - - Signal z 1 0 0 0 0 1 1 1 0 0 0 0
47
ASYNC2003 - Tutorial on Petrify Method and Tool47 A simple filter: specification y := 0; loop x := READ (IN); WRITE (OUT, (x+y)/2); y := x; end loop R in A in A out R out IN OUT filter
48
ASYNC2003 - Tutorial on Petrify Method and Tool48 A simple filter: block diagram xy + control R in A in R out A out RxRx AxAx RyRy AyAy RaRa AaAa IN OUT x and y are level-sensitive latches (transparent when R=1) + is a bundled-data adder (matched delay between R a and A a ) R in indicates the validity of IN After A in + the environment is allowed to change IN (R out,A out ) control a level-sensitive latch at the output
49
ASYNC2003 - Tutorial on Petrify Method and Tool49 A simple filter: control spec. xy + control R in A in R out A out RxRx AxAx RyRy AyAy RaRa AaAa IN OUT R in + A in + R in - A in - Rx+Rx+ Ax+Ax+ Rx-Rx- Ax-Ax- Ry+Ry+ Ay+Ay+ Ry-Ry- Ay-Ay- Ra+Ra+ Aa+Aa+ Ra-Ra- Aa-Aa- R out + A out + R out - A out -
50
ASYNC2003 - Tutorial on Petrify Method and Tool50 A simple filter: control impl. R in + A in + R in - A in - Rx+Rx+ Ax+Ax+ Rx-Rx- Ax-Ax- Ry+Ry+ Ay+Ay+ Ry-Ry- Ay-Ay- Ra+Ra+ Aa+Aa+ Ra-Ra- Aa-Aa- R out + A out + R out - A out - C R in A in RxRx AxAx RyRy AyAy AaAa RaRa A out R out
51
ASYNC2003 - Tutorial on Petrify Method and Tool51 Control: observable behavior Rx+Rx+ R in + Ax+Ax+Ra+Ra+Aa+Aa+R out +A out +z+R out -A out -Ry+Ry+ Ry-Ry- Ay+Ay+ Rx-Rx-Ax-Ax- Ay-Ay- A in - A in + Ra-Ra- R in - Aa-Aa- z- C R in A in RxRx AxAx RyRy AyAy AaAa RaRa A out R out z
52
ASYNC2003 - Tutorial on Petrify Method and Tool52 Following slides borrowed from Ran Ginosar, Technion (VLSI Architectures course) with thanks
53
ASYNC2003 - Tutorial on Petrify Method and Tool53 Generalized C Element From Ran Ginosar’s course
54
ASYNC2003 - Tutorial on Petrify Method and Tool54 STG Rules Any STG: –Input free-choice—Only inputs may control the choice) –Bounded—Maximum k (given bound) token per place –Liveness—every signal transition can be activated STG for Speed Independent circuits: –Consistent state assignment—Signals strictly alternate between + and – –Persistency—Excited non-input signals must fire, namely they cannot be disabled by another transition Synthesizable STG: –Complete state coding—Different markings must represent different states
55
ASYNC2003 - Tutorial on Petrify Method and Tool55 We use the following circuit to explain STG rules: req ack REQ ACK
56
ASYNC2003 - Tutorial on Petrify Method and Tool56 1-Bounded (Safety) STG is safe if no place or arc can ever contain more than one token Often caused by one-sided dependency 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 REQ+ACK+ REQ- ACK- req+ack+ req- ack-
57
ASYNC2003 - Tutorial on Petrify Method and Tool57 Liveness STG is live if from every reachable marking, every transition can eventually be fired The STG is not live: Transitions reset, reset_ok cannot be repeated. But non-liveness is useful for initialization reset_ok-reset-req+ack+ req- ack-
58
ASYNC2003 - Tutorial on Petrify Method and Tool58 Consistent state assignment The following subgraph of STG makes no sense: a+ a-
59
ASYNC2003 - Tutorial on Petrify Method and Tool59 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 STG is not persistent: there is a place between req+ and ack+ 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+) REQ+ACK+ REQ- ACK- req+ ack+req- ack-
60
60 Complete State Coding STG has a complete state coding if no two different markings have identical values for all signals. REQ+ACK+ REQ- ACK- ack-req+ ack+ req- 10001010 req,ack,REQ,ACK: 1011 100110001100 0100 0000 00 01 00011110 cd\ab 11 10 Disaster!
61
ASYNC2003 - Tutorial on Petrify Method and Tool61 Complete State Coding Possible solution: Add an internal state variable x-x+ req,ack,REQ,ACK,x: REQ+ACK+ REQ- ACK- ack-req+ ack+ req- 1000010100 1000111001
62
ASYNC2003 - Tutorial on Petrify Method and Tool62 A faster STG? Does it need an extra variable? ack- req+ ack+ req- ACK- REQ+ ACK+ REQ-
63
ASYNC2003 - Tutorial on Petrify Method and Tool63 STG specification in.astg format.model simple_buffer.inputs r A.outputs a R.graph # left handshake (r,a) r+ a+ a+ r- r- a- a- r+ # right handshake (R,A) R+ A+ A+ R- R- A- A- R+ # interaction between handshakes r+ R+ A+ a-.marking{ }.end
64
ASYNC2003 - Tutorial on Petrify Method and Tool64 Drawn by draw_astg
65
65 The SG req,ack,REQ,ACK: 0000 r+ 1000 a+ R+ 11001010 r- 0100 R+ 1110 a+ A+ 1011 A+ 1111 a+r- 0110 R+ a- A+ 0111 r- 0011 a- R- 1001 R- 1101 a+ R- 0101 r- 0001 a- R- A- 1000 A- 1100 a+ A- 0100 r- a- A- 1011 r+ 1001 r+ R- A- 1111 a+ R- 1101 a+ A- 0111 r- R- 0101 r- A- a-
66
66 The SG req,ack,REQ,ACK: 0000 r+ 1000 a+ R+ 11001010 r- 0100 R+ 1110 a+ A+ 1011 A+ 1111 a+r- 0110 R+ a- A+ 0111 r- 0011 a- R- 1001 R- 1101 a+ R- 0101 r- 0001 a- R- A- 1000 A- 1100 a+ A- 0100 r- a- A- 1011 r+ 1001 r+ R- A- 1111 a+ R- 1101 a+ A- 0111 r- R- 0101 r- A- a- R+ CSC-conflict states are highlighted
67
ASYNC2003 - Tutorial on Petrify Method and Tool67 Drawn by write_sg & draw_astg
68
ASYNC2003 - Tutorial on Petrify Method and Tool68 Extra states inserted by petrify
69
ASYNC2003 - Tutorial on Petrify Method and Tool69 Rearranged STG ack- req+ ack+ req- c1- c1+ c0- ACK- REQ+ ACK+ REQ- c2- c2+ c0+ Initial Internal State: c0=c1=c2=1
70
ASYNC2003 - Tutorial on Petrify Method and Tool70 The new State Graph…
71
ASYNC2003 - Tutorial on Petrify Method and Tool71 The Synthesized Complex Gates Circuit INORDER = r A a R csc0 csc1 csc2; OUTORDER = [a] [R] [csc0] [csc1] [csc2]; [a] = a (csc2 + csc0) + csc1'; [R] = csc2 (csc0 (a + r) + R); [csc0] = csc0 (csc1' + a') + R' csc2; [csc1] = r' (csc0 + csc1); [csc2] = A' (csc0' (csc1' + a') + csc2);
72
ASYNC2003 - Tutorial on Petrify Method and Tool72 Technology Mapping INORDER = r A a R csc0 csc1 csc2; OUTORDER = [a] [R] [csc0] [csc1] [csc2]; [0] = R'; # gate inv:combinational [1] = [0]' A' + csc2'; # gate oai12:combinational [a] = a csc0' + [1]; # gate sr_nor:asynch [3] = csc1'; # gate inv:combinational [4] = csc0' csc2' [3]'; # gate nor3:combinational [5] = [4]' (csc1' + R'); # gate aoi12:combinational [R] = [5]'; # gate inv:combinational [7] = (csc2' + a') (csc0' + A');# gate aoi22:combinational [8] = csc0'; # gate inv:combinational [csc0] = [8]' csc1' + [7]'; # gate oai12:combinational [csc1] = A' (csc0 + csc1); # gate rs_nor:asynch [11] = R'; # gate inv:combinational [12] = csc0' ([11]' + csc1'); # gate aoi12:combinational [csc2] = [12] (r' + csc2) + r' csc2; # gate c_element1:asynch
73
ASYNC2003 - Tutorial on Petrify Method and Tool73 The Synthesized Gen-C Circuit INORDER = r A a R csc0 csc1 csc2; OUTORDER = [a] [R] [csc0] [csc1] [csc2]; [0] = csc0' csc1 (R' + A); [1] = csc0 csc2 (a + r); [2] = csc2' A; [R] = R [2]' + [1]; # mappable onto gC [4] = a csc1 csc2'; [csc0] = csc0 [4]' + csc2; # mappable onto gC [6] = r' csc0; [csc1] = csc1 r' + [6]; # mappable onto gC [8] = A' csc0' (csc1' + a'); [csc2] = csc2 R' + [8]; # mappable onto gC [a] = a [0]' + csc1'; # mappable onto gC
74
ASYNC2003 - Tutorial on Petrify Method and Tool74 Petrify Environment STG EQN draw_astg ps write_sg SG lib petrify
75
ASYNC2003 - Tutorial on Petrify Method and Tool75 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
76
ASYNC2003 - Tutorial on Petrify Method and Tool76 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 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
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.