[ieee 2010 13th international conference on computer and information technology (iccit) - dhaka,...

6
A Composition Technique of Multiple Switching Functions Based on BDD Md. Sayem Chowdury, G. M. Rokibul Hasan , Kamrul Hasan Talukder CSE Discipline, Khulna University, Khulna, Bangladesh CSE Discipline, Khulna University, Khulna, Bangladesh. Dept. of Information Engineering, Hiroshima University, Japan. [email protected] , [email protected] , [email protected] Abstract Binary Decision Diagram has a great impact on the Boolean function manipulation for its compressed and canonical presentation. In switching function organization ROBDD (Reduced Ordered Binary Decision Diagram) with a fixed variable ordering plays a significant role for its distinctiveness. Combination of multiple functions using switching operations has more redundant states. For removing these redundant states we apply ROBDD in this joining process. In this paper, we presented the way of combining n number of functions using ROBDD with a fixed variable ordering. In our proposed method at first, we compute each function’s ROBDD over Shannon’s expression. Then switching operations are going to be performed over these functions and ROBDD of the combinations of these functions are also computed. By this method, appearance of redundant states will be less. To construct an understandable and simple method, some examples have been used. Keywords: ROBDD, Composition of switching functions, BDD Switching function, Switching operation I. I NTRODUCTI ON In several areas of computer science and digital system design manipulation of switching function operations has a great importance. The volume and complexity of these switching functions has a great impact on the designing process of these switching functions in terms of the space occupied and cost incurred by it. So we need to find a less complicated and smaller size functions to achieve the same task for reducing the space and cost. We have use switching functions for its operation over finite and reduced domains. As the elements of domains are encoded in binary, the Boolean function has to perform over the Boolean values only. That’s why switching functions are used for testing, verification, validation and synthesis of bigger switching formulas. Through symbolic representation, we could easily represent a generalized form of a switching function. For providing result of a large class of complex problem, we need a well-organized technique for manipulating and representing switching function symbolically. A lot of techniques have been designed for representing and manipulating switching functions. Ordered Binary Decision Diagrams (OBDDs) [1] is one of the well-organized techniques. This representation is defined by imposing restrictions on the Binary Decision Diagram (BDD) representation introduced by Lee [2] and Akers [3], such that the resulting form is canonical. These restrictions and the resulting canonicity were first recognized by Fortune, Hopcroft, and Schmidt [4]. Functions are represented as directed acyclic graphs, with internal vertices corresponding to the variables over which the function is defined and terminal vertices labeled by the function values 0 and 1. Although the OBDD representation of a function may have size exponential in the number of variables, many useful functions have more compact representations [5]. On the other hand, the effectiveness of the uses of Reduced Ordered Binary Decision Diagrams (ROBDD) is straightly related to the size of its graph. Though, the size of the graph is mainly dependent on the order of the variable used to build the Reduced Ordered Binary Decision Diagrams (ROBDD). The volume of the Reduced Ordered Binary Decision Diagrams (ROBDD) presentation of a function may differ exponentially for the different orders of the variables. Applying various switching operations over multiple functions will lead to more redundant states. Redundant states make a Boolean function more complex and need more space than the optimized one. Despite the fact that, advancing technology offers the opportunity to have larger disk space and quicker communication system but we have to get a simple, faster and smaller size switching function. So we have to use function minimization to eliminate these redundant state. ROBDD with a fixed variable ordering is an efficient technique for minimization of Boolean function. In this paper, we introduce a technique for applying combinational operations over multiple switching functions. We have use ROBDD for this task. We have organized the remaining parts of the paper following way. In section 2 we have discussed about some introductory concepts of BDD and ROBDD. In section 3 we have explained our technique. In Section 4 we have discuss our method. In section 5 we have stated our future work and concluded. For better understanding a good numbers of figures are given in this paper. Proceedings of 13th International Conference on Computer and Information Technology (ICCIT 2010) 23-25 December, 2010, Dhaka, Bangladesh 978-1-4244-8494-2/10/$26.00 ©2010 IEEE 337

Upload: kamrul-hasan

Post on 09-Mar-2017

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: [IEEE 2010 13th International Conference on Computer and Information Technology (ICCIT) - Dhaka, Bangladesh (2010.12.23-2010.12.25)] 2010 13th International Conference on Computer

A Composition Technique of Multiple Switching Functions Based on BDD

Md. Sayem Chowdury, G. M. Rokibul Hasan , Kamrul Hasan Talukder

CSE Discipline, Khulna University, Khulna, Bangladesh CSE Discipline, Khulna University, Khulna, Bangladesh.

Dept. of Information Engineering, Hiroshima University, Japan. [email protected], [email protected], [email protected]

Abstract Binary Decision Diagram has a great impact on the Boolean function manipulation for its compressed and canonical presentation. In switching function organization ROBDD (Reduced Ordered Binary Decision Diagram) with a fixed variable ordering plays a significant role for its distinctiveness. Combination of multiple functions using switching operations has more redundant states. For removing these redundant states we apply ROBDD in this joining process. In this paper, we presented the way of combining n number of functions using ROBDD with a fixed variable ordering. In our proposed method at first, we compute each function’s ROBDD over Shannon’s expression. Then switching operations are going to be performed over these functions and ROBDD of the combinations of these functions are also computed. By this method, appearance of redundant states will be less. To construct an understandable and simple method, some examples have been used. Keywords: ROBDD, Composition of switching functions, BDD Switching function, Switching operation

I. INTRODUCTION

In several areas of computer science and digital system design manipulation of switching function operations has a great importance. The volume and complexity of these switching functions has a great impact on the designing process of these switching functions in terms of the space occupied and cost incurred by it. So we need to find a less complicated and smaller size functions to achieve the same task for reducing the space and cost. We have use switching functions for its operation over finite and reduced domains. As the elements of domains are encoded in binary, the Boolean function has to perform over the Boolean values only. That’s why switching functions are used for testing, verification, validation and synthesis of bigger switching formulas. Through symbolic representation, we could easily represent a generalized form of a switching function. For providing result of a large class of complex problem, we need a well-organized technique for manipulating and representing switching function symbolically. A lot of techniques have been designed for representing and manipulating switching functions. Ordered Binary Decision Diagrams (OBDDs) [1] is one

of the well-organized techniques. This representation is defined by imposing restrictions on the Binary Decision Diagram (BDD) representation introduced by Lee [2] and Akers [3], such that the resulting form is canonical. These restrictions and the resulting canonicity were first recognized by Fortune, Hopcroft, and Schmidt [4]. Functions are represented as directed acyclic graphs, with internal vertices corresponding to the variables over which the function is defined and terminal vertices labeled by the function values 0 and 1. Although the OBDD representation of a function may have size exponential in the number of variables, many useful functions have more compact representations [5]. On the other hand, the effectiveness of the uses of Reduced Ordered Binary Decision Diagrams (ROBDD) is straightly related to the size of its graph. Though, the size of the graph is mainly dependent on the order of the variable used to build the Reduced Ordered Binary Decision Diagrams (ROBDD). The volume of the Reduced Ordered Binary Decision Diagrams (ROBDD) presentation of a function may differ exponentially for the different orders of the variables. Applying various switching operations over multiple functions will lead to more redundant states. Redundant states make a Boolean function more complex and need more space than the optimized one. Despite the fact that, advancing technology offers the opportunity to have larger disk space and quicker communication system but we have to get a simple, faster and smaller size switching function. So we have to use function minimization to eliminate these redundant state. ROBDD with a fixed variable ordering is an efficient technique for minimization of Boolean function. In this paper, we introduce a technique for applying combinational operations over multiple switching functions. We have use ROBDD for this task. We have organized the remaining parts of the paper following way. In section 2 we have discussed about some introductory concepts of BDD and ROBDD. In section 3 we have explained our technique. In Section 4 we have discuss our method. In section 5 we have stated our future work and concluded. For better understanding a good numbers of figures are given in this paper.

† ‡

† ‡

Proceedings of 13th International Conference on Computer and Information Technology (ICCIT 2010) 23-25 December, 2010, Dhaka, Bangladesh

978-1-4244-8494-2/10/$26.00 ©2010 IEEE 337

Page 2: [IEEE 2010 13th International Conference on Computer and Information Technology (ICCIT) - Dhaka, Bangladesh (2010.12.23-2010.12.25)] 2010 13th International Conference on Computer

II. BDD, ROBDD

A Binary Decision Diagram (BDD) is rooted, directed acyclic graph with two types of vertices, terminal and non terminal [7]. There are two types of successors for each non-terminal vertex v. These two successors are low (v) and high (v). The successor of non-terminal vertex which is denoted by low (v) is corresponds to the case where the variable v is assigned 0 (represented through dotted lines). The other successor of non-terminal vertex is the high (v) is corresponds to the case where the variable v is assigned 1 (represented through straight lines). There has to be one value for every terminal vertex and this value has to be a Boolean value as we are working on manipulating switching function. That why, each terminal vertex v is labelled by value (v) which can be either 0 or 1. In figure 1 we could get the BDD for

cbabcacababccbaf ~~~~~~),,( +++=

Fig. 1. BDD of cbabcacababccbaf ~~~~~~),,( +++=

For constructing a Binary Decision Diagram (BDD) when we apply an order on the variables of the Boolean function, we termed it as an Ordered Binary Decision Diagram (OBDD). When we get the reduced form of this OBDD then we termed it as ROBDD. For the compactness of the domain, Reduced Ordered Binary Decision Diagram (ROBDD) is more desirable than the Ordered Binary Decision Diagram (OBDD) and Binary Decision Diagram (BDD). There are three rules to get the Reduced Ordered Binary Decision Diagram (ROBDD) from the Ordered Binary Decision Diagram (OBDD). The rules are:

• Remove Duplicate Terminals. • Remove Duplicate Non-Terminals. • Remove Redundant Test. •

Remove Duplicate Terminal: In this step all the duplicate terminal nodes are removed from the search space. If a Binary Decision Diagram (BDD) contains two terminal nodes j and k both labelled 0 then, removed k and direct all incoming edges at k to j. Similarly for two terminal nodes labelled 1 as shown in Figure 2 we have to remove the duplicate terminals.

Fig. 2. Remove Duplicate Terminal

Remove Duplicate Non-Terminal: In this step all the duplicate non terminal nodes are removed from the search space. If the sub-Binary Decision Diagrams (BDDs) rooted at the nodes j and k are the same then k has been removed from the problem state and direct all its incoming edges of k to m as shown in Figure 3.

Fig. 3. Remove Duplicate Non-Terminals

Remove Redundant Test: Through this step the unnecessary tests are removed from the search space. : If both successors of node k leads to the same node as I then remove k and direct all incoming edges of k to I a shown in Figure 4.

Fig. 4. Remove Redundant Test

Nilimesh Halder, A.B.M. Tariqul Islam, Mohammad Fazleh Elahi and Ju Bin Song proposed a method for composition of combinational switching functions [8]. In this method, composition techniques of two combinational switching functions using Reduced Ordered Binary Decision Diagrams (ROBDDs) are described. For two given Boolean functions it will perform three Boolean

b

c c

0 1 1 0

a

b

1 0 0 1

cc

jji

l

ji

10

l

ji

01 10

j

338

Page 3: [IEEE 2010 13th International Conference on Computer and Information Technology (ICCIT) - Dhaka, Bangladesh (2010.12.23-2010.12.25)] 2010 13th International Conference on Computer

operations. These operations are: a) And, b) Or and c) Implication. As an example for two given combinational Boolean functions A and B, This method will work on , and . In this method well known Shannon Expansion rule is used on the ROBDDs of the Boolean functions to apply switching AND, OR and IMPLICATION operations on them. In this method, at first ROBDD is build directly from the Boolean functions using Shannon Expansion rule. Then the main algorithm is used to perform switching operations on ROBDDs of the Boolean functions which will provide a resultant ROBDD from them. This method is totally implemented by array. The Drawbacks of the method proposed by Nilimesh Halder, A.B.M. Tariqul Islam, Mohammad Fazleh Elahi and Ju Bin Song are

• Only three switching operations are applied on the Switching functions ROBDDs in this method.

• In this method the switching operations are applied on only two switching functions.

• If ROBDDs of two Switching functions has different depth then this method could not apply switching operations on switching functions.

For first limitation we add some additional operations. For second limitation we select more than two functions then divide them into group that we have two functions with an operator. Then we have done it repeatedly. To overcome third limitation we approach with data structure with tree where Nilimesh Halder, A.B.M. Tariqul Islam, Mohammad Fazleh Elahi and Ju Bin Song approach data structure with Entry Table. By this way we can access different depth of the diagram.

III. METHODLOGY

A. BuildROBDD We use the renowned Shannon Expansion rule to build ROBDD from the Boolean functions. For applying Shannon Expansion rule on Boolean functions we build an algorithm and that is given below. 1. BuildOBDD(f_n,index,value,*tptr) 2. If(index>number_of_variable) then 3. return fn; 4. Endif 5. Else 6. nptr=create_node(index+1) 7. nptr�edge=value; 8. nptr�parent=tptr; 9. If(value==0) 10. tptr�left=nptr 11.BuildOBDD(f_n(x_(index=0) ),index+1,0,tptr�left) 12.BuildOBDD(f_n(x_(index=1) ),index+1,1,tptr�left) 13. Endif 14. Else 15. tptr�right=nptr 16.BuildOBDD(f_n(x_(index=0)),index+1,0,tptr�right)

17.BuildOBDD(f_n(x_(index=1)),index+1,1,tptr�right) 18. EndElse 19. EndElse 20. End BuildOBDD BuildOBDD builds the OBDD of every switching function. Here tptr and nptr are the data structure to represents BuildOBDD( ) where three pointer points left child, right child and parent and value hold the node value and edge hold the edge value from parent to the node. To achieve ROBDDs we have consider two topics to add a new node in the linked list.

Terminal Node: We only store two terminal nodes in memory. When a nodes child is a terminal value then they are linked with these terminal nodes.

Non-terminal Node: For the non-terminal value we compute first it’s left child and right child.

If two non-terminal nodes are Isomorphic then they are not stored in the linked list. Such as, if they produce same left child and right child then only one of them is stored in the linked list.

If one node’s left child and right child are same then we establish a link between the parent child of the current non-terminal node and one of the child nodes. The non-terminal values which are not in the previous steps are stored in the linked list.

B. Algorithm for Applying Switching Operations over multiple Boolean functions In our proposed method there are five steps to get the derived function. They are described below: Step 1: An ordering among all unique variables of all Boolean functions by which final ROBDD will be fixed at the first step. This ordering will be used to build all ROBDDs. Step 2: Individual ROBDD of all functions will be determined by using Shannon expansion rule. Example: let )5~.6()43()21( ffffff ⊕∨⊕∧ According to our method ROBDD of 5,4,3,2,1 fffff and 6f will be computed. Step 3: We will group the functions such a manner that each group will have two functions with an operator. Example: let )43()21( ffff ∨⊕∧ .According to our method, we will divide the functions this way )21( ff ∧ and )43( ff ∨ . Step 4: Then we will determine the ROBDD of each group by applying the switching operations )(∧AND ,

)(∨OR , )(⊕XOR , (~)NEGATION and )(→ONIMPLICCATI to each group by using Shannon

expansion rule. This ROBDD is the derived function of that group. Then a new function will be deriving from the ROBDD. For further operations this derived function will be used. Applying switching operations will be discussed on the next topics. Step 5: Repetitions of step 3 and 4 until only one derived

339

Page 4: [IEEE 2010 13th International Conference on Computer and Information Technology (ICCIT) - Dhaka, Bangladesh (2010.12.23-2010.12.25)] 2010 13th International Conference on Computer

function has been found.

C. Operations Through our method we apply five switching operations.They are )(∧AND , )(∨OR , )(⊕XOR ,

(~)NEGATION and )(→ONIMPLICCATI .We have illustrate the AND operation through an example, suppose we have two functions 1f and 2f we have to apply AND operation on it. The derived functions state after applying this operation is shown in Figure 5.

Fig. 5. Nodes of 21 fff ∧= .

For two functions 1f and 2f we have to apply ORoperation on it. After applying OR operation the derived functions nodes are shown in Figure 6.

Fig. 6. Nodes of 21 fff ∨= .

For two functions 1f and 2f we have to apply XORoperation on it. After applying XOR operation the derived functions nodes are shown in Figure 7.

Fig. 7. Nodes of 21 fff ⊕=

For two functions 1f and 2f we have to apply IMPLICATION operation on it. After applying IMPLICATION operation the derived functions nodes are shown in Figure 8.

Fig. 8. Nodes of 21 fff →=

For a function 1f if we apply NEGATION operation on it then the value is just inverse of its derived function. If the resultant of the function is 0 then it will turn to 1 and vice-versa.

D. Experimental Result We illustrate our experimental result through the following procedures. 1) Build ROBDD: We illustrate our experimental result through the following procedures. There are three Input Functions. They are 1f , 2f and 3f .

• 3~.2~.12.11 xxxxxf += • 2~.12~.1~3.2.12 xxxxxxxf ++= • 4~.34.33.1~3 xxxxxxf ++=

Let’s select the order as 4321 xxxx >>> .The Shannon’s Expansion of 3~.2~.12.11 xxxxxf += . Figure 9 and 10 shows ROBDD of 1f and data structure of 1f

a) 03~.2~.02.0 =+ xxx b) 3~.2~23~.2~.12.1 xxxxxx +=+ c) 3~3~.0~.10.1 xx =+ d) 13~.1~.11.1 =+ x e) 10~.0~.10.1 =+ f) 01~.0~.10.1 =+

Fig 9: ROBDD of 1f

0 1

1f

2f

0 1

1f

2f2f

1f

0 1

2f

1x

0 1

2x

3x

1f

0 1

2f

340

Page 5: [IEEE 2010 13th International Conference on Computer and Information Technology (ICCIT) - Dhaka, Bangladesh (2010.12.23-2010.12.25)] 2010 13th International Conference on Computer

Fig 10: Data structure of ROBDD of 1f .

Figure 11 and 12 shows ROBDD of 2f and ROBDD of 3f

Fig 11: ROBDD of 2f Fig 12: ROBDD of 3f

2) Operations: We have implemented five operations over the switching functions simultaneously. Example: let the compositional of three functions is

3~).21()21()21( fffffff →⊕∨⊕∧ . First we take group 21 ffA →= . The ROBDD and data structure of

21 ffA →= is shown in Figure 13 and Figure 14. Then we take 21 ffB ∨= and then 21 ffC ∧= . ROBDD of these functions are shown in Figure 15 and 16.

Fig 13: ROBDD of A

Fig 14: Data structure of A.

Fig 15: ROBDD of B Fig 16: ROBDD of C

Then ROBDD of function BCD ⊕= is shown in Figure 17. In Figure 18 ROBDD of ADE ⊕= is shown.

Fig 17: ROBDD of D Fig 18: ROBDD of E

ROBDD of the 3~. fEF = is shown in Figure 19. In Figure 20 Final ROBDD is shown. We have use the renowned Shannon Expansion rule to build ROBDD from the Boolean functions.

Figure 19: ROBDD of F Figure 20: Final ROBDD

Value Left Child Right Child

0

3x

1 1

1x

0

2x 2x

3x

x1

x2

x3

0 1

x1

10

x2

x2 x1 x3

Left Child 0 1

Right Child

x1 x2 x3

Right Child

x3

x1

10

x2 x2

x1

x2

10

x2

x3 x3

x1

x2

0

x3

1

x1

x2

0

x3

1

x1

0 1

x2

x3 x3

341

Page 6: [IEEE 2010 13th International Conference on Computer and Information Technology (ICCIT) - Dhaka, Bangladesh (2010.12.23-2010.12.25)] 2010 13th International Conference on Computer

IV. DISCUSSION

Nilimesh Halder, A.B.M. Tariqul Islam, Mohammad Fazleh Elahi and Ju Bin Song [8] did not work on ROBDDs which has different depth or level but in our method we have worked on the composition of switching functions which has different depth. This is shown in Figure 19, where the participating ROBDDs E and 3f has different depth 3 and 1 respectively. In the proposed method of Nilimesh Halder, A.B.M. Tariqul Islam, Mohammad Fazleh Elahi and Ju Bin Song [8], they did not work on the XOR and NEGATION operations but in our proposed method we have worked on it. XOR operation is shown in Figure 14 and Figure 16. NEGATION operation is shown in Figure 18. They build their method for only two combinational Boolean functions but we try to develop a sound technique that can be applied on composition of multiple switching functions.

V. CONCLUSIONS

The limitation of our work is we set same variable ordering to build ROBDD for every Switching function. But our method performs better result than the existing system. Our contribution can be summarized as:

• Designing a system that could perform over multiple Switching functions.

• Applying more switching operations on the Switching functions than the existing system.

• Applying operations over the Switching functions those has different depth or level.

In our proposed method, we have worked only those functions ROBDDs which are constructed in same ordering. In the future, switching operations may apply over the ROBDDs which are constructed in the best ordering of the individual functions. Here best ordering means the best order by which we get improved ROBDDs of a function.

REFERENCES

[1] Bryant, R. “Graph-based Algorithm for Boolean function manipulation”, In IEEE trans. Comp., pp. 667-691, 1986.

[2] Lee, C. Y. “Representation of switching circuits by binary decision programs”, Bell system Technical journal 38, pp. 985 – 999, 1959.

[3] Akers, S. P. “Binary decision diagrams”, IEEE transactions on computers C-27, 6 (Aug.), pp. 509-516, 1978.

[4] Fortune, S., Hopcroft, J., and Schmidt, E. M. “The complexity of equivalence and containment for free signal variable program schemes. Automata, Languages and programming”, Lecture notes in computer science, Vol. 62, G. Goos, J. Hartmanis, Ausiello, and Boehm, eds. Springer–Verlag, Berlin, pp.227-240, 1978.

[5] Bryant, R. E. “Symbolic Boolean Manipulation with Ordered Binary Decision Diagrams”, “Fujitsu Laboratories, Ltd., Kawasaki 211, Japan”, 1992.

[6] Halder, N., Ahmed, L., Asaduzzaman M. and Talukder, K. H., “Equivalence Checking of Sequential Design with BDD”.in 7th ICCIT 2004 BRAC University, 26-28 December 2004.

[7] Edmund M. Clarke, Jr. Orna Grumberg. And Doron a. Peled, “Medel checking” , The MIT press, second printing ,2000.

[8] Halder N., Islam A.B.M.T., Elahi M.F., Song J.B. “Analysis of Composition Techniques for Combinational Switching Functions Using Reduced Ordered Binary Decision Diagrams (ROBDDs)” in ICCIT 2007, 27-29 December 2007. 301].

342