Empirical Analysis and Mathematical Repr PDF
Empirical Analysis and Mathematical Repr PDF
ISSN 1549-3636
© 2006 Science Publications
Abstract: Information about the distribution of path-lengths in a Binary Decision Diagrams (BDDs)
representing Boolean functions is useful in determining the speed of hardware and software
implementations of the circuit represented by these Boolean functions. This study presents expressions
produced from an empirical analysis of a representative collection of Boolean functions. The Average
Path Length (APL) and the Shortest Path Length (SPL) have simple behavior as function of the number
of variables and the number of terms used in the construction of the Sum of Products (SOPs) in
Boolean expressions. We present a generic expression that is uniformly adaptable to each curve of
path-length versus number of terms over all the empirical data. This expression makes it possible to
estimate the performance characteristics of a circuit without building its BDD. This approach applies to
any number of variables, number of terms, or variable ordering method.
Key words: Binary decision diagram, Boolean function, average path length, shortest path length,
evaluation time
Corresponding Author: A. Assi, Department of electrical Engineering, United Arab Emirates University, P.O. Box 17555, Al
Ain, U.A.E., Tel: 971-3- 7133609, Fax: 971-3-7626309
236
J. Computer Sci., 2 (3):236-244, 2006
variable ordering that leads to the minimum size of the Each non-sink node represents the Boolean function
BDD and minimum Path Length. In this approach we corresponding to its edge "1" if v = 1, or the Boolean
need to create the whole BDD representing the Boolean function corresponding to its edge "0" if v = 0.
function with the best possible variable ordering. Definition 2: An Ordered BDD (OBDD) is a BDD in
Building the whole BDD may lead to some complexity
which each variable is encountered no more than once
in the design process in terms of the time required to
implement, verify and test the design. It will be useful to in any path and always in the same order along each
have a kind of estimation of the BDD complexity prior path.
to make decisions on the feasibility of the design[20]. For
any combinational circuit the only available initial Definition 3: A Reduced OBDD (ROBDD) is an
information is the Boolean function that represents this OBDD which no nodes have equivalent behavior.
circuit and the number of its variables. This information
is usually considered to design and verify circuits using Variable ordering: The size of a BDD is largely
well known mathematical methods. affected and its variation can be linear or exponential
There has been a lot of research[21-24] done on the depending on the choice of the variable ordering in
estimation of combinational and sequential circuit
building the BDD. Figure 1 illustrates the effect of the
parameters from the exact Boolean function describing
the circuit. What distinguishes this study and prior variable ordering [R.E. Bryant, 1986] on the size of
work[20,25-27] by the some of the current authors is the BDDs for the Boolean function (1):
use of stochastic technique and estimation of parameters
from only partial information about the Boolean f = x1 ⋅ x2 + x1 ⋅ x2 ⋅ x3 ⋅ x4 + x1 ⋅ x3 ⋅ x4 (1)
function.
It is very hard to perform a comparison without
having an idea about the path length size for a given
number of variables. Therefore, it is important to
develop a mathematical model that predicts the path
length, knowing the number of variables and the
number of product terms of the Boolean function
represented by this BDD.
The main objective of this study is to enhance the
methodologies proposed in[20,25] to estimate the path
length complexity for the Boolean functions represented
by the BDD. First, we present experiments that show
the behaviors of the APL and SPL and then we extract a (a) x1 x2 x3 x4 (b) x1 x3 x2 x4
unique mathematical model for produced experimental
graphs. This study is organized as follows: First is an
Fig. 1: Effect of the variable ordering on the size of
introduction, followed by the necessary terminologies
BDD
and definitions of the BDD and path length. . Later we
review the previous work done on the estimation of the
BDD complexity. The proposed method with the Definition 4: In a BDD, a sequence of edge and nodes
experimental results followed by the mathematical leading from the root node to a terminal node is called
model is given next. Finally the advantages of this Path. The number of non-terminal nodes on the path is
mathematical model followed by an outline of our called the Path Length.
future developments in this research work and
conclusion. Definition 6: The edge traversing probability, denoted
by P(ei 0 ) (or P(ei1 ) ), is the fraction of all 2n
PRELIMINARIES assignments of values to variables whose path includes
ei 0 (or ei1 ), where ei 0 (or ei1 ) denotes edge “0” (or the
Basic definitions for BDDs and path length are edge “1”) directed from away node Vi [7,8]. Since all
given in[1,3,4,7,10]. In the following we review some of paths include the root node, this node is traversed with
these definitions.
probability 1.00. Since all assignments to values of
variables are equally likely, we can use the following
Definition 1: A BDD is a directed acyclic graph
(DAG). The graph has two sink nodes labeled 0 and 1 equation (2) to calculate the P(Vi ) for the rest of the
representing the Boolean functions 0 and 1. Each non- nodes:
sink node is labeled with a Boolean variable v and has P (vi )
two out-edges labeled 1 (or then) and 0 (or else). = P(ei 0 ) = P (ei1 ) (2)
2
237
J. Computer Sci., 2 (3):236-244, 2006
Definition 5: The APL is equal to the sum of the node Relation between the size of a boolean function and
traversing probabilities of the non-terminal nodes[7,10]. the ROBDD complexity[20]: The complexity of the
Node traversing probability denoted by P(vi ) is the ROBDD mainly depends on the number of nodes
fraction of all 2n assignments of values to the variables represented by the ROBDD. Analysis of the complexity
whose path includes node vi . The APL can be expressed variation in ROBDDs i.e. the relation between the
number of product terms and the number of nodes for
by the following equation (3):
N −1
any number of variables is discussed in these works, the
APL = P (vi ) (3) experimental graph variation reveals that the complexity
i =0 of the ROBDD can be modeled mathematically by
Where, N is the number of non-terminal nodes. equation (4). Figure 3 indicates that the mathematical
model represented by equation (4) provides a very good
Definition 6: The Shortest Path Length (SPL) of a approximation of the ROBDD complexity.
BDD denoted by SPL (BDD), is the Length of the
Shortest Path from the root node to the terminal node. NN = α ⋅ NPT β ⋅ e( − NPT ⋅γ ) + 1 (4)
Where, NN is the number of nodes that represents
Example: Consider the BDD graph shown in Fig. 2. In
the complexity of ROBDD, NPT is the number of non-
this example we will compute the APL and the SPL:
repeating product terms in the Boolean function, α , β
and γ are three constants. Using curve fitting
techniques, the variations of α, β and γ were
mathematically modeled and represented by the
following equations (5), (6) and (7).
1.51
α = 0.9855 ⋅ e(0.063⋅ NV ) (5)
β = 1.031149 ⋅ e( −0.01551933⋅ NV )
(6)
+67.2072 ⋅ e( −1.2985⋅ NV )
γ = 0.962297281 ⋅ e( −0.4187691⋅ NV )
(7)
+41.9723 ⋅ e( −1.5072⋅ NV )
Where, NV is the Number of Variables.
equation (8): Figure 4 show that the mathematical the APL and SPL reaches a maximum
model represented by equation (8) provides a good ( APL ≅ 7.73 , SPL ≅ 5.4 in this case).
approximation of the experimental ROBDD complexity.
0.5
NN = α ⋅ β 2 − ( NXM − β ) 2 +1 (8)
Where, NN is the number of nodes that represents
the complexity of ROBDD, NXM is the number of
XOR/XNOR min-terms in the Boolean function, β is
2n-2 with n the number of input variables and α =
0.605234.
239
J. Computer Sci., 2 (3):236-244, 2006
APL complexity variation graph is fairly similar to the β 2 = 2.1 for v ≤ 11 and β 2 = 3.5 for v ≥ 12 .
Fig. 2, but the roll of is not steeper as the Fig. 2. Eventually the following equation (11) was used in
The location and height of the peak and the slope of the order to calculate the constant β 2 for APL.
logarithm of the roll off varied. Reduction of the APL
and SPL complexity to 0 implies that all the product 1.8
β 2 = 0.7 3 + (11)
terms simplify to logic 1. A simple algebraic expression [e( v −11.5) ]2 + 1
for these curves was developed, unifying all the cases. The final behavior of the APL and SPL curve can
be found by the following single equation (12):
MATHEMATICAL MODEL FOR THE αi
1.8
β2 = 3 + ( v −11.5) 2
(10)
[e ] +1
Fig. 10: Experimental/Equation APL Complexity Fig. 13: Experimental/Equation SPL Complexity
behavior for 8 variables behavior for 12 variables
Fig. 11: Experimental/Equation APL Complexity Fig. 14: APL Complexity Estimation Error for 10
behavior for 12 variables variables
241
J. Computer Sci., 2 (3):236-244, 2006
αi
log t +1
2 xi (13)
1= µ ⋅ ⋅ yi
i =1 ( (
log t + 1
x
))
βi
242
J. Computer Sci., 2 (3):236-244, 2006
the number of product terms in a Boolean function. 11. Fujita, M., H. Fujisawa and N. Kawato, 1988.
Analyzing the Experimental results, we have introduced Evaluation and improvements of boolean
a single and unique mathematical model, which is based comparison method based on binary decision
on an empirical fit that can predict valuable information diagrams. Proc. Intl. Conf. on Computer Aided
related to the APL and SPL behaviors without building
Design (ICCAD)., pp: 2-5.
the BDD. A great reduction in time complexity for
digital circuits' designs can be achieved and the model 12. Malik, S., A. Wang, R. Brayton and A.S.
can also offer useful information on the design to Vincentelli, 1988. Logic verification using binary
handle the minimization of its evaluation time prior to decision diagrams in a logic synthesis environment.
its implementation. Our experimental results show good Proc. Intl. Conf. on Computer Aided Design
correlation between the experimental results and those (ICCAD)., pp: 6-9.
given by the mathematical model. 13. Rudell, R., 1993. Dynamic variable ordering for
ordered binary decision diagrams. Proc. Intl. Conf.
REFERENCES on Computer Aided Design (ICCAD)., pp: 42-47.
14. Fey, G., J. Shi and R. Drechsler, 2004. BDD circuit
1. Priyank, K., 2000. VLSI Logic Test, Validation
optimization for path delay fault-testability. Proc.
and Verification, Properties & Applications of
of EUROMICRO Symp. on Digital System Design,
Binary Decision Diagrams. Lecture Notes,
pp: 168-172.
Department of Electrical and Computer
15. Balarin, F., M. Chiodo, P. Giusto, H. Hsieh, A.
Engineering University of Utah, Salt Lake City, UT
Jurecska, L. Lavagno, A.S. Vincentelli, E.M.
84112.
Sentovich and K. Suzuki, 1999. Synthesis of
2. Akers, S.B., 1978. Binary decision diagram. IEEE
software programs for embedded control
Trans. Computers, 27: 509-516.
applications. IEEE Trans. CAD., 18: 834-849.
3. Bryant, R.E., 1986. Graph based algorithm for
16. Lindgren, M., H. Hansson and H. Thane, 2000.
boolean function manipulation. IEEE Trans.
Using measurements to derive the worst-case
Computers, 35: 677-691.
execution time. Proc. 7th Intl. Conf. on Real-Time
4. Drechsler, R. and D. Sieling, 2001. Binary
Systems and Applications (RTCSA’00)., pp: 5-22.
Decision Diagrams in Theory and Practice.
17. Shelar, R.S. and S.S. Sapatnekar, 2001. Recursive
Springer-Verlag Trans., pp: 112-136.
bipartitioning of BDD's for performance driven
5. Jain, A., M. Narayan and A.S. Vincentelli, 1997.
synthesis of pass transistor logic. Proc. of
Formal verification of combinational circuits. Proc.
IEEE/ACM ICCAD., pp: 449 - 452.
Intl. Conf. on VLSI Design, pp: 218-225.
18. Bertacco, V., S. Minato, P. Verplaetse, L. Benini
6. Van Eijk, C.A.J., 1997. Formal methods for the
and G.D. Micheli, 1997. Decision diagrams and
verification of digital circuits. Ph.D. Thesis,
pass transistor logic synthesis. Stanford University
Eindhoven University of Technology, Netherlands.
CSL Technical Report, No. CSL-TR-97-748.
7. Nagayama, S. and T. Sasao, 2004. On the 19. Görschwin, F., S. Junhao and R. Drechsler, 2004.
minimization of longest path length for decision BDD circuit optimization for path delay fault-
diagrams. Proc. of Intl. Workshop on Logic and testability. Proc. EUROMICRO Symp. on Digital
Synthesis (IWLS-2004), pp: 28-35. System Design, pp: 168-172.
8. Liu, Y., K.H. Wang, T.T. Hwang, and C.L. Liu, 20. Raseen, M., P.W.C. Prasad and A. Assi, 2005. An
2001. Binary decision diagrams with minimum efficient estimation of the ROBDD's complexity.
expected path length. Proceedings of DATE 01, pp: accepted for Publication in Integration - the VLSI
708-712. Journal, Elsevier Publication.
9. Prasad, P.W.C., M. Raseen, S.M.N.A. Senanayake 21. Nemani, M. and F.N. Najm, 1996. High-level
and A. Assi, 2005. BDD path length minimization power estimation and the area complexity of
based on initial variable ordering. accepted for
boolean functions. Proc. of IEEE Intl. Symp. on
Publication in Journal of Computer Science,
Science Publications, May 2005. Low Power Electronics and Design, pp: 329-334.
10. Ebendt, R., S. Hoehne, W. Guenther and R. 22. Dunne, P.E. and W. van der Hoeke, 2004.
Drechsler, 2004. Minimization of the expected path Representation and complexity in boolean games.
length in BDDs based on local changes. Proc. of Proc. 9th European Conf. on Logics in Artificial
Asia and South Pacific Design Automation Conf. Intelligence, LNCS 3229, Springer-Verlag, pp:
(ASP-DAC’2004), pp: 866-871. 347-35.
243
J. Computer Sci., 2 (3):236-244, 2006
23. Ramalingam, N. and S. Bhanja, 2005. Causal 26. Prasad, P.W.C., M. Raseen and S.M.N.A.
probabilistic input dependency learning for Senanayake, 2005. XOR/xnor functional behavior
switching model in VLSI circuits. Proc. of ACM on ROBDD representation. Proc. 14th IASTED
Great Lakes Symp. on VLSI, pp: 112-115. Intl. Conf. on Applied Simulation and Modelling
24. Bhanja, S., K. Lingasubramanian and N. (ASM 2005), pp. 115-119, Spain.
Ranganathan, 2005. Estimation of switching 27. Raseen, M., A. Assi, P.W.C. Prasad and A. Harb,
activity in sequential circuits using dynamic 2004. Effect of boolean min-terms on the
bayesian networks. Proc. of VLSI Design, pp: 586- complexity of ROBDDs. Proc. Intl. Conf. on
591. Computational Intelligence (ICCI 2004), pp: 454-
25. Raseen, M., P.W.C. Prasad and A. Assi, 2004. 457.
Mathematical model to predict the number of nodes 28. Somenzi, F., 2003. CUDD: CU Decision Diagram
in an ROBDD. Proc. 47th IEEE Intl. Midwest Package. <ftp://vlsi.colorado.edu/> pub/.
Symp. on Circuit and Systems (MWSCAS), 3: 431-
434.
244