Beruflich Dokumente
Kultur Dokumente
Gate-Level Minimization
Outline
The Map method
Multi-variable maps
Product-of-Sums simplification
Don’t-Care conditions
NAND and NOR implementation
X-OR function
Gate-Level Minimization
K-map Method
K-map Method
K-map Method
Rules
Every cell containing a 1 must be included at least
once
Enclose the largest possible “power of 2 rectangle”
The 1’s must be enclosed in the smallest possible
number of rectangles
K-map Blocks
K-map Blocks
Example:
F ( x, y, z ) (2,3,4,5) xyz xyz xyz xyz
Corresponding K-map
2 blocks of size 2 F x y x y
K-map Blocks
Exercise
What is the K-map minimized form of the following
expression?
F ( x, y, z ) (3,4,6,7)
K-map Blocks
K-map Blocks
Rule of thumb
Write down the variables that do not change
F(A,B,C) = C+A’B
Boolean expression
F = A’C + A’B + AB’C + BC
F = C + A’B
Rule of thumb
Write down the variables that do not change
F(A,B,C) = C+A’B
Rule of thumb
Write down the variables that do not change
F(A,B,C) = C+A’B
Rule of thumb
Write down the variables that do not change
F(A,B,C) = C+A’B
4-Variable K-maps
4-Variable K-maps
4-Variable K-maps
Pair
Group of 2 adjacent minterms
Eliminates 1 variable
Quad
Group of 4 adjacent minterms
Eliminates 2 variables
Octet
Group of 8 adjacent minterms
Eliminates 3 variables
Redundant
All elements are covered by other groups
4-Variable K-maps
Example:
F AC AB BCD
4-Variable K-maps
Example:
F ( w, x, y, z ) (0,1,2,4,5,6,8,9,12,13,14)
F ( w, x, y, z ) y wz xz
Terminology
Implicant
Any product term in the SOP form
A block of 1’s in a K-map
Prime implicant
Product term that cannot be further reduced
Block of 1’s that cannot be further increased
Example:
F ( A, B, C , D ) (0,2,3,5,7,8,9,10,11,13,15)
Don’t Cares
Output of function irrelevant for some inputs
Input might never occur
Input is invalid
Representation
d(w,x,y,z) = Σ(0,2,5)`
5-Variable K-map
5-Variable K-map
Example:
F ( A, B, C , D, E ) (0,2,4,6,9,13,21,23,25,29,31)
Example F (0,1,2,5,8,9,10)
( A B).(C D).( B D)
NAND Implementation
NAND Implementation
NAND Implementation
Sum of minterms
NAND Implementation
Implementation
Rules
Convert all AND gates to NAND with AND-invert symbols
Convert all OR gates to NAND with invert-OR symbols
Check all bubbles in diagram. For every bubble that is not compensated
by another bubble, insert inverter
Example: F=(AB’+A’B)(C+D’)
NOR Implementation
NOR Implementation
With NOR
Conversion Example
F(A,B,C,D) = Σ(0,2,7,8,10,13)
d(A,B,C,D) = Σ(6,14,15)
Solution (SOP form): F = BC + B’D’ + ABD
Exclusive-OR Function
Exclusive-OR Function
Exclusive-OR Function
Odd Function
A B C ( AB AB ).C ( AB AB)C
ABC ABC ABC ABC
(1,2,4,7)
Even Function
Parity generator
Circuit that generates parity at the transmitter
Parity checker
Circuit that checks parity at the receiver
Parity generator
Parity checker
Manual methods
Boolean algebra
K-maps
Good for understanding
Difficult to handle large circuits
Involving several inputs (variables)
module
Fundamental descriptive unit in Verilog
Represented by a block of module and endmodule
Verilog
Verilog
Verilog code
Verilog
Gate delays
Propagation delay for transition from input to output
Specified in terms of (dimensionless) time units,
specified with #
Example
and #(30) G1 (w1, A, B);
Verilog
Verilog code
Verilog
Testbench
Usually has no input and output
Generally name of a testbench starts with a prefix t_
Inputs are defined with keyword reg
Outputs are defined with keyword wire
Verilog
Testbench code
module t_Simple_Circuit_prop_delay;
wire D, E;
reg A, B, C;
Simple_Circuit_prop_delay M1(A,B,C,D,E);
initial
begin
A = 1’b0; B = 1’b0; C = 1’b0;
#100 A=1’b1; B=1’b1; C=1’b1;
end
initial #200 $finish;
endmodule
Verilog
Output waveform
Verilog
Operators
& AND
| OR
~ NOT
Example
assign D = (A & B) | ~C;
Verilog
Verilog code
Verilog
primitive…endprimitive
table…endtable