Lecture 24
Lecture 24
CS G553
‹#›
Lecture –24
Mapping Design to Reconfigurable Platform: Logic
Synthesis, Logic Representation and Node Manipulation
CS G553 2
FPGA Physical Design Flow
CS G553 3
Synthesis
CS G553 4
Design Flow for Programmable Logic
RTL design
RTL
RTL elaboration and Synthesis
controller datapath optimization
Architecture-independent
optimization
Logic
Technology mapping & Synthesis
Architecture-specific
optimization
net list
Clustering & placement
Placement-driven Physical
optimization & incremental
placement Design
Routing (backend
design)
1001110010… Bitstream generation
CS G553 5
Taxonomy of Synthesis
Behavioral I = 1.. 16
Sum = sum *z-1
View
* Logic * Circuit
* Architectural Synthesis
Synthesis Synthesis
VDD
Structural FSM
B
View
* A
How?
o You write an “abstract” VHDL/Verilog description of the logic
o The synthesis tool provides alternative implementations
constraints
VHDL/Verilog synthesis or …
library
CS G553 7
Goal
A structured system is made upon a set
of combinatorial parts separated by
memory elements
CS G553 8
Logic Synthesis: Categories
CS G553 9
Two-level-logic
Two approaches to logic synthesis:
o Two-level logic synthesis: targets designs X1
represented in two-level logic sum of *
product-terms
X2
• sums are implemented on the first level F
and the product on the second level X3 *
X2 +
o Advantages:
*
• Natural representation of Boolean
X4
functions
• Well understood and Easy *
manipulation X3
CS G553 10
Multi-level-logic
• Difficult to manipulate
X5
• Few manipulation algorithms exist Multi-level logic
o Appropriate for mask-programmable or
field programmable devices
Multi-level will therefore be considered in this course
CS G553 11
CS G553 12
Boolean Networks
Multi-level logic:
o are usually represented using Boolean networks
A Boolean network
o is a directed Acyclic graph (DAG) in which:
• A node represents an arbitrary Boolean
function
• An edge represents the (data) dependency
between nodes
CS G553 14
Logic Optimization
CS G553 15
Logic Synthesis
Technology
independent
CS G553 16
Node Representation
Node representation choices:
1. Sum-Of-Products (SOP)
2. Factored Form (FF)
3. Binary Decision Diagram (BDD)
Sum-Of-Products:
✓ Well understood
✓ Easy to manipulate
✓ Many optimization algorithms available
Not representative of the logic complexity
• Estimation of progress during logic minimization is difficult
CS G553 17
Node Representation : (FF)
CS G553 18
Node Representation: BDD
BDD:
o A rooted DAG
o Nodes:
• Variable node:
• non-terminal:
– index(v) {1, …,n} (for
A + B . C’
variable xi)
– Two children low(v) , high(v)
• Constant node:
• terminal node:
– value(v) {0,1}
A+B+C A B C
CS G553 19
Node Representation: BDD
CS G553 20
Node Representation: BDD
BDD Simplification
ABC + A’C’
CS G553 21
Node Representation: BDD
Implementation by MUX
F = ABC +AC
CS G553 22
Node Representation: BDD
o If v is terminal,
• fv = value(v)
CS G553 23
Node Representation : BDD
Example:
o f = abc + bd + cd
b
0 1
b c c
0 1 0 0 1
cd ac + d + cd 0 d d
0 1 0
b 1
0 1 0 1 a 1
0 1
c c
0 1 0 1 0 1
0 d d a+d
CS G553 24
Node Representation: OBDD
OBDD:
o If we fix the order of nodes (give a fix index)
CS G553 25
Node Representation: ROBDD
f = abc + bd + cd
CS G553 26
Node Representation: ROBDD
BDD → ROBDD
o Fix order of variables
o Delete redundant nodes
o Share subgraphs that represent same function
ROBDD is canonical/Unique
CS G553 27
Node Representation: ROBDD Example
f = (a + b).c
CS G553 28
Node Representation: ROBDD Example
a a
c
f f
c
b b
c c
0 0
1 1
b Isomorphic b
1 graphs 1
a a
0 0
1 1
0 0
0 1 0 1
CS G553 29
Node Manipulation
Node Manipulation:
o Input:
• A suitable node representation
o Goal:
• Generation of an equivalent and cost effective simplified function
Operations:
o Decomposition
o Extraction
o Factoring
o Substitution
o Collapsing (Elimination)
CS G553 30
Node Manipulation: Decomposition
Decomposition:
➢ Take a single Boolean expression and replace with collection of
new expressions:
➢ A Boolean function f(X) is decomposable if we can find a
function g(X) such that f(X) = f’(g(X), X).
(12 literals)
F = A B C + A B D + A' C' D' + B' C' D'
F = M N + M' N'
A M=AB (8 literals)
B N=C+D
C
A A
B B
D
F
A F
C C
D D
B
C
D
Before Decomposition After Decomposition
CS G553 31
Node Manipulation:
CS G553 32
Node Manipulation: Decomposition
Decomposition:
o Example 2:
CS G553 33
Node Manipulation: Extraction
Extraction:
o Identify common intermediate sub-functions from a set of given
functions.
F = (A + B) C D + E (11 literals & 8 gates)
G = (A + B) E'
H=CDE
CS G553 34
Node Manipulation: Extraction
Extraction:
o Example 2:
CS G553 35
Node Manipulation: Factoring
Factoring:
o Transformation of SOP-expressions in factored form
F=AC + AD + BC + BD + E (9 literals & 5 gates)
F = (A + B) (C + D) + E
(5 literals & 4 gates)
A
C
A
D A
B
B
F F
C C
D
B E
D
E
CS G553 36
Node Manipulation: Substitution
Substitution:
o A function is reduced in complexity by using an additional input that
was not previously in its support set.
• The transformation requires the creation of a dependency,
CS G553 37
Node Manipulation: Substitution
Substitution:
o Example:
CS G553 38
Node Manipulation: Collapsing
Collapsing (Elimination):
o The elimination of an internal vertex is its removal from the network.
CS G553 39
Node Manipulation: Collapsing
Collapsing:
o Example:
CS G553 40
The End
Questions ?
CS G553 41