Simplification
Logic realization
two-level simplification
exploiting dont cares
algorithm for simplification
two-level logic and canonical forms realized with NANDs and NORs
multi-level logic, converting between ANDs and ORs
Time behavior
Hardware description languages
N1
A
B
N2
C
D
LT
EQ
GT
AB<CD
AB=CD
AB>CD
block diagram
and
truth table
A
0
B
0
C
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
D
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
LT
0
1
1
1
0
0
1
1
0
0
0
1
0
0
0
0
EQ
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
GT
0
0
0
0
1
0
0
0
1
1
0
0
1
1
1
0
D
C
D
C
K-map for LT
K-map for EQ
K-map for GT
B C
two alternative
implementations of EQ
with and without XOR
EQ
EQ
A1
A2
B1
B2
P1
P2
P4
P8
block diagram
and
truth table
A2 A1 B2
0 0 0
0
1
1
0 1 0
0
1
1
1 0 0
0
1
1
1 1 0
0
1
1
B1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
P8
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
P4
0
0
0
0
0
0
0
0
0
0
1
1
0
0
1
0
P2
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
0
P1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
1
4-variable K-map
for each of the 4
output functions
B2
K-map for P8
B1
P8 = A2A1B2B1
K-map for P4
P4 = A2B2B1'
+ A2A1'B2
B2
A2
0
A1
A1
A2
B2
A1
B1
K-map for P2
K-map for P1
P1 = A1B1
B1
P2 = A2'A1B2
+ A1B2B1'
+ A2B2'B1
+ A2A1'B1
B2
A2
0
B1
A1
I1
I2
I4
I8
O1
O2
O4
O8
block diagram
and
truth table
I8
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
I4
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
I2
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
I1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
O8
0
0
0
0
0
0
0
1
1
0
X
X
X
X
X
X
O4
0
0
0
1
1
1
1
0
0
0
X
X
X
X
X
X
O2
0
1
1
0
0
1
1
0
0
0
X
X
X
X
X
X
O1
1
0
1
0
1
0
1
0
1
0
X
X
X
X
X
X
I2
O8
I1
O8 = I4 I2 I1 + I8 I1'
O4 = I4 I2' + I4 I1' + I4 I2 I1I2
O2 = I8 I2 I1 + I2 I1'
I4
O2
I1
I4
O1 = I1'
I8
I2
O4
I8
O1
I1
I2
I4
I8
1
I1
I4
Implicant
Prime implicant
single element of ON-set or DC-set or any group of these elements that can
be combined to form a subcube
Objective:
6 prime implicants:
A'B'D, BC', AC, A'C'D, AB, B'CD
D
essential
minimum cover: AC + BC' +
A'B'D
A
5 prime implicants:
BD, ABC', ACD, A'BC, A'C'D
essential
minimum cover: 4 essential implicants
10
select the smallest number of prime implicants that cover the remaining 1s
11
D
C
D
C
A
X
D
C
D
C
2 essential primes
12
Activity
CD
BC
BD
AB
ACD
CD
BD
ACD
CD
BD
ACD
13
Sum-of-products
Product-of-sums
14
15
de Morgans:
A + B = (A B)
16
17
de Morgans:
A B = (A + B)
18
de Morgans law: (A + B) = A B
written differently: A + B = (A B)
(A B) = A + B
(A B) = (A + B)
In other words
19
conservation of inversions
do not alter logic function
A
Z
B
C
D
NAND
NAND
NAND
20
A
Z
B
C
D
NAND
NAND
NAND
Z = [ (A B) (C D) ]
= [ (A + B) (C + D) ]
= [ (A + B) + (C + D) ]
= (A B) + (C D)
21
C
D
A
\A
NOR
\B
NOR
B
Z
C
D
conserve
"bubbles"
NOR
Step 1
NOR
\C
\D
NOR
Step 2
conserve
"bubbles"
22
\B
NOR
NOR
\C
\D
NOR
Z = { [ (A + B) + (C + D) ] }
={
(A + B) (C + D)
(A + B) + (C + D)
(A B) + (C D)
23
Multi-level logic
x =AD F + AE F + B D F + B E F + C D F + C E F + G
x = (A + B + C) (D + E) F + G
24
D
F = A (B +gates
C D) + B C
original
AND-OR
network
introduction and
conservation of
bubbles
redrawn in terms
of conventional
NAND gates
Level 4
F
B
A
B
\C
C
D
B
A
B
\C
C
D
\B
A
B
\C
25
F = A (B + C D) + B C
original
AND-OR
network
Level 1
Level 2
Level 3
C
D
B
A
B
\C
Level 4
F
C
introduction and
conservation of
bubbles
D
B
A
B
\C
redrawn in terms
of conventional
NOR gates
\C
\D
B
\A
\B
C
26
Example
A
B
C
D
A
B
C
\D
original circuit
B
C
X
F
X
B
C
\X
\D
add double bubbles to
invert output of AND gate
27
AND-OR-invert gates
AOI function: three stages of logic AND, OR, Invert
logical concept
A
B
C
D
AND
OR
C
D
NAND
Invert
&
+
&
A
B
NAND
Invert
&
+
&
28
A xor B = A B + A B
AOI form:
F = (A B + A B)
A
B
A
&
+
&
29
Example:
F = A B + A C + B C
F = (A B + A C + B C)
Implemented by 2-input 3-stack AOI gate
F = (A + B) (A + C) (B + C)
F = [(A + B) (A + C) (B + C)]
Implemented by 2-input 3-stack OAI gate
30
&
&
A1
B1
&
&
A2
B2
conservation of bubbles
+
NOR
&
&
A3
B3
high if A0 B0
low if A0 = B0
&
&
Z
if all inputs are low
then Ai = Bi, i=0,...,3
output Z is high
31
Advantages
Disadvantages
32
Waveforms
Some terms
rise time time for output to transition from low to high voltage
fall time time for output to transition from high to low voltage
pulse width time that an output stays high or stays low between changes
33
A A = 0
delays matter
F is not always 0
pulse 3 gate-delays wide
34
Oscillatory behavior
resistor
A
open
switch
B
C
D
close switch
initially
undefined
open switch
35
Behavioral/functional description
Simulation semantics
36
HDLs
37
Verilog
Behavioral
38
Structural model
endmodule
39
Continuous assignment
module xor_gate
input
output
reg
(out, a, b);
a, b;
out;
out;
simulation register
- keeps track of
value of signal
assign #6 out = a ^ b;
endmodule
40
always block
module xor_gate
input
output
reg
(out, a, b);
a, b;
out;
out;
41
2-bit vector
initial begin
only once at start
cnt = 0;
of simulation
repeat (4) begin
#10 cnt = cnt + 1;
$display ("@ time=%d, x=%b, y=%b, cnt=%b",
$time, x, y, cnt); end
#10 $finish;
print to a console
end
assign x = cnt[1];
assign y = cnt[0];
endmodule
directive to stop
simulation
42
Complete simulation
test-bench
x
y
43
Comparator example
44
(n0, n1, n2, n3, n4, n5, n6, n7, self, out);
n0, n1, n2, n3, n4, n5, n6, n7, self;
out;
out;
neighbors;
count;
i;
assign neighbors = {n7, n6, n5, n4, n3, n2, n1, n0};
always @(neighbors or self) begin
count = 0;
for (i = 0; i < 8; i = i+1) count = count + neighbors[i];
out = (count == 3);
out = out | ((self == 1) & (count == 2));
end
endmodule
45
Program structure
Assignment
Data structures
Parallelism
46
47
Design problems
Time behavior
Hardware description languages
Later
48