Tam Metin

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/270157420

An Artifical Immune Algorithm to Minimize Ordered Kronecker Functional


Decision Diagrams usin in FPGA

Conference Paper · January 2007

CITATIONS READS

0 130

1 author:

Erkan Duman
Firat University
27 PUBLICATIONS 66 CITATIONS

SEE PROFILE

All content following this page was uploaded by Erkan Duman on 29 December 2014.

The user has requested enhancement of the downloaded file.


INISTA 2007 International Symposium on Innovations in Intelligent Systems and Applications
©Yıldız Technical University

An Artificial Immune Algorithm to Minimize Ordered Kronecker


Functional Decision Diagrams using in FPGAs

Erkan DUMAN1 Hayrettin CAN2 Erhan AKIN3


1, 2, 3
: Department of Computer Engineering in Firat University, 23119-ELAZIĞ/TURKEY
1:
erkanduman@firat.edu.tr 2: hcan@firat.edu.tr 3: eakin@firat.edu.tr

Abstract gates. The number of nodes in the graph varies


from linear to exponential depending on the
In this study, we introduce the use of one properties of variable ordering and decomposition
Artificial Immune System (AIS) algorithm called type list detailed in later. But, the choices of an
Clonal Selection Algorithm (CSA) in order to optimal variable ordering and a suitable
minimize the size of an Ordered Kronecker decomposition type list for an OKFDD is a NP-
Functional Decision Diagram (OKFDD) which hard problem [7]. Here, we address a heuristic
represents a Boolean function as a graph. The size approach to solve this optimization problem which
of such a graph is a critical factor by reason of will be the focus of this study.
OKFDDs are used to derive circuits by The dynamic variable ordering methods had
substituting the each nodes with AND/XOR and been tested to solve this problem and shown that it
NOT gates. This data structure is very useful could be applied here [14]. However, it was not
representation tool especially in a popular efficiency about the time consuming and requires
technology called Field Programmable Gate an addition process for choosing decomposition
Array (FPGA) implementing the Boolean type list. Thus, the same researchers have decided
functions as real hardware gate arrays by to apply genetic algorithm due to need of a
mapping and routing them. Here, CSA was heuristic approach [6]. In this paper, we evaluated
applied to construct this representation data another alternative approach, one form of AIS,
structure by choosing its variable ordering and which has some advantages in comparison with
data type list automatically because the number of genetic algorithm and others.
nodes in an OKFDD varies from linear to AIS algorithms are new computational
exponential depending on these properties. In techniques inspired from biologically systems like
experiments, the proposed algorithm based on AIS genetic algorithms or artificial neural networks
was evaluated in a test environment developed in and they are belong to the set of general purpose
MATLAB using the logic synthesis and heuristic methods [1]. While solving engineering
optimization benchmarks distributed by MCNC. problems, the efficiency of these optimization
techniques constituted by summarizing and
Index Terms— Artificial immune system, modeling the defense mechanism of the biological
clonal selection algorithm, circuit design systems have been studied [4,5]. The interest of
optimization, FPGA AIS and its applicability for many examples in
different areas is increasing over the last decade
1. Introduction because it has some advantages which will be
explained in the following over genetic algorithms
OKFDD has been introduced as a very useful and neural networks. However, it seems that
data structure in order to use in computer-aided choosing the best suitable technique among these
design systems for efficient representation and is depending on the application characteristics.
manipulation of Boolean functions in form of a AIS algorithms exhibit similarities with genetic
graph [8]. As understood from its name, OKFDD algorithms in aspects of encoding search space,
is a general form of Ordered Binary Decision defining an objective function, having a mutation
Diagrams (OBDD) and Ordered Functional operator and a resembling flow diagram. They
Decision Diagram (OFDD) and allows a more convergence the local optimums more quickly but
compact representation than both of them. The do not have the same speed about global optimum
size of such a graph is a critical factor by reason of as genetic algorithm. Addition, they have been
OKFDDs are used to derive circuits by used to get better performance according to the
substituting the nodes with AND/XOR and NOT other optimization techniques in the areas of
pattern recognition, computer and network

169
security, dynamically task-scheduling, etc [5]. The Let consider a Boolean function f = x1 x 2 + x3 .
immune and nervous systems are sharing the The two example OKFDDs of this function and
capabilities of memory and learning and both are the corresponding circuit constituted only by
using the threshold values for definite recognition. AND, OR and NOT gates are shown in Figure 1
If you had investigated their constructions then that they are explaining the way how to construct a
you would be able to observe easily that they were circuit from such a graph. This translation process
suitable for different areas at same performance. can be learned in detail Becker’s study [9].
In this study, CSA was applied to construct f

OKFDDs by choosing the variable ordering and


the data type list automatically because the x1 pD x1
pD

number of nodes varies from linear to exponential x2


nD x2
nD
depending on these properties. We pointed out that x1
x3 x3 x3
this optimization technique could be an alternative S S

heuristic approach in the problem of the 0 1 1


x2
minimization of OKFDDs. x3

The rest of the paper is organized as follows.


Section 2 gives an introduction of the problem Figure 1: OKFDDs of a function
domain. Section 3 describes the structure of CSA f = x1 x2 + x3 and derived logic circuit from these
and section 4 presents the adaptation of this graphs.
algorithm for our optimization problem. Section 5
shows the experimental results of the proposed We used a few exams in the following of this
method and the last section includes the section which were selected from the previous
conclusions. basic studies for explaining the size of the graph
and consequently the size of the corresponding
2. The Problem Domain circuit are influenced by the choices of DTL and
variable ordering list. In the figures of all these
Firstly we have to answer the questions of what exams, the right and left outgoing edges of each
are OKFDDs and then how can they be used to node xi denote f xi =1 , f xi =0 respectively. For
derive logic circuits: instance; in Figure 2 it is shown that the number of
The kronecker functional decision diagram nodes in an OKFDD may be changed by choosing
could be imagined in form of a graph that each a good DTL. The both graphs in Figure 2
node carries out one of the following three
represent the same function f = x1 .x3 + x 2 with
decompositions in where f is an arbitrary Boolean
the same variable ordering but the OKFDD on the
(B) function and f : B n → B over the variable set right-hand side has small graph size with DTL =
of X n = {x1 , x 2 ,...., x n } ∈ B n . {nD, pD, nD}in comparison with on left . In the
other words, it means that the choice of DTL on
f = xi f i0 + xi f i1 Shannon (S) the left-hand side OKFDD is not suitable for this
function as much as on the right.
f = f i0 ⊕ xi f i 2 Positive Davio (pD)
x1
nD
f = f i1 ⊕ xi f i 2
x1
Negative Davio (nD) nD

x2 x2 nD x2
pD
0
If this graph is ordered then the corresponding 1
1 0
x3 nD
kronecker functional decision diagram is called an x3
S
OKFDD. These definitions had been examined 0 1

detailed in Drechsler’s study[7].The term of 1 0

f i0 (x ) = f (x1 , x 2 ,..., xi −1 ,0, xi +1 ,..., x n ) denotes the Figure 2: OKFDDs of a function


cofactor of f with respect to xi = 0 , similarly f i1 f = x1.x3 + x2 with different DTLs.
denotes the cofactor for xi = 1 and f i 2 is defined
The second factor influencing the size of
as f i 2 = f i0 ⊕ f i1 ( ⊕ and being the exclusive OKFDD circuits is variable ordering. The OBDDs
OR and NOT operation respectively). A of a function f = x1 x 2 + x3 x 4 + x5 x 6 with
decomposition type list (DTL) in an OKFDD is variable orderings of x1 x 2 x3 x 4 x5 x 6 and
denoted by d = (d1 , d 2 ,..., d n ) where
x1 x3 x5 x 2 x 4 x 6 are shown in Figure 3 which had
d i ∈ {S , pD, nD} 1 ≤ i ≤ n and this list ( d i ) is been used to examined this situation in a previous
associated with variable list ( xi ). study [6]. The both graphs represent the same

170
function but the number of the nodes on the right- • The probability of maturate (generally it
hand side is greater then on the left due to is chosen smaller then the value used in
choosing unsuitable variable ordering list. genetic algorithm)
• The probability of re-production
x1
• The terminated conditions (max. iteration
x3 x3
or desired straightness)
x1
x5 x5 x5 x5

x2

x3 x2 x2 x2
x2

x4

x5 x4 x4

x6 x6

1 0 1 0

Figure 3: OBDDs of a function


f = x1 x 2 + x3 x 4 + x5 x 6 with different variable
orderings.

We tested to adapt an optimization technique


based on AIS called CSA so as to find the optimal
variable ordering list and DTL automatically for
an OKFDD representing an arbitrary given
Boolean function f with the minimum number of
the nodes as far as possible.

3. The Optimization Algorithm


The steps of a CSA had been defined and Figure 4: Block diagram of CSA.
examined by Castro as shown in Figure 4 and each
step of this diagram could be explained in detail in 4. The Proposed Method
the following[2,3]:
In the following, we describe the proposed
(1) Generate a set (P) of candidate solutions, optimization method that is applied to the problem
composed of the subset of memory cells (M) added to the
remaining (Pr) population (P = Pr + M); of OKFDDs minimization mentioned above. The
(2) Determine (Select) the n best individuals of the details of our method can be explained easily by
population (Pn), based on an affinity measure; using a simple example function f = x1 x 2 + x3 x 4
(3) Reproduce (Clone) these n best individuals of
the population, giving rise to a temporary population of clones with four variables.
(C). The clone size is an increasing function of the affinity with The first step in a CSA algorithm is to define
the antigen; how to encode a whole candidate solution into one
(4) Submit the population of clones to a
hypermutation scheme, where the hypermutation is
clone then to construct a random population
proportional to the affinity of the antibody with the antigen. A containing a set of such clones. As seen in Figure
maturated antibody population is generated (C*); 5 (c) that one clone is composed of three blocks:
(5) Re-select the improved individuals from C* to variable ordering, decomposition-type and
compose the memory set M. Some members of P can be
replaced by other improved members of C*;
neighbor lists. This example clone represents an
(6) Replace d antibodies by novel ones (diversity example OKFDD graph showed in Figure 5 (a)
introduction). The lower affinity cells have higher probabilities and also the way how to derive this structure as
of being replaced. seen in Figure 5 (b). This graph could be
The designer has to define the values of some considered basically as a binary three in order to
parameters listed below in this algorithm in order understand the means of the assigned number of
to get effective results. It is a general each node.
disappointment subject for many heuristic The mains of variable ordering and d-types list
approaches like genetic algorithms, fuzzy systems, are explained with their effects in the previous
neural networks and so forth. sections. Now, we have to make a statement about
• The size of the population what neighbor list indicates. The size of this list is
• The definition of affinity measuring
function
( )
computed by 2 * 2 n − 1 where n is the number
of variables so in this example clone it is equal to
• The value of n

171
1 x1 pD 1
x1-pD
3 x2 pD
2 3
x2-pD

0 1 4 5 6 7
x3-S
5 x3 S
8 9 10 11 12 13 14 15
x4-S
0 11 x4 S

0 1
0 1

(a) (b)

Variable Ordering Dec.-type List Neighbor List

1 2 3 4 pD pD S S 5 3 - - 0* 1* - - 0* 11 - - - - - -

- - - - 0* 1* - - - - - - - - - -

(c)
Figure 5: An example clone and its encoding.

30 with n = 4. The inside of the root node is stored in aspects of the problem: correctness and size. Firstly,
the first element of the variable ordering list. The left a clone is used to construct a graph automatically
and right outgoing edges of ith node are linked to the then we test this graph should provide the achieving
elements of 2 * i − 1 and 2 * i respectively of the desired function otherwise it will get a very
where 1 ≤ i ≤ (2 n − 1) . For example the left (right) small affinity value. In all of the experiments we
used a truth table of related function in which each
neighbor of the root node (i = 1) is storing in the row represents a relation case between inputs and
2*1-1 (2*1) element of the neighbor list. The outputs like the logic synthesis and optimization
notations of 0* and 1* in the neighbor list indicate a benchmarks distributed by Microelectronics Center
terminal node with values of 0 and 1 respectively. of North Carolina (MCNC). If the graph guarantees
In our method, the all values in a clone are also the desired correctness, its affinity value that
encoded as a bit-string array similar to the previous depends on its number of nodes will be defined as
studies. In the above example, the size of the exam shown on equation 2 where C is a constant
clone is computed by the equation 1 with variable
indicating the maximum number of nodes so our
number n = 4. The first term denotes the size of
problem will be transformed to a maximization
variable ordering list and it is considered that if there
problem by this objective function. The best solution
are n variables and each one is encoded by log 2 (n ) having the minimum number of the nodes in a
bits then the sum of them is equal to n * log 2 (n ) . It is population gets the maximum affinity value.
described in the second term that the each variable (2)
requires only 2-bits to represent own decomposition the affinity of a graph = C − (number of nodes)
type so the dec-type list spends only n * 2 bits
The selection step of our algorithm was done by
totally. The last multiplication means a statement
roulette wheel technique known from GA that each
that one node in the above graph is encoded using
( )
log 2 2 n − 1 bits and also each node has two child
individual in a population can be able to choose with
a probability proportional to its affinity value. The
links so the each of the (2 n
−1 ) nodes needs parameter of n that mentioned in the previous
( n
)
2 * log 2 2 − 1 bits to show its relations with others.
section is very critical in order to convergence
quickly. The genetic operators in CSA are
(1) reproduction (clone) and maturate. The first is
(
size = n * log 2 (n ) + n * 2 + 2 * 2 n − 1 * log 2 2 n − 1 ) ( ) performed by copying the n individuals in current
[ ( n
n = 4 → 4 * log 2 4 + 4 * 2 + 2 * 2 − 1 * log 2 2 − 1 = 136 ) ( n
)] population into the next generation and the maturate
step proceeds by randomly changing a few bits in
random positions in a clone with given mutation
In the each iteration of CSA, the decision about
probability.
whether one clone will survive in the next iteration
or not is made with respect to its affinity measure. To
measure the affinity of a clone, we considered two

172
5. Experimental Results would be developed under an object oriented
development environment.
In order to compare the performance of our
proposed optimization method with previous
heuristic studies, we obtained the source code 7. References
distributions of PUMA [12], and TUDD [11].
Unfortunately, both of those packages weren’t [1] L. D. Castro, J. Timmis, “Artificial Immune Systems:
compiled due to numerous Linux kernel errors. Since A Novel Paradigm to Pattern Recognition”, In Artificial
these packages were developed under very old Neural Networks in Pattern Recognition, J.M. Corchado,
LINUX distributions, neither these packages nor the L. Alonso and C. Fyfe (eds), SOCO-2002, University of
Paisley, UK, pp. 67-84, 2002.
kernel of their development environment are [2] L. D. Castro, Fernando J. Von Zuben, “Learning and
compatible with accepted ANSI/ISO standards of Optimization Using the Clonal Selection Principle”, IEEE
C++ programming language. Transactions on Evolutionary Computation, Special Issue
Furthermore, we also obtained source code and on Artificial Immune Systems, vol. 6, n. 3, pp. 239-251,
made experiments with the wld package [13]. This 2002
package is designed as word level so that it is not [3] L. D. Castro, F. J. Von Zuben, “The Clonal Selection
suitable for OKFDDs implementation, which is Algorithm with Engineering Applications”, In Workshop
designed as bit level. Instead, results of the Preceedings of GECCO’00, Workshop on Artificial
benchmarks are given to provide information about Immune Systems and Their Applications, pp. 36-37, USA,
2000.
the proposed method’s performance. A test [4] L. D. Castro, F. J. Von Zuben, “Artificial Immune
environment was developed by using MATLAB, and Systems: Part I-Basic Theory and Applications”, Technical
then benchmark results were obtained from Report, TR-DCA 01/99, 1999.
LGSynth91 [10], which is distributed by MCNC. [5] L. D. Castro, F. J. Von Zuben, “Artificial Immune
Obtained results are summarized in Table 1. All of Systems: Part II-A Survey of Applications”, Technical
the benchmarks test the number of gates in the Report, TR-DCA 02/00, 2000.
circuits (number of nodes in the OKFDDs). As it can [6] R. Drechsler, B. Becker, N. Drechsler, “OKFDD
be seen from the column of approximate gates, the minimization by genetic algorithms with applicaiton to
number of gates was significantly reduced by the circuit design”, INTEGRATION, the VLSI journal 28, pp.
121-139, ELSEVIER, 1999.
CSA. [7] R. Drechsler, B. Becker, “Ordered Kronecker
Table 1: Results for some circuits Functional Decision-A Data Structure for Representation
and Manipulation of Boolean Functions”, IEEE
benchmark

Transactions on Computer Aided Design of Integrated


Function

Approx.
Output
Circuit

Gates
name

Input

CSA

Circuits and Systems, Vol. 17, No.10, 1998.


or

[8] R. Drechsler, A. Sarabi, M. Theobald, B. Becker, M.A.


Perkowski, “Efficient Representation and Manipulation of
9symm1 Count Ones 9 1 43 19 Switching Functions Based on Ordered Kronecker
alu2 ALU 10 6 335 119 Functional Decision Diagrams”, 31st ACM/IEEE Design
f51m1 Arithmetic 8 8 43 28 Automation Conference, 1994.
frg1 Logic 28 3 105 76 [9] Bernd Becker, “Testing with decision diagrams”,
INTEGRATION, the VLSI journal 26, pp. 5-20,
ELSEVIER, 1998.
6. Conclusions [10] S. Yang, “Logic Synthesis and Optimization
Benchmarks User Guide”, Technical report at
Microelectronics Center of North Carolina, 1991.
In this paper, we proposed an alternative heuristic [11] S. Höreth, “Implementation of a Multiple-Domain
method, which is different from the previous studies Decision Diagram Package”, in Advenced Research
by its approach. This method could be applicable to Working Conference on Correct Hardware Design and
our optimization problem. The results obtained from Verification Methods (CHARME’97), pp. 185-202,
our experiments which were implemented in only Canada, 1997.
small size benchmarks proof that this method will be [12] R. Drechsler, B. Becker, “PUMA: An OKFDD
able to use in evaluating of great digital circuit package and its implementation”,in European
designs in future. Addition, we realized that an Design&Test Conf., University Booth, 1995.
[13] Marc Herbstritt, “wld: A (C++) world-level decision
object-oriented test environment like C# or Delphi
diagrams package”,User’s and Developer’s Manual in
will be more effective, usable and easily windows- Institute of computer science, Albert-Ludwigs-University,
based development environment in order to Freiburg, 2000.
implement OKFDDs according to MATLAB. We are [14] R. Drechsler, B. Becker, “Dynamic Minimization of
planning to adopt and to test our optimization OKFDDs”, VLSI in computers&processors (ICDD’95), pp.
method based AIS for word-based kronecker 602-607, IEEE, 1995.
functional decision diagrams. This future study
would be developed not only bit based but also it

173

View publication stats

You might also like