High Level Synthesis: Vijaya Prakash A M
High Level Synthesis: Vijaya Prakash A M
High Level Synthesis: Vijaya Prakash A M
VIJAYA PRAKASH A M
Definition of Synthesis
Synthesis
A translation from behavioral description into a structural description Also called Design Refinement, adds an additional level of detail that provides information needed for the next level of synthesis or for manufacturing of the design
Logic synthesis
- read Verilog - control/data flow analysis - basic logic Technology independent Optimizations restructuring - crude measures for goals - use logic gates from targ Technology Mapping cell library - timing optimization Technology Dependent Optimizations - physically driven optimizations - improve testability Test Preparation - test logic insertion
4
Types of synthesis
Circuit synthesis
Generates a transistor schematic from a set of input-output current, voltage and frequency characteristics or equations.
Logic synthesis
Translates Boolean expression into a netlist of components from a given library of logic gates.
b c b c d
abc + abc + d
bc + d
Types of synthesis
Register transfer synthesis
Generates two parts
A datapath, which is a storage elements and functional units that performs the given RT
A control unit that control the sequencing of the states in the RT descriptions.
System synthesis
Generates a structure of processors, memories, controllers and interface adapters from a set of system components. (Each Components can be RT descriptions)
Design Representation
First step in synthesis is compilation of input behavior in into a intermediate graph representation.
We perform high level synthesis tasks such as
Scheduling, Unit Selection, Functional Storage and Interconnection Binding, Control Generation.
X := X +2; A := X +5;
A := X +3;
A := X +W;
X := X +2; A := X +5; When 2 => A := X +3; When others => A := X +W; End case;
1 2 E
+
5 3
Read W
+
1
+
2
+
E
Read C
Write X
Write A
Signal statement
b <= a + 1; a <= b + 1;
Statement execute concurrently
Write b Write a
Variable statement b := a + 1; a := b + 1; +
Write b
Read b
+
Write a
Compiler Transformation
Const 9 Const 1 Const 10
+
Write c Constant folding Write c
Read a
Read b
Read a
Read b
Read a
Read b
+
Write c
+
Write d Write c
+
Write d
Contents
Introduction
Representation How to build the BDD
Reduced BDDs
Design consideration ITE Algorithm ITE_constant Algorithm
Introduction
Many synthesis, verification & testing algorithms manipulates large switching formulae.
Efficient way to represent the formulae BDD came in as a choice of many application
BDD
BDDs has penetrated every subfields in the area of Synthesis and Verification
Two properties of BDDs
Circuit optimization, testing & equivalence checking Effective in representing the Combinatorial large set
Which has led to stunning break through in FSM equivalence checking & in two level logic optimization.
Properties of BDDs
Canonicity Compactness (with some exceptions) Fast computation (with some exceptions) Represent a variety of discrete objects
Boolean functions and relations Compositional sets and subsets Partitions of states Encodings and labelings
Representation
It can represented as
Minterm Maxterm Canonical Form Non-canonical form
Representation
Non-Canonical form, the formulae types known as SOP or POS have been widely used.
Two - level representation of the some functions are too large to be practical Passing SOP to POS and vice versa is difficult as a consequence:
Taking the complement is difficult Taking the AND of the SOP (or OR of POS) is difficult
Since SOP and POS is non canonical forms, answering the equivalence for two functions is difficult Further deciding whether a product of sum is satisfiable is NP - complete (tautology)
BDD
BDD is DAG (Directed Acyclic Graph)
BDD
S(x) = S(x1, x2, x3)
X1 X2
1 0
X2
X3
X1 X2 X3
Fb = ac + cd
Fbc = a Fbca = 1 Fbca = 0 Fbc = d Fbca = 1 Fbca = 0
Fb = d + cd
Fbc = d Fbc = d Fbca = 1 Fbca = 0 Fbca = 1 Fbca = 0
Fb = ac + cd
T Fbc = a T
b
E E Fbc = d
Fb = d + cd = d
a
E Fbca = 1 T Fbca = 0
d
Fbcd = 1 T E Fbd = 0
1
Ordering b c a d
Reduced BDD
A non-reduce BDD can be systematically transformed into reduced one
Identification of isomorphic sub-graph
Removal of redundant nodes.
Examples
a a a1
b
1 0 1 a2 b2 b1
a1 b1
a2 b2 1 0 1
F=a
a
F = ab
a b
0 1
F = a
F = a+b
Known Representations
Truth table SoP and PoS Decision tree Reduced decision tree
BDD Zero-Suppressed BDD BDD with complement edges
Sum-of-products
F = x1x2x3 + x1x2x3 + x1x2x3
Product-of-sums
F = (x1+x2+x3) & (x1+x2+x3) & (x1+x2+x3) & (x1+x2+x3) & (x1+x2+x3)
x3
0 0 1 0 0 0
x3 10
1
x3
0 1
Variable Ordering
Assign arbitrary total ordering to variables
e.g., x1 < x2 < x3
Properties
Shannon Expansion
A boolean function can be expanded with respect to any variable F( x,y,z ) = x & Fx + x & Fx where Fx and Fx are positive (negative) cofactors Fx = F( 0,y,z ), Fx = F( 1,y,z )
Reduction Rule #1
Merge equivalent leaves
x1 x2 x3 0 0 0 x3 1 0 x3 1 0 x2 x3 1 x3 x2 x3 0
x1 x2 x3 1 x3
Reduction Rule #2
Merge isomorphic nodes
x x x x x x
x1 x2 x3 x3 0 x2 x3 1 x3
x2 x3 0
x1 x2 x3 1
Reduction Rule #3
Eliminate Redundant Tests
x
x1 x2 x3 0 x2 x3 1 0 x2
x1
x3 1
Complement Edges
BDD edges can carry attributes Using complementation as an attribute for edges saves BDD nodes and makes NOT a constant time operation To maintain canonicity, the use of attribute edges should be constrained
S3
Cout a3 a3 b3 b 3 a2 b2 b 2 a1 b1 b 1 a0 b0 1
S2 a2
b3 b3 a2 b2 b2 a1 b1 b1 a0 b0 0
C o u t S
S1
b 2 b2 a1
S0
b 1 b1 a0
Shared Representation
Linear
Good Ordering
a1 b1 a2 b2 a3 b3 0 1 a3
Bad Ordering
a1 a2 a3 a3 a2 a3
b1 b1 b1 b1 b2 b2 b3 0 1
Linear Growth
Exponential Growth
b
T E E
c
T
a
T E T
d
E
Ordering b c a d
Reduced BDD
f
c
d a 1 0 1 a d d 0
c d 0
1
0
Reduced BDD
f
b c d d d 0 1 0 1 c
d
0
a 1 0 1
Reduced BDD
f
b c d d c d 0 1 0
a 1 0 1
Reduced BDD
f
b c d d d 0 1 0
a 1 0 1
Reduced BDD
f
b c d d d 0 1 0
a 1 0 1
Reduced BDD
f
b c d d 1 0 1 d 0
a 1 0
Reduced BDD
f
b c
a 1 0
1
d 0 1
d 0
Reduced BDD
f = abc + bd + cd
b
T E E
c
T
a
T E T
d
E
Properties of ROBDD
Given an ordering, the reduced graph for a function is unique.The reduced ordered BDD (ROBDD) is a canonical form.
The size of the BDD is exponential in the number of variables in the worst case
Properties of ROBDD
On the other side
BDD sizes depends on the ordering. Finding good ordering is not always simple.
There are functions for which the SOP or POS representation are more compact than the BDDs. More constraint function of covering problem fall into this category
In some cases SOP/POS forms are closer to the final implementation of a circuit. For instance, if we want to implement a PLA, we need to generate at some point a SOP or POS form.
If-Then-Else Operation
Concept
Basic technique for building OBDD from logic network or formula.
I T, E I X T E 1 MUX 0
Arguments I, T, E
Result
Implementation
Combination of depth-first traversal and dynamic programming. Worst case complexity product of argument graph sizes.
ITE Algorithm
ITE (F, G, H) = F.G + F.H = v . (F . G + F . H)v + v . (F . G + F . H)v = v . (Fv . Gv + Fv . Hv) + v. (Fv . Gv + Fv . Hv) = (v, ITE(Fv,Gv, Hv), ITE(Fv,Gv, Hv)) Terminal case recursions are ITE (1, F, G) = ITE (0, G, F) = ITE (F, 1, 0) = ITE (G,F,F) = F
Argument T
1
Argument E
a B1
Recursive Calls
A1,B1 A2,B2 A6,B2 A6,B5 A3,B2 A5,B2 A3,B4
1 B4 A4,B3 A5,B4
Optimizations
Dynamic programming Early termination rules
Without Reduction
a
With Reduction
a C6 C5 b C4 c C3 d C1 0 1 C2
A4,B3 A5,B4
Recursive calling structure implicitly defines unreduced BDD Apply reduction rules bottom-up as return from recursive calls
Generates reduced graph
ITE Algorithm
ITE (F,G,H) { (result, terminal_case) = TERMINAL_CASE(F, G, H) if (terminal_case){ return (result) } result, in_computed_table) = COMPUTED_TABLE_HAS_ENTRY(F, G, H) if (in_computed_table){ return(result) } v = TOP_VARIABLE(F, G, H) T = ITE(Fv,Gv, Hv) E = ITE(Fv,Gv, Hv) if (T = E) Return (T) R = FIND_OR_ADD_UNIQUE_TABLE(v, T, E) INSERT_COMPUTED_TABLE((F,G,H), R) return ( R ) } }
ITE_CONSTANT Algorithm
ITE_CONSTANT (F,G,H) { (result, terminal_case) = TERMINAL_CASE(F, G, H) if (terminal_case){ return (result) } result, in_computed_table) = COMPUTED_TABLE_HAS_ENTRY(F, G, H) if (in_computed_table){ return(result) } v = TOP_VARIABLE(F, G, H) T = ITE_CONSTANT (Fv,Gv, Hv) if (T 0 and T 1) Return non_constant E = ITE_CONSTANT (Fv,Gv, Hv) if (T E) return non_constant INSERT_COMPUTED_TABLE((F,G,H), T) return ( T ) } }
Synthesis
Dont care set representation (UCB, Fujitsu, ) State minimization (UCB) Sum-of-Products minimization (UCB, Synopsys, NTT)
Test
False path identification (TI)
Weak Competition
No other method comes close in overall strength Especially with quantification operations
Must be Careful
Choose good variable ordering
Critical effect on efficiency Must have insights into problem characteristics Dynamic reordering most promising workaround