minimization of and-or-exor three level networks with and gate sharing hasnain heickal (sh-223)
TRANSCRIPT
Minimization of AND-OR-EXOR Three Level Networks with AND gate Sharing
Hasnain Heickal (SH-223)
Overview Introduction AND-OR-EXOR networks Objective Preliminary Definitions Properties of EX-SOPs Minimization of EX-SOPs Idea of Minimization Summary Reference
Introduction Logic networks are usually designed using
AND and OR gates (SOP). AND-EXOR networks (EX-SOP) are
More compact. Easily testable. Fault tolerant
AND-OR-EXOR Networks A two input EXOR gate is used. AND gates can be shared or not shared. If not shared an EX-SOP for a function F can
be written as F = Fa xor Fb
If shared the EX-SOPcan be written asF = (Fa + Fs) xor
(Fb + Fs)
Objective Designing a AND-OR-EXOR three level
network. Minimizing the number of products. We will discuss an exact algorithm for
minimization.
Preliminary Definitions τ(F)
Number of products in an expression F. τ(ABC + A’BC + AC) = 3
τ(SOP:f) Number of product in a minimum SOP for f. τ(SOP : (ABC + A’BC + AC)) = 2 because it can be
minimized as BC + AC.
Preliminary Definitions τ(EX-SOPNS:f)
Number of products in a minimum EX-SOP for f with no product sharing.
τ(EX-SOPPS:f) Number of products in a minimum EX-SOP for f with
product sharing. A logic function f can represented as
f = (fa + g) xor (fb + g)……………………(1) τ(EX-SOPPS:f) = min{τ(SOP:g) + τ(SOP:fa) +
τ(SOP:fb)} τ(EX-SOPNS:f) = min{τ(SOP:fa) + τ(SOP:fb)} while
considering g = 0
Properties of EX-SOPsOn the Karnaugh map of a function, a cell that contains a 1(one) is called a 1-cell and a cell that contains a 0(zero) is called 0-cell. Property 1:
In a K-map for an EX-SOP, any 1-cell must be covered by the loop(s) for exactly one SOP.
If a 0-cell is covered, then it must be covered by at least one loop from both SOPs.
Definition 6: Let g(x) and h(x) be n variable functions. B = {0,1},
if for every a ε Bn g(a)=1 satisfies h(a)=1 then g h
Minimization of EX-SOPs Let g represent the shared products of an EX-
SOP of function f. The number of different products in a minimum EX-SOP for f with product sharing is denoted by τ(EX-SOPPS:f:g).
To compute τ(EX-SOPPS : f : g) using the Eq 1, g is fixed and we choose fa and fb such that Eq 1 satisfies. Thus we haveτ(EX-SOPPS:f:g) = τ(SOP:g) + min{ τ(SOP:fa) +
τ(SOP:fb) }
Minimization of EX-SOPs Lemma 2:
The proof of the lemma is out of scope. The proof can be found on the paper [1].
):(min
):()::( hfSOPEXgh
gSOPgfSOPEX NSPS
Idea of Minimization The idea is for 5 of less number of variables. We will try for all possible g and minimize the
following Eq for all possible g.
We need to use K-map.
):(min
):()::( hfSOPEXgh
gSOPgfSOPEX NSPS
Example Let us consider g = A’C’D. Possible values of h are
A’BC’D A’B’C’D A’C’D
We have to find h that makes minimum.):( hfSOPEX NS
C’D’A
C’D CD CD’
A’B’
g1
A’B 1 1
AB 1 1 1 1
AB’
Example Lets first try with h = A’BC’D So K-map for f v h will be
C’D’A
C’D CD CD’
A’B’ 1
A’B 1 1 1
AB 1 1 1 1
AB’
Example Rules for EX-SOPNS
Loop 1-cell entries odd numberof times.
Loop 0-cell entries even numberof times.
From the K-map we can see fa = B fb = A’CD’ = 2 τ(SOP:g) = 1 Τ(EX-SOPPS:f:g) = 3
We need to do this for every h.
C’D’A
C’D CD CD’
A’B’ 1
A’B 1 1 1
AB 1 1 1 1
AB’
fa fb
):( hfSOPEX NS
Choosing g We can choose g using the following lemma :
To obtain minimum EX-SOP of f it is sufficient to consider only the prime implicants of f’ as shared product of candidate.
The proof of this lemma can also be found in the paper [1].
To find the prime implicants of f’ we can also use K-map.
Drawbacks Choosing g is very time consuming. We can use “Lookup Tables” to optimize it. Overall an NP equivalent problem.
Summary We have seen the algorithm for minimizing
AND-OR-EXOR three level networks. We have seen the algorithm for 5 or less
variables. There exists algorithm for more variables.
References D. Debnath and T. Sasao, “Minimization of
AND-OR-EXOR three level networks with AND gate sharing.”
Thank You