Академический Документы
Профессиональный Документы
Культура Документы
Introduction Signal transition graphs The basic synthesis procedure Implementations using state-holding gates Initialization Summary of the synthesis process Petrify: A tool for synthesizing SI circuits from STGs Design examples using Petrify
Control Circuits
Many methods, tools, assumptions, frameworks Balsa generated both control and data-path We now consider one method / tool for control-only spec, verification and synthesis:
Assumption: Speed independent control for speed independent bundled data Method: Signal Transition Graph
Tool: Petrify (mostly from Jordi Cortadella at UPC) Universitat Politecnica de Catalunya (Technical University of Catalonia, Barcelona, Spain)
Delay Models
Simply shifts any signals waveform later in time Pulses shorter than the reject time are filtered out We dont assume inertial delays in async control design
Hazards
Static-1 hazard
Static-0 hazard
Dynamic-10 hazard
Dynamic-01 hazard
Minimalist
A comprehensive CAD package for the automated synthesis and optimization of asynchronous controllers Principal Architects:
Synchronous Finite-State Machines: Algorithms and Tools. Kluwer Academic Publishers, 2001.
(TK7868 .A79 F84) http://www1.cs.columbia.edu/~nowick/
Introduction (Async) Background (FSM) Burst-mode synthesis path walk-through CHASM: Optimal state assignment OPTIMIST: Optimal state minimization for synchronous FSMs OPTIMISTO: Synchronous state minimization for optimum output logic OPTIMISTA: Asynchronous state minimization for optimum output logic MINIMALIST: An extensible toolkit for burst-mode synthesis Conclusions
Jordi Cortadella, Luciano Lavagno, and Alex Yakovlev, Advanced tutorial Hardware Design and Petri Nets, 21st Intl. Conf. on Application and theory of Petri Nets, 2000 Jordi Cortadella, M. Kishinevsky, A. Kondratyev, Luciano Lavagno, and Alex Yakovlev, Logic Synthesis for Asynchronous Controllers and Interface, Springer, 2002 (TK7868 .L6 L5864)
Introduction to hardware design and petri nets (0.5 hrs) Hardware modeling with petri nets (0.5 hrs) Direct synthesis of petri nets (0.5 hrs) Logic synthesis of async circuits from STGs (1.5 hrs) Analysis and verification (1 hr) Petri nets and hardware description languages (1.5 hrs) Performance analysis (0.5 hrs) Petri net models for quasi-static-scheduling (1 hr)
Introduction Design flow Background Logic synthesis State encoding Logic decomposition Synthesis with relative timing Design examples Other work Conclusions
The intended sequential circuit is specified in the form of a primitive flow table A minimum-row reduced flow table is obtained by merging compatible states in the primitive flow table The states are encoded Boolean equations for output variables and state variables are derived
Specify the desired behavior of the circuit and its (dummy) environment using STG Check that the STG satisfies 5 properties Check that the specification satisfies complete state encoding Select an implementation template and derive the Boolean equations
Derive the Boolean equations for the desired implementation template Manually modify the implementation such that the circuit can be forced into the desired initial state by an explicit reset or initialization signal Enter the design into a CAD tool and perform simulation and layout of the circuit
a+
b+
a+
b+
c+
c+
a-
b-
a-
b-
cc-
a+
b+
a+
b+
c+ acba-
c+ bc-
In the STG:
PN transition are signal transitions PN places and arcs are causal relations Simple places (one arc in, one arc out) are omitted MARKING
assignment of tokens to places state of the circuit
abc
a+
b+
100
b+
010
a+
110
c+
111
ab-
SG more complex than STG Bad for design spec Needed for synthesis
011
b-
101
a-
001
c-
000
a+ b+
100
b+
010
a+
110
c+
111
Quiescent Region QR(c=1)
ab-
011
b-
101
a-
001
c-
KEEP C=0
100
b+
010
a+
110
c+
SET C
111
ab-
KEEP C=1
011
b-
101
a-
001
c-
RESET C
Synthesis: C Element
Two methods:
01
11
10
000
a+ b+
0 0 R 0 F 1 1 1
c=ab+ac+bc
100
b+
010
a+
110
c+
SET C
111
a b c
ab-
KEEP C=1
011
b-
101
a-
Hazardous Material !
001
c-
Hazardous Hazards
ac a b
SLOW
ab bc
a b ac ab bc c
(slow)
Hazardous Hazards
Hazards are no big deal in sync circuits Hazards are deadly in (some) async circuits Now you know why you were taught about them in school We can build hazard-free circuits We can (sometimes) make timing assumptions and add delays
c d
ab bc
a b ac ab bc c d
(slow rise)
c a a
T1
Theoretically, same hazard problem (e.g. T1 slow) Must use caution or delay output
a a b
b c b c
01
11
10
000
a+ b+
0 0 R 0 F 1 1 1
reset=ab
KEEP C=0
100
b+
010
a+
110
set=ab
a b
c+
SET C
111
aS Q
b-
KEEP C=1
011
b-
101
a-
001
c-
RESET C
Needs SET, RESET regions May use KEEP 0, KEEP 1 regions May use unreachable states (more later) Area / performance / power may be more or less than gate circuits May use C elements instead of SR latches SR latches enable implementation with standard libraries
S R
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
(input) CHOICE
MUTUALLY EXCLUSIVE
FORKs
MUTUALLY EXCLUSIVE x+
CONTROLLED CHOICE
x+
JOINs
MERGE
y+
x+
z+
b+ x-
y-
z-
b-
a b c d
I
b+ c+ cba+ b+ b+
II RR00
ca+
01R0
c+ b-
0F10
1R00
b+
d+ c+ d-
0F10
a-
110R
d+
a-
F110
d-
11R1
111F
c+
Unreachable States
b+
RR00
c-
a+
cd\ab 00
01
11
10
01R0
c+ b-
00F0
1R00
b+
00
0F10
a-
110R
d+
01
11 10
x
x
x
x
x
x x
F110
d-
11R1
111F
c+
01
11
10
RR00
c-
a+
00
0 R 0 0 x x x R x x 1 x
01R0
c+ b-
00F0
1R00
b+
01 11 10
0F10
a-
110R
d+
F 1 1 x c=d+ab+bc
F110
d-
11R1
111F
For c
c+
set(c)=d+ab
reset(c)=b
c=d+ab+bc
d a b
set(c)=d+ab reset(c)=b
d a b
01
11
10
RR00
c-
00
a+
0 0 R 0
x x x 1 x x F x
01R0
c+ b-
00F0
1R00
b+
01 11 10
0F10
a-
110R
d+
0 0 0 x d=abc
F110
d-
11R1
111F
For d
c+
set(d)=abc
reset(d)=c
Walks on SG and KM
I
b+
cd\ab 00
01
11
10
RR00
c-
a+
00
01R0
c+ b-
00F0
1R00
b+
01 11 10
x x
x x
x x x
0F10
a-
110R
d+
F110
d-
11R1
II
111F
c+
II
Exercise: A decomposed gate implementation is not speed-independent due to hazards. Explain, using the walks.
STG Rules
Any STG:
Input free-choiceOnly mutex inputs may control the choice) 1-BoundedMaximum 1 token per place LivenessNo deadlocks
Consistent state assignmentSignals strictly alternate between + and PersistencyExcited signals fire, namely they cannot be disabled by another transition
Complete state codingDifferent markings must represent different states
Synthesizable STG:
req ack
REQ ACK
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
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
a+ a-
a+ a-
Persistency
STG is persistent if for all arcs a* b*, other arcs ensure that b* fires before opposite transition of a* (*is either + or -) Non-persistency may be caused by one-sided relations
req+ ackack+ reqREQ+ ACKACK+ REQ-
STG is not persistent (in addition to being unsafe): If left cycle goes fast and right cycle lags, then ack+ ack- before REQ+ . Danger: Logic design may be REQ+ = ack+ Exception: If a* b*, assume that the environment assures persistency. Possible solution: stop left cycle by right cycle.
STG has a complete state coding if no two different markings have identical values for all signals.
ack0100 0000
req,ack,REQ,ACK:
req+ ack+
1000
1010
REQ+ ACK1000
ACK+
1011
reqcd\ab 00 00 01 11 10
REQ1001
1100
01
11
10
Disaster!
req,ack,REQ,ACK,x:
ack-
req+
10000
10100
REQ+
ACK+
x-
x+
req-
ack+
11001 10001
ACK-
REQ-
STG
petrify
lib
SG
draw_astg
EQN
ps
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, incl. tutorial
See http://www.lsi.upc.es/~jordic/petrify/petrify.htm
A faster STG?
ack+
ACK+
req-
REQ-
ack-
ACK-
Drawn by draw_astg
req,ack,REQ,ACK:
The SG
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-
req,ack,REQ,ACK:
The SG
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+
Rearranged STG
req+ REQ+ ACK+ c2REQACKc2+ c0+
Technology Mapping
INORDER = r A a R csc0 csc1 csc2; OUTORDER = [a] [R] [csc0] [csc1] [csc2]; [0] = R'; # gate [1] = [0]' A' + csc2'; # gate [a] = a csc0' + [1]; # gate [3] = csc1'; # gate [4] = csc0' csc2' [3]'; # gate [5] = [4]' (csc1' + R'); # gate [R] = [5]'; # gate [7] = (csc2' + a') (csc0' + A'); # gate [8] = csc0'; # gate [csc0] = [8]' csc1' + [7]'; # gate [csc1] = A' (csc0 + csc1); # gate rs_nor: [11] = R'; # gate [12] = csc0' ([11]' + csc1'); # gate [csc2] = [12] (r' + csc2) + r' csc2; # gate inv: combinational oai12: combinational sr_nor: asynch inv: combinational nor3: combinational aoi12: combinational inv: combinational aoi22: combinational inv: combinational oai12: combinational asynch inv: combinational aoi12: combinational c_element1:asynch
A safer STG?
req+
REQ+
ack+
ACK+
req-
REQ-
ack-
ACK-
A safer STG?
ack+
ACK+
req-
REQ-
req
ackACKack
REQ
ACK
req+
REQ+
ack+
ACK+
req-
REQ-
ack-
ACK-
req+
REQ+
ack+
ACK+
req-
REQ-
ack-
ACK-
Synthesis
INORDER = r A a R csc0; OUTORDER = [a] [R] [csc0]; [a] = csc0 A'; # gate and2_1: combinational [R] = r csc0'; # gate and2_1: combinational [2] = A' (csc0' + r'); # gate aoi12: combinational [csc0] = [2]'; # gate inv: combinational
a c0 A r
S Q R Q
A A r
c0 r R
=
r
+ -
c0
c
c0 R
A different STG
req+
REQ+
ack+
Redundant, will be ignored by petrify
ACK+
req-
REQ-
ack-
ACK-
A different STG
Synthesis
INORDER = r A a R; OUTORDER = [a] [R]; [a] = R; [1] = r A'; [2] = r' A; [R] = R [2]' + [1];
# mappable onto gC
A r a
Latch Control
req REQ ACK
Data-less fifo:
ack
req ack
Lt Enable
REQ ACK
Enable=0: transparent
Latch:
Must keep input data available until after it is latched Assume input data available only when req=1 Once ack+, req- (and input data invalid) can follow very fast Lt+ before ack+
ack+
REQ+
REQ-
ACK+
req-
Lt+
Lt-
REQ-
ack-
ack+
ack-
ACK-
reqLtack-
REQ-
ACK-
INORDER = Rin Aout Ain Rout Lt; OUTORDER = [Ain] [Rout] [Lt]; [Ain] = Lt; [1] = Aout' Rin; [2] = Aout Rin'; [Rout] = Rout [2]' + [1]; # mappable onto gC [Lt] = Rout; R = R(Ar)+Ar = R(A+r)+Ar = Ar + RA +Rr
A r a Lt
MUX Control
So far all examples are doable by hand A deceptively simple example: Control for 4-phase bundled data mux
PUSH channels
x y
0 1
z
x-req ctl.f ctl.t y-req y-ack ctl-ack
C C
z-req
ctl
C C
z-ack
The environment
Four independent environments (rCf, rCt share aC) Must not specify any dependency by mistake:
r0+ r1+ rCf+ rCt+ R+
a0+
r0-
a1+
r1-
aC+
rCf-
aC+
rCt-
A+
R-
a0In0
a1In0
aCCtl.f
aCCtl.t
AOut
The control
A+ must precede a0+ or a1+ (make sure data passed through and were captured) In0 and In1 handshakes must be made MUTEX Choices are matches with Merges
rCt+ aCrCf+
r1+
P3
a1+ R+
rCtP2 P4
A+
P1
aC+ a0+
r0+
rCfr1-
P5
mux.g
mux.gc
Replicated transitions: R+, R+/1 Inserted state variable to retain In0 vs. In1 info
onto gC
onto gC
onto gC onto gC
All-bundled Mux
gC
gC
gC