Professional Documents
Culture Documents
Address: Arcisstr. 21
80333 Munich
Germany
Telephone: +49 89 289-23666
Internet: http://eda.ei.tum.de
Contents of Lecture:
Microelectronics overview; design flow for microelectronic systems, design space (Y-Chart),
implementation fabrics;
Important Symbols
Symbol Meaning Page
I MPORTANT S YMBOLS
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Contents
I. Logic Synthesis 3
Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2 Logic Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3 Simulation methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4 VHDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
C ONTENTS
1
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
C ONTENTS
2
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
I. Logic Synthesis
Task
Optimization targets:
Area
Delay H
Logic synthesis L i
o g
Technology mapping w Power consumption h
Structural description:
• Netlist using components
of the target architecture
Introduction (1)
3
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Architectural Manual
Synthesis Tools Entry
RTL Description
Translation Tools
Unoptimized
Logic Description
Module
Generators
Logic
Optimization
Cell Technology
Library Mapping
Custom
Layout
Test Optimized
Generation Logic Description
Physical
Design Tools
Layout
Manufacturing
Introduction (2)
4
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Y-Chart
Rectangle/Polygon-Group
Standard-Cell / Subcell
Macro-Cell
Block / Chip
Chip / Board
Physical / Geometrical
Domain
Introduction (3)
5
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Design Space
Analysis
−Verification
−Extraction
Abstraction levels
1 2 3
System System− System− Chip
specifikation architecture Board
(C) (CPUs, Busses)
4 5 6
Algorithm Algorithms Processor Block
(VHDL, C) Subsystem Chip
7 8 9
RT RT−Specification Modules Macro−Cell
Refinement
Abstraction
(Control−/data− (ALU, Registers,
flow) MUX)
10 11 12
Logic Boolean Gates, Flip−Flops
Cells
Equations (Netlist)
13 14 15
Circuit Differential Transistors Mask Data
Equations (Netlist) Polygons
Synthesis
−Generation
Views
Introduction (4)
6
Combinational Circuit: 7−Segment Decoder
x1
e
x0
c
f
x2
x3
7
g
Introduction (5)
d
b
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
x3 x2 x1 x0 a b c d e f g x3 x2 x1 x0 a b c d e f g a
0 0 0 0 0 1 1 1 1 1 1 0 8 1 0 0 0 1 1 1 1 1 1 1
1 0 0 0 1 0 1 1 0 0 0 0 9 1 0 0 1 1 1 1 0 0 1 1 f b
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
2 0 0 1 0 1 1 0 1 1 0 1 10 1 0 1 0 – – – – – – – g
3 0 0 1 1 1 1 1 1 0 0 1 11 1 0 1 1 – – – – – – –
4 0 1 0 0 0 1 1 0 0 1 1 12 1 1 0 0 – – – – – – –
e c
5 0 1 0 1 1 0 1 1 0 1 1 13 1 1 0 1 – – – – – – –
6 0 1 1 0 0 0 1 1 1 1 1 14 1 1 1 0 – – – – – – –
7 0 1 1 1 1 1 1 0 0 0 0 15 1 1 1 1 – – – – – – – d
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
x 0 1 1 0 0
OR 0 1 1 1 0 x+y
y 0 0 1 1 0 Gate
Input signals Processing of signals Output signal
(synchronous to clock) (synchronous to clock)
Truth Table
1 1 0 0 1 0 1 0 0 1
9
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Boolean Algebra
BA=({0 , 1}; · , +, )
Principle of duality
(2) (x · y) · z = x · (y · z) Associativity
(x + y) + z = x + (y + z)
(3) x · (y + z) = x · y + x · z Distributivity
x + y · z = (x + y) · (x + z)
(5) x · (x + y) = x Absorption
x+x·y = x
10
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Principle of duality
Basic set G ; |G| = n
Power set P(G) ; |P(G)| = 2n
(Model of a 2n -valued Boolean algebra)
A, B,C ∈ P(G)
(5) A ∩ (A ∪ B) = A Absorption
A ∪ (A ∩ B) = A
(7) A ∩ 0/ = 0/ ; A ∪ G = G Dominance
(8) A ∩ A = 0/ ; A ∪ A = G Complement
11
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Boolean Space
(Signal-) Variable : x
Value of the variable : val(x) , x̂; x̂ ∈ {0, 1}
Variable-n-tuple : x = (x1 , . . . , xn )
Value assignment-n-tuple : x̂ = (x̂1 , . . . , x̂n )
vertex in B n
011 111 x1 x2 x3 x1 x2 x3
001 101 x1 x2 x3 x1 x2 x3
010 110 x1 x2 x3 x1 x2 x3
000 100 x1 x2 x3 x1 x2 x3
x3 x2
B 3 : 3-dimensional Boolean Space
x1
12
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
simplified notation:
Cube absorption : mκ ⊆ ci ⊆ 1
x1 x2 x3 ⊆ x1 x3 ⊆ 1
x3 110
110 ⊆ 1∗0 ⊆ ∗∗∗ x2
0-cube 1-cube 3-cube 1∗0
x1 100
3-cube (∗∗∗)
13
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
f (x) = f (x1 , . . . , xi , . . . , xn )
f : Bn → B f : Bn → Bm
n-dimensional multiple output function
single output function
f = ( f1 , . . . , f j , . . . , fm ) : Function-m-tuple
set( f ) = { f1 , . . . , f j , . . . , fm } : Set of functions
f ∈ set( f ) : f is a component of f
Convention: f := on-set( f )
f := {x̂ ∈ B n | f (x̂) = 1}
Incomplete specification of f
f : B n → {0, 1, ∗}
on-set( f ) = F = {x̂ ∈ B n | f (x̂) = 1}
don’t-care-set( f ) = D = {x̂ ∈ B n | f (x̂) = ∗}
off-set( f ) = F ∪ D = {x̂ ∈ B n | f (x̂) = 0}
Convention: F ⊆ f ⊆ F ∪D
14
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Cofactor (restriction)
Cofactor of f (x1 , . . . , xi , . . . , xn )
w.r.t. xi : f |xi =1 = fxi = f (x1 , . . . , 1, . . . , xn )
w.r.t. xi : f |xi =0 = fxi = f (x1 , . . . , 0, . . . , xn )
f = xi · fxi + xi · fxi
∂f
Boolean difference of f (x) : ∂xi ( f ) = = f[xi ] = fxi ⊕ fxi
∂xi
w.r.t. xi
f is a tautology : ⇐⇒ ∀
x̂∈B n
[ f (x̂) = 1] , f (x) = 1
f is a contradiction : ⇐⇒ ∀
x̂∈B n
[ f (x̂) = 0] , f (x) = 0
15
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
fxi ⊆ fxi ⇐⇒ fxi = fxi + fxi ⇐⇒ fxi = fxi · fxi ⇐⇒ fxi + fxi = 1
fxi ⊆ fxi ⇐⇒ f = xi · fxi + fxi ⇐⇒ f = xi · fxi · fxi ⊕ fxi
fxi ⊆ fxi ⇐⇒ fxi = fxi + fxi ⇐⇒ fxi = fxi · fxi ⇐⇒ fxi + fxi = 1
fxi ⊆ fxi ⇐⇒ f = xi · fxi + fxi ⇐⇒ f = xi · fxi · fxi ⊕ fxi
f is unate : ⇐⇒ ∀ f is unate in xi
xi ∈set(x)
Additional Comment:
To every set M, M ⊆ G, a binary Boolean function f (x) can be assigned by a coding of its
elements z, z ∈ M:
z := x̂ ; |G| = 2n
z ∈ M ⇐⇒ x̂ ∈ M ⇐⇒ x̂ ∈ on-set( f ) ⇐⇒ f (x̂) = 1
i.e.: M , on-set( f )
f (x) : characteristic function of M
16
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Truth table, TT
[
CSOP : f = ∑ mκ , mκ ; mκ ⊆ f , mκ ∈ MOC
κ κ
Example (1) : f = m0 + m2 + m3 + m7
TT 1 f (x, y, z) = x·y·z + x·y·z + x·y·z + x·y·z
f = {000} ∪ {010} ∪ {011} ∪ {111}
f = {000, 010, 011, 111}
Additional Comment:
f (x, y, z) = (x + x) · f = x · f + x · f = x · fx + x · fx
= (x + x) · (y + y) · (z + z) · f
e. g. f (0, 1, 0) = fx·y·z
17
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
[
SOP : f = ∑ cκ , cκ ; cκ ⊆ f , cκ ∈ MC
κ κ
Example (2) : f = c0 + cα + cβ , c0 ∪ cα ∪ cβ
TT 2 f (x, y, z) = x·y·z + x·y + y·z
f = {000} ∪ {01∗} ∪ {∗11}
f = {000} ∪ {010, 011} ∪ {011, 111}
Example (3) : f = cγ + cβ , cγ ∪ cβ
TT 3 f (x, y, z) = x · z + y · z
f = {0∗0} ∪ {∗11} = {000, 010} ∪ {011, 111}
\
CPOS : f = ∏ mκ , mκ ; mκ ⊆ f , mκ ∈ MOC
κ κ
Example (1) : f = m1 + m4 + m5 + m6
TT 1 f = m1 · m4 · m5 · m6
f (x, y, z) = (x + y + z) · (x + y + z) · (x + y + z) · (x + y + z)
\
POS : f = ∏ cκ , cκ ; cκ ⊆ f , cκ ∈ MC
κ κ
Example (2) : f = c1 · cρ · cσ ; f = c1 + cρ + cσ
TT 2 f (x, y, z) = (x + y + z) · (x + y) · (x + z)
Example (3) : f = cτ · cσ ; f = cτ + cσ
TT 3 f (x, y, z) = (y + z) · (x + z)
f (x, y, z) = x · z + y · z + x · y (SOP)
18
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Circuit Implementation
Example (1) : x y z
w = f (x, y, z) = x · y · z + x · y · z + x · y · z + x · y · z
Literal count : 12
(Effort, area consumption)
Two-level realization w
Number of circuit levels : 2
(Signal delay)
≡
19
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
w = f (x, y, z) = x · y · z + x · y + y · z w = f (x, y, z) = x · z + y · z
(7 literals) (4 literals)
x y z
x y z
w w
Example (MUX) :
x
x a y = β(x, a, b)
a M y = ite(x, a, b)
U y
b X b
x : Selector input
a, b : Data inputs
x · a + x · b ⇐⇒ if x then a , else b
β(x, a, b) , ite(x, a, b)
Multiplexer function β :
y = β(x, a, b) = x·a+x·b
= (x + a) · (x + b)
= (x → a) · (x → b)
= [x · (a ⊕ b)] ⊕ b
20
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Set of implicants : MI = {c ∈ MC | c ⊆ f }
Proposition:
(1) y · z ∈ MPI
Reasoning : (y · z)y = z ; (y · z)z = y ;
z∈/ MI AND y ∈ / MI or z 6⊆ f AND y 6⊆ f , since
fz = y + x · y = y 6= 1 AND fy = z + x 6= 1
(2) x · y · z ∈
/ MPI
Reasoning : (x · y · z)y = x · z ;
x · z ∈ MI or x · z ⊆ f , since
fx·z = y + y = 1
21
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
e. g. SOP : f (x, y, z) = x · y · z + x · y · (z + z) + y · z · (x + x)
| {z } | {z }
=1 =1
CSOP : f (x, y, z) = x · y · z + x · y · z + x · y · z + x · y · z
Number of
positive Minterm of f
literals 0-cube A 1-cube A 2-cube A ...
√
0 x · y · z , {000} = m0 x · z , {0∗0} = cγ
√
1 x · y · z , {010} = m2 x · y , {01∗} = cα
√
2 x · y · z , {011} = m3 y · z , {∗11} = cβ
√
3 x · y · z , {111} = m7
e. g.
CompSOP, : f = x · z + x · y + y · z = p1 + p2 + p3
complete sum of products
prime cover : pcov( f ) = {p1 , p2 , p3 }
22
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Example:
CSOP : f = m0 + m2 + m3 + m7 ; CompSOP: f = p1 + p2 + p3
For each minterm For each prime implicant
of f : m ⊆ f of f : p ⊆ f
For each minterm m at least one prime implicant p must exist in the MinSOP,
such that: m ⊆ p , i. e.
C = (m0 ⊆ p1 ) · ( m2 ⊆ p1 + m2 ⊆ p2 ) · ( m3 ⊆ p2 + m3 ⊆ p3 ) · (m7 ⊆ p3 )
!
C = τ1 ·( τ1 + τ2 )·( τ2 + τ3 )· τ3 = 1
&
C = τ1 · τ3 + τ1 · τ2 · τ3
Absorption
C = τ1 · τ3 ; τν is selection variable for pν ; τν ∈ {0, 1}
Covering table:
H m m0 = m2 = m3 = m7 =
HH
p HHH x · y · z x · y · z x · y · z x · y · z
p1 = x · z 1 1 0 0 Selection of p1 : Covering of m0 and m2
p2 = x · y 0 1 1 0
p3 = y · z 0 0 1 1 Selection of p3 : Covering of m3 and m7
b) Cross out minterms (columns), which will be covered when a dominant minterm is
covered.
e. g. m2 is dominated by m0 and
m3 is dominated by m7 .
c) Select prime implicants based on maximal number of ’1’s in rows (greedy algorithm).
23
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Determination of all prime implicants of f by exhaustive application of two laws on the SOP
(Determination of CSOP not required!)
Resolution method
(Layer algorithm)
f Layer t Layer
lA lA lA lA lA lA
x·y+x·y·z+x·y·z 0 y·z+x·z+y·z+x·z 0
R R
+y · z + x · z 1 +x · y + z + x · y + x · y + z + x · y 1
R
No further resolvents possible. R +y + x + 1 + . . . 2
and A laws have been applied ex- If repeated application of the resolution
haustively. Computation of Comp- rule – starting from an arbitrary SOP –
SOP by determination of all possi- leads to a resolvent 1, then t = 1 has been
ble prime implicants! proven. Tautology proof of t using the
layer algorithm!
24
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
SOP Layer
...+x·a+x·b+... 0
R
...+a·b+... 1
.. ..
. .
+1 or maximal number n
of prime impli-
cants
Example (2):
POS : f (x, y, z) = (x + y) · (x + z) · (x + y + z)
| {z } | {z } | {z }
CompSOP CompSOP CompSOP
l l
= (x + x · z + x · y + y · z) · (x + y + z)
= (x + y · z) · (x + y + z)
| {z } | {z }
CompSOP CompSOP
l
= x·x+x·y+x·z+x·y·z+y·z+y·z·z
CompSOP: f (x, y, z) = x · y + x · z + y · z
25
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
a) Karnaugh map
Representation for n = 3
z Segment mν ; mν ∈ MOC , ν = 0 , . . . , 2n − 1
Set of segments: MOC
xyz mµ and mν are neighboring segments, IF δµν = 1
000 001 101 100
xyz y
010 011 111 110
n=2 n=1
x
00 10 0
y x
01 11 1
x
b) Cube graph Gn = (MOC, E)
Representation for n = 3
xyz vertex mν
111
edge k = (mµ , mν )
mµ
011 101 110
set of vertices: MOC
mµ , mν ∈ MOC
001 010 100
set of undirected edges: K
K ⊆ MOC × MOC
x y z 000 (mµ , mν ) ∈ K ⇐⇒ δµν = 1
n=0
n=1
n=2
n
Definition : A cube graph Gn (n-cube) consists of 2n vertices and 2 · 2n edges. Each vertex is
of degree g = n.
26
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
z
x y z w 0000 0001 0101 0100
xyz
111
xyzw
1111
x y z 000
n=3
x y z w 0000
n=4
27
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
c) Example (1):
n=3
x·y
z }| {
Given CSOP : f = x·y·z+x·y·z+x·y·z+x·y·z
| {z } | {z }
x·z y · z
xyz
111 1
z
011 1 101 0 110 0
1 0 0 0
x y z 000 001 101 100
001 0 010 1 100 0
1 1 1 0 y
010 011 111 110
x y z 000 1 x
Wanted MinSOP : f = x · z + y · z
f = {0 ∗ 0, ∗11}
xyz
111 1
y·z
z
011 1 101 0 110 0
1 0 0 0
x y z 000 001 101 100
001 0 010 1 100 0
1 1 1 0 y
010 011 111 110
x·y x·z
x y z 000 1 x·z y·z x
28
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
d) Example (4):
n=4
y·z
z }| {
Given SOP : f = y · z · w + y · z · w +y · z · w + x · y · w
| {z }
y·w x·w
x y z w
w
1 1
0000 0001 0101 0100
y·z·w 1 f
0010 0011 0111 0110
z
1 1
1010 1011 1111 1110
x
1 1 1 x·y·w
1000 1001 1101 1100
y·z·w y
y·z·w 12 literals
xyzw
1111 1
x·y·w
y·z·w
y·z·w
x y z w 0000 1
29
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Wanted MinSOP : f = y · z + y · w + x · w
w x y z w
1 1
0000 0001 0101 0100
f
y·w 1
0010 0011 0111 0110
z
1 1
1010 1011 1111 1110
x
1 1 1 x·w
1000 1001 1101 1100 6 literals
y·z y
xyzw
1111 1
x·w
y·w
0001 1 0010 0 0100 0 1000 1
y·z
x y z w 0000 1
30
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Example (5): x f1
y S1 f2 f : B3 → B2
z
Multiple Irredundant
SOP MinSOP
implicant x y z Cover
f1 xyz+yz xz+yz xz+yz+xyz xz+xyz
f2 xy+xyz xy+xz xy+xz+xyz xz+xyz
Literals 10 8 11 7
31
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
f1 f1
f2 f2
f1 · f2 = (x · z + y · z) · (x · y + x · z)
= y·z · x·y = x·y·z
= {∗11, 10} · {01∗, 01} = {011, 11}
output part
input part } of a 3-2 value assignment tuple
, f2
32
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Example (6): x1 y1
x2 S2 y2 f : B3 → B2 ; f (x̂) = ŷ ⇐⇒ (x̂, ŷ) ∈ f ⇐⇒ x̂ 7→ ŷ
x3
F1 ⊆ f1 ⊆ F1 ∪ D1
x̂1 x̂2 x̂3 ŷ1 ŷ2 F1 = {0 ∗ 0, 101} , D1 = {001}
0 * 0 1 0 f1 = x1 · x3 + x1 · x2 · x3 + x1 · x2 · x3
1 0 1 1 0
0 0 1 * 1 F2 ⊆ f2 ⊆ F2 ∪ D2
* 0 1 0 1 F2 = {∗01, 010} , D2 = {011}
0 1 0 0 1 f2 = x2 · x3 + x1 · x2 · x3 + x1 · x2 · x3
0 1 1 0 *
(x̂, ŷ) ∈ B 3 × B 2 | f (x̂) = ŷ
f :=
Convention: tuple (x̂, ŷ) with ŷ = 00 will not be included in the set f .
optional optional
f ={(0 ∗ 0, 10),(101, 10),(001, ∗1), (∗01, 01), (010, 01),(011, 0∗)}
Expand
(001, 10), (001, 01) Expand (011, 01)
| {z } | {z } | {z }
(∗01, 10), (∗01, 01), (01∗, 01)
| {z }
(∗01, 11) multiple prime implicant
x1 x2 x3
y1
y2
33
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
j
Modification : (i, j) , i , ϕ(i) ≥ ϕ( j)
(Transition of configuration from i
to j or from j to i) E.g.: In covi ( f ) one literal is removed from a product
Important: feasibility check! term, or in cov j ( f ) one literal is added to a product
term.
Set of all possible modifications : R ⊆ H × H , R is a binary relation
Configuration graph : G = (H, R) , H : Set of vertices
R : Set of edges
Set of successor configurations of : Γ(i) = { j ∈ H|(i, j) ∈ R}
i∈H
Configuration i is a local minimum : Γ(i) = 0/
4 5
i
34
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Modification
Feasibility conditions: c + h = cl + h
c + h = cl · l + cl · l + h = c + cl · l + h
h = cl · l + h
cl · l ⊆ h
c·l ⊆ h
c ⊆ h
Checking for containment (as in 1., 2., and 3.) is very simple in special cases:
Case 1) c ⊆ h, IF p⊆h AND c⊆ p Absorption (A)
Case 2) c ⊆ h, IF l · c1 + l · c2 ⊆ h AND c ⊆ c1 · c2 Resolution (R)
35
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Let f : B n → B and c ∈ MC or c1 , c2 ∈ MC .
Then : c ⊆ f ⇐⇒ fc ≡ 1 .
And : c1 + c2 ⊆ f ⇐⇒ ( fc1 ≡ 1) AND ( fc2 ≡ 1)
Example : f (x, a, b) = x · a + x · b ; c = a · b
a · b ⊆ f ⇐⇒ fab = 1 ⇐⇒ f (x, 1, 1) = 1 ⇐⇒ x + x = 1
Proof of tautology for a function can recursively be reduced to proof of tautology for the
cofactors of the function:
Example : f (x, y, z) = z · (x · y + x · y) + x + y + x · y
From fz ⊆ fz AND fz = x + y + x · y = 1
it follows f (x, y, z) = 1
36
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
x1 z4 Gate
x2 g4 Module
z1
x3 g1 fanout g6 y1
z3
x4 g3 z5
g5 y2
z2
x5 g2
x6
x7
1. 2. 3. 4. Level
Chaining of subfunctions:
37
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
y1 = y2 + x1 · x2 + x1 · x3 + x1 · x4
Example (7) : y2 = x2 · x5 · x7 + x2 · x6 · x7 + x3 · x5 · x7 + x3 · x6 · x7 + x4 · x7
y1 x1 z4
x2
x3 z1 y1
z3
x4 y2
x5 z5
x6 z2
2-level x7
implementation 4-level implementation
Algebraic methods for synthesis of multi-level circuits have been developed especially at the
University of California at Berkeley. They have been implemented in the tools MIS and SIS.
38
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
v1 v2 . . . vn V = B |v| , |V | = 2|v| ; W = B , |W | = 2
X = B |x| , |X| = 2|x| ; Y = B |y| , |Y | = 2|y|
w |X ×Y | = |X| · |Y | = 2|x|+|y| = 2|v|
f
w = f (v) ; f :V →W ; v̂ 7→ ŵ
x y w = f (x, y) f : X ×Y → W ; (x̂, ŷ) 7→ ŵ
Comments:
The task of functional decomposition describes in a general manner the decomposition of com-
binational circuits into interlinked subcircuits (or the decomposition of a Boolean function into
interlinked subfunctions, respectively).
In contrast to algebraic methods, all laws of Boolean algebra are used in functional decomposi-
tion.
The assumption of a disjoint partitioning of the variables does not limit the generality of this
method, since e.g. common variables can be assigned completely to the set of bound variables.
A beneficial partitioning of the variables can be determined e.g. by “quick exploration” using
BDDs.
39
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
f (x̂i , y) = f (x̂ j , y) ⇐⇒ x̂i ∼ x̂ j ; x̂i and x̂ j are equivalent, i.e. are elements of an
equivalence class Xk of the partition Π of X.
Π(X) = {X1 , X2 , X3 }
= {{000, 010, 100}, {001, 111}, {011, 101, 110}}
Result of step 1:
w = f (x, y) = (m0 + m2 + m4 ) · y1 + (m1 + m7 ) · (y1 + y2 ) + (m3 + m5 + m6 ) · y2
40
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
z = h(x) , h : X →Z ; X = B 3 , Z = B |z|
value assignment : X → Z
(ẑ1 , ẑ2 )k
X1 000, 010 y1
100
X2 001, 111 y1 + y2
011, 101
X3 y2
110
X h Z w = f (x̂, y)
w = g(ẑ, y)
The mapping of value assignments (ẑ1 , ẑ2 )k with k = 0, 1, 2, 3 , i.e. of 00, 01, 10, 11,
to the available positions in Z is called coding.
Assignment condition:
41
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Coding 1:
ẑk ∈ Z
x̂i ∈ X z = h(x) g(ẑk , y)
(ẑ1 , ẑ2 )k
000, 010, 100 00 z1 · z2 = m0 + m2 + m4 y1
001, 111 10 z1 · z2 = m1 + m7 y1 + y2
011, 101, 110 11 z1 · z2 = m3 + m5 + m6 y2
01 z1 · z2 = 1 not possible
Assignment table
z1 = z1 · z2 + z1 · z2 = m1 + m7 + m3 + m5 + m6
z2 = z1 · z2 + z1 · z2 = m3 + m5 + m6
z1 = h1 (x) = x1 · x2 + x3
z2 = h2 (x) = x1 · x2 · x3 + x1 · x2 · x3 + x1 · x2 · x3
Coding 2:
ẑk ∈ Z
x̂i ∈ X z = h(x) g(ẑk , y)
(ẑ1 , ẑ2 )k
000, 010, 100 00 z1 · z2 = m0 + m2 + m4 y1
001, 111 10 z1 · z2 = m1 + m7 y1 + y2
011, 101 11 z1 · z2 = m3 + m5 y2
110 01 z1 · z2 = m6 y2
Assignment table
z1 = z1 · z2 + z1 · z2 = m1 + m7 + m3 + m5
z2 = z1 · z2 + z1 · z2 = m3 + m5 + m6
z1 = h1 (x) = x3
z2 = h2 (x) = x1 · x2 · x3 + x1 · x2 · x3 + x1 · x2 · x3
42
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Coding 1:
w = g(z, y) = z1 z2 · y1 + z1 z2 · (y1 + y2 ) + z1 z2 · y2
= z1 z2 · y1 + z1 z2 · y1 + z1 · y2
Coding 2:
w = g(z, y) = z1 z2 · y1 + z1 z2 · (y1 + y2 ) + z1 z2 · y2 + z1 z2 · y2
w = g(z, y) = z1 z2 · y1 + z1 z2 · y1 + z1 · y2 + z2 · y2
w = f (x, y) = f (x1 , x2 , x3 , y1 , y2 )
w = x1 x3 · y1 + x3 · y2 + x1 x2 x3 · y1 + x2 x3 · y1 + x1 x2 · y2 + x1 x2 x3 · y1
y1
y2 g
x1 z1
w
x2 z2
x3
43
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
OBDD( f ) = (V, E) is a directed acyclic graph (dag) which recursively defines a Boolean
function f .
Shannon expansion
as root tree OBDD( f )
44
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Example:
vi vi vi
f (x, y, z) x vi vi
1 0 =⇒ =⇒ =⇒
g(y, z) g(y, z) g(y, z) y g(y, z) x
1 0 0 0 0
OBDD(g) OBDD(g) OBDD(g) g(1, z) g(0, z)
SR2 : Merging of equivalent Sub-OBDDs
vi vj vi vj vi vj
=⇒ =⇒
g(y, z) g(y, z) g(y, z) y
1 0
OBDD(g) OBDD(g) OBDD(g) g(1, z) g(0, z)
45
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
ROBDD( f ) , x ≺ y ≺ z
1 x x x 1
1 0 0 0
2 y y SR1 1 y SR2 1 y 2
=⇒ =⇒
3 z z z z z z 3
0 0 1 0
ROBDD( f ) , x ≺ y ≺ z ROBDD( f ) , z ≺ y ≺ x
x z
1 0 1
y y y 0
z z x
1 0 1 0
ROBDD( f ) , x1 ≺ x2 ≺ x3 ≺ y1 ≺ y2
x1
1 0
x2 x2
x3 x3 x3
y1 + y2 y1 y1 y1
y2 y2
0 1
46
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Since about 1990, the representation of Boolean functions by binary decision diagrams has
improved the effectiveness of design and verification of digital systems significantly.
Properties of ROBDDs:
+ Negation of f trivial
Negation of values in terminal vertices
– ROBDD size grows exponentially with number of variables for some functions
E.g. for multiplier functions
– SOP representation closer to implementation for some realization technologies (e. g. PLDs)
47
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
s(t) z(t)
Q D
D flipflop
clock
Time diagram:
Clock period t 0 1 2 3 4 5 6 7 ...
Input signal x(t) 1 1 0 0 0 1 1 0 ...
Output signal y(t) 0 0 1 0 1 0 0 1 ...
x(4) 0
x(3) 0
x(2) 0
1 1 y(4)
x(1)
1 0 y(3)
x(0)
∗ 1 y(2)
s(0)
0 y(1)
0 y(0)
48
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
clock
Types of machines:
Mealy automaton λ : S × I → O , y = λ(s, x)
Moore automaton λ : S → O , y = λ(s)
49
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
δ ··· Xj · · · λ ··· Xj · · ·
... ... ... ...
Si · · · Sk · · · Sj ··· Yl · · ·
... ... ... ...
state transition table, state table output table
δ : S×I → S λ : S×I → O
Sk = δ(Si , X j ) Yl = λ(Si , X j )
state transition function, next-state function output function
µ : S×I → S×O
(Sk ,Yl ) = µ(Si , X j )
state output function
µ ··· Xj ···
... ...
50
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
next
Reset 0/0 x̂ state state ŷ
µ x=0 x=1 S1 0 S1 S1 0
0/0 1 S1 S2 1
S1 (S1 , 0) (S2 , 1) 1/1
≡ 1/1 ≡ 0 S2 S1 0
S2 (S1 , 0) (S3 , 0)
S3 (S3 , 0) (S1 , 1) S3 S2 1 S2 S3 0
1/0
0 S3 S3 0
state output table
0/0 1 S3 S1 1
STG
cube table
x s1 s2 z1 z2 y
0 00 00 0
y = x · s1 · s2 + x · s1 · s2 = x · s2
1 00 01 1 state z2 = x · s1 · s2
0 01 00 0 coding
z1 = x · s1 · s2 + x · s1 · s2
1 01 10 0 S1 , 00 , s1 · s2
+ x · s1 · s2 + x · s1 · s2
0 10 10 0 S2 , 01 , s1 · s2 | {z }
S3 , 10 , s1 · s2 optional
1 10 00 1
z1 = x · s2 + x · s1
0 11 (1)∗ ∗(0) ∗(0)
1 11 (1)∗ ∗(0) ∗(0)
51
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Operations on strings
: S0 , str(x), ε
Initial configuration of FSM
Final configuration of FSM : (S∗ , ε, str(y))
Configuration, situation of FSM : (St , str(x), str(y)) , St : current state
str(x) : current input string
str(y) : current output string
Configuration transition: (Relation)
e.g. S0 , x0 x1 x2 x3 , ε S1 , x1 x2 x3 , y0
2
S2 , x2 x3 , y0 y1
4
S4 , ε, y0 y1 y2 y3
k
Sk , xk xk+1 . . . , y0 y1 y2 . . . yk−1
∗
S∗ , ε, y0 y1 y2 . . . y∗
52
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
State Minimization
Π(S) = {K1 , . . . , Kl , . . . , KL } ; Si , S j ∈ Kl ,
S
l Kl =S
Remark: Si 6∼ S j ⇐⇒ there exists a str(x), such that λ(Si , str(x)) 6= λ(S j , str(x))
differentiable different output patterns
states
k
Si ∼ S j ⇐⇒ λ(Si , str(x)|k ) = λ(S j , str(x)|k ) , for all str(x)|k
The iterative computation of k-equivalent (or simply: equivalent) states starts with the
computation of the 1-equivalent states, since:
0
Si ∼ S j ⇐⇒ λ(Si , ε) = λ(S j , ε) ⇐⇒ ε = ε , for all Si , S j ∈ S , Π(0) = {S}
coarsest partition of S
53
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
0/0
µ x=0 x=1
S1 S4
S1 (S4 , 0) (S2 , 1) 0/0
1/1 1/1
S2 (S4 , 0) (S3 , 0) 1/1 0/0
≡
S3 (S3 , 0) (S1 , 1) S3 S2
S4 (S1 , 0) (S2 , 1) 1/0
2 1 1 1
Si ∼ S j ⇐⇒ [Si ∼ S j ] ∧ [δ(Si , 0) ∼ δ(S j , 0)] ∧ [δ(Si , 1) ∼ δ(S j , 1)]
2 1 1 1
e.g. S1 ∼ S4 ⇐⇒ [S1 ∼ S4 ] ∧ [S4 ∼ S1 ] ∧ [S2 ∼ S2 ]
2
l
1 1 1 2
S1 ∼ S3 ⇐⇒ [S1 ∼ S4 ] ∧ [S4 ∼ S3 ] ∧ [S2 ∼ S1 ] , S1 6∼ S3
n false o
(2)
Π = {S1 , S4 }, {S3 }, {S2 }
3 2 2 2
S1 ∼ S4 ⇐⇒ [S1 ∼ S4 ] ∧ [δ(S1 , 0) ∼ δ(S4 , 0)] ∧ [δ(S1 , 1) ∼ δ(S4 , 1)]
2 2 2
⇐⇒ [S1 ∼ S4 ] ∧ [S4 ∼ S1 ] ∧ [S2 ∼ S2 ]
Π(3) = Π(2) = Π(S)
Result: state S1 and S4 are equivalent and can be merged in STG (see example (10)!).
54
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
k+1 k k
Si ∼ S j ⇐⇒ [Si ∼ S j ] ∧ [δ(Si , x0 ) ∼ δ(S j , x0 )] , for all x0 ∈ {0, 1}
k+1 k k k
Si ∼ S j ⇐⇒ [Si ∼ S j ] ∧ [δ(Si , 0) ∼ δ(S j , 0)] ∧ [δ(Si , 1) ∼ δ(S j , 1)]
k+1 1 k k
Comment: Si ∼ S j ⇐⇒ [Si ∼ S j ] ∧ [δ(Si , 0) ∼ δ(S j , 0)] ∧ [δ(Si , 1) ∼ δ(S j , 1)]
Π(1) =
A (E, 0) (C, 0) {A, D, G, F}, {B,C}, {E}
2 00 01 10 ŷ−assignment
D (G, 0) (A, 0)
···························· 3 Π(2) =
{A}, {D, G}, {F}, {B,C}, {E}
G (D, 0) (G, 0)
2 2
l
1 1 1
F (E, 0) (D, 0) e.g. A ∼ D ⇐⇒ [A ∼ D] ∧ [E ∼ G] ∧ [C ∼ A]
1 false false
B (C, 0) (A, 1)
···························· 3 2 1 1 1
D ∼ G ⇐⇒ [D ∼ G] ∧ [G ∼ D] ∧ [A ∼ G]
C (B, 0) (G, 1)
1
Π(3) =
E (F, 1) (B, 0) {A}, {D}, {G}, {F}, {B}, {C}, {E}
finest decomposition of S
state output table
(appropriately sorted)
55
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Machine types:
Mealy Automaton λ: S × I → O , Yl = λ(Si , X j )
Moore Automaton λ: S → O , Yl = λ(Si )
Medwedew Automaton λ : I → O , Yl = λ(X j )
Properties of machines:
completely specified – incompletely specified
simplified
minimal Sj
x=1
deterministic – non-deterministic
Si
x=1
Sl
{S j , Sl } = δ({Si }, 1)
State minimization
Verification, testing
State coding
Logic minimization
Timing optimization
56
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
G.D. Hachtel, F. Somenzi: Logic Synthesis and Verification Algorithms, Kluwer, 1996.
Literature (1)
57
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
1 Introduction
• Why use simulation?
1. Hardware design validation (logic function, timing, power consumption)
2. Fault simulation (fault coverage)
3. Early co-validation of system hardware and software
• Simulation levels:
Abstraction levels
System
Algorithm
Register-Transfer
Logic
Switch-Level
Circuit
Device
Process Complexity
1 10 102 103 104 105 106 107 108 109 1010 # Transistors
Component models
- logic function
- timing behavior
Netlist
Simulator
Stimuli
Signal traces
59
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Circuit Modeling
b) Hazard: (short) signal pulse does not conform to the pure logic function of
a circuit; caused by internal delays
z1 z2 z3 z5
x 2∆ 2∆ 2∆ 2∆
2∆ y
z4
2∆
∆
x 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
z1 1 1 1 1 0 0 0 0 0 1 1 1 1
z2 0 0 0 0 1 1 1 1 1 0 0 0 0
z3 , z4 1 1 1 1 0 0 0 0 0 1 1 1 1
z5 0 0 0 0 1 1 1 1 1 0 0 0 0
y 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0
Hazard
60
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
timing diagram:
x, z5 0 0 0 1 1 1 0 0 0 Boolean function:
z4 1 1 1 0 0 0 1 1 1 y = x·x = x·x = 0
y 0 0 0 0 0 0 0 0 0
x 2∆ 2∆ 2∆ 2∆
2∆ y
2∆
fan-in without specification
of gate function
0 2 4 6 8
x 6 .. 8 8 ..10
6 y
61
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
A signal change does not have an ideal edge (infinite slope). Therefore, a transition period
results, during which the signal value is undefined. In simulation this is represented by a new
signal ”X”.
Example:
z1 z2 z3 z5
x 2∆ 2∆ 2∆ 2∆
2∆ y
z4
2∆
x 0 0 0 X 1 1 1 1 1 1 1 1 X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
z1 1 1 1 X 0 0 0 X 1 1 1
z2 0 0 0 X 1 1 1 X 0 0 0
z3 , z4 1 1 1 X 0 0 0 X 1 1 1
z5 0 0 0 X 1 1 1 X 0 0 0
y 0 0 0 0 0 0 0 0 X 1 X 0 0 0
Hazard
AND 0 1 X OR 0 1 X NOT
0 0 0 0 0 0 1 X 0 1
1 0 1 X 1 1 1 1 1 0
X 0 X X X X 1 X X X
62
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Let the minimum and maximum delay of a gate be known. In between the output value is
undefined
x τd y x (ideal) 0 0 1 1 1 1 1
y 1 1 1 XX0 0
e.g. τdmin = ∆
τdmax = 3∆
Example:
z1 z2 z3 z5
x τd τd τd τd
z6
z4
τd y
τdmin = 3∆ τd
τdmax = 4∆
x 0X 1 1 1 1 1 1X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
z1 1 1 1 1XX 0 0 0 0 0XX 1 1 1
z2 0 0 0XXX 1 1 1 1XXX 0 0 0
z3 , z4 1 1 1XXXX 0 0 0XXXX 1 1 1
z5 0 0 0X X 1 1X X 0 0 0
z6 0 0X 0 0X X 0 0 0
y 0 0XX 0 0X X 0 0
Hazard possible
This method results in a worst-case analysis, due to the increasing uncertainty range.
τd τw2
τw1
63
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
3 Simulation methods
Simulation program
a) Modeling circuit components using basic elements (primitives) of the simulation system
b) Circuit replication (compilation or list creation)
c) Simulation execution
+ 1 delta cycle
64
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
B τ S2
Nand_b
• Simulation run:
• Signal waveforms:
t 0 10 12 14 20 30 32 34 36
1
A 0
1
B 0
1
Sel 0
1
Seln 0
1
S1 0
1
S2 0
1
Q 0
Hazard
65
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
4 VHDL
VHSIC Hardware Description Language (VHSIC = Very High Speed Integrated Circuit)
• widely used hardware description language for simulation, documentation, and synthesis
Sel A B
MUX Architecture
Entity dataflow
Black Box Multiplexer
VHDL (1)
66
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
3. Structural description:
Nand_a
A S1
Inv Nand_c
Sel Seln Q
B S2
Nand_b
BEGIN
Inv: Inverter PORT MAP (Sel, Sel_n);
Nand_a: Nand2 PORT MAP (A, Sel_n, S1);
Nand_b: Nand2 PORT MAP (B, Sel, S2);
Nand_c: Nand2 PORT MAP (S1, S2, Q);
END structure;
4. Validation by simulation:
Testbench:
VHDL (2)
67
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Interface description:
ENTITY Testbench IS
--
-- no inputs, no outputs.
--
END Testbench;
1
A
0
1
B
0
1
Sel
0
1
Q
0
VHDL (3)
68
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Processes:
• Statements with a PROCESS are executed sequentially within an infinite loop.
• All Processes are concurrent.
• A PROCESS must have either a WAIT-statement or a Sensitivity-List.
• Each signal assignment outside of a PROCESS will be modified into a new PROCESS
by the simulator.
• In a PROCESS variables can be used in addition to signals.
• Have temporal ”memory”. Future signal values are planner by entry of a transaction
(wn , tn ) in the signal driver.
(wn : planned signal value, tn : timestamp) (transaction 6= event)
• In value assignments “<= waveform” the new value will be planned. It will be incurred
only when the PROCESS will be suspended (during the signal update phase).
Variables:
VHDL (4)
69
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
Delay Mechanisms:
Event-driven simulation:
Execution of all transactions at time step tn in ∆-cycles. Advancing the simulation time
tn → tn+1 when all transactions at time tn have been executed.
∆-cycle:
• Signal-Update-Phase:
– Execution of all transactions for the current time step.
– If a transaction changes a signal value, this is an event.
• Process-Evaluation-Phase:
– Processes, for which an event is present, will be executed.
– Value assignments to signals will be scheduled in the signal driver.
Signal- Signal-
Update Update
+∆ +∆
es
ycl
Process- Process-
∆-c
Evaluation Evaluation
tn tn+1 Time
VHDL (5)
70
INSTITUTE FOR ELECTRONIC DESIGN AUTOMATION
TECHNISCHE UNIVERSITÄT MÜNCHEN
PROFESSOR DR.-ING. U. SCHLICHTMANN
VHDL (6)
71