4. is
. Thus,
, is a Boolean function of n input variables. The on-set
of a function, , is defined as
. Similarly, the off-setis
. Note that since , 0 and 1 are the only possible values of , thus, the on-set,
, completely specifies the Boolean function.
Boolean values of variables can be viewed as a string of binary values, which can be
interpreted as an unsigned decimal number. For example, suppose a 3-input variable, , has
the values
5. . These values can be viewed as the binary string 110 which may be
interpreted as the number 6. With this interpretation, all possible values of n variables can be
represented as integers between 0 and
. In particular, the on-set of a Boolean function can be
specified as a subset of integers in this range. For example,
6. , is equivalently defined
by !#.
A literal is an input variable in true or complemented form, that is, $ or $
. A product term is
a product
of one or more literals. If all the literals are present in a product term, it is called a
minterm. The on-set of a minterm is one integer. For example, on-set of
7. , is {5}. Similarly,
the on-set of product term 1, 3}.
A product term, %, is an implicant of a Boolean function, , if %, or equivalently,
% ' . An implicant is a prime implicant of if there is no other product implicant of which
implies this implicant as well. A set of prime implicants, ( %
8. %
%), is said to cover the
function, , if the union of on-sets of these prime implicants is equal to the on-set of the function,
( *%$
. A set of prime implicants is irredundant if no prime implicant can be removed
from the set without changing its on-set. As shown in [2], a minimal sum-of-products representation
of a Boolean function must be an irredundant set of prime implicants. Thus, using the number of
gates as the cost, a minimal two-level implementation is an irredundant set of prime implicants.
Minimal two-level representations of Boolean functions are obtained in two steps. First,
generate all possible prime implicants of the Boolean function, and, second, search for lowest cost
irredundant set of prime implicants that covers the function, from all possible sets. The textbook
approach to generate all prime implicants of a function is the Quine-McClusky tabulation approach
[2, 3]. However, it is noted that a cube absorption approach [4, 5], with efficient algorithmic
10. , can be represented as the
vertex of 3-d unit cube with coordinates
= 1,
11. . A string representation of this
minterm is “101”. Product terms correspond to a set of vertices which form a sub-cube. For
example, the product term
12. has the string representation is “01*” where the ‘*’ represents the
corresponding variable is missing. In higher dimensions, a 5-d sub-cube “01*0*” consists of 4
minterms “01000,” “01001,” “01100,” and “01101.” For a cube that has ‘*’, there are
sub-cubes.
A cube set represents a union of all the vertices of the cubes in the set. Thus, a function is
represented as a cube set which contains cubes whose union has the same vertices as the +-set of
the function. For instance, the vertices in the +-set of the 3 input function
13. are the
union of vertices in two cubes, so this function is represented by the cube set,
, {“00*”, “*10”}.
Many operations defined on these unit cubes are useful for Boolean computations.
Intersection of two cubes is defined, like sets, as the vertices common to both cubes. These vertices
form a sub-cube which is contained in both cubes. If there are no common vertices, the intersection
is a null cube. For example, the intersection of two cubes “10**1” and “10*1*” is the sub-cube
“10*11”, and intersection of “10**1” and “11***” is the null cube. Intersection of cubes is widely
used in the current work to determine whether a vertex is covered by a cube. Cube absorption is an
important cube operation that combines two adjacent cubes to form one larger cube. Adjacent cubes
have identical values for all variables except one, and that variable has the complemented form in
one cube and the uncomplemented form in the other cube. These cubes are absorbed into a single
cube in which this variable is missing. As an example, consider cubes “0*1*1” and “0*0*1.” These
cubes can be combined to form the absorbed cube, “0***1.” Note that the cube “0*1*1” cannot be
combined with the cube “1*0*1” because these cubes differ in 2 variables.
The Positional Cube Notation (PCN) representation [6] along with efficient implementation
of the cube operations is discussed next. Each variable is represented by two bits which hold the
enum values, {null, one, zero, both}. Pseudo-code for setting and getting value of the *-. variable is
shown below. Beyond compact representation of cube data, the PCN notation enables efficient
implementation of the cube operations such as bitwise and for cube intersection. Pseudo-code for
intersect operation is shown below. The intersect operator is used to determine whether a vertex cube
is contained in a larger cube. A new powerful algorithm to determine whether two cubes can be
absorbed, and absorbing them if possible is implemented using bitwise xor. The bitwise xor
operation results in the special null value in all the places where the corresponding variables are
identical. Thus, if one variable has non-null value, then the cubes can be absorbed and that location
gets both values in the absorbed cube. Pseudo-code for xor and absorb operations is shown below.
26
34. (
Using the cube operations described above, prime implicants can be obtained by absorbing
adjacent cubes as much as possible. Absorbing of a vector of cubes, denoted lower in pseudo-code
below, considers all possible pairs of cubes. If possible, absorption of the cubes is performed, and the
absorbed cube is stored in a set of Cubes. The absorbed cubes are marked accordingly. Upon
completion, the unique cubes in the set are transferred to a vector called higher. Thus, all possible
absorption of cubes in lower are performed and results stored in higher vector. The cubes that are
not absorbed are prime implicants. The process is repeated until no more absorption is possible.
27
03%4
03!!
51. (
%4
!!
The main result of this paper, a constrained depth first search approach to determine
minimum cost cover from the set of prime implicants, is presented in this section. Given the set of all
prime implicants, the decision problem is to select a subset of prime implicants that cover the
Boolean logic function with minimum cost. For each prime implicant, the algorithm has to decide
whether to include it in the optimal subset or not. Thus, if the cardinality of the set of all prime
implicants, ( %
52. %
%-, is /, its power set, 0the set of all subsets of prime implicants, has
cardinality, -. Clearly, all subsets do not satisfy the criterion of covering the entire Boolean
function–for example, the empty set does not cover the function. The combinational optimization
problem is to select the subset of prime implicants that has a minimal cost while satisfying the
aforementioned criterion. Denoting the cost of a subset of prime implicants, 1, as ,1, the
combinational optimization problem is to characterize the minimal set for two-level synthesis
defined as:
123- 14 044,1 5 ,644446 07*/841 46 }
The cost ,1 is typically the number of gates or the number of inputs to these gates. For
example, the cost for the product cube, “*01*1”, could either be 1 gate, from the AND gate, or 3
inputs, for the inputs to the AND gate. Fan-in limited, minimal, two-level synthesis could also be