IN THIS PAPER, we present a folding algorithm for programmable logic arrays (PLA's) that employs the technique of simulated annealing. The PLA folding prob-.
208
IEEE JOURNAL
OF SOLID-STATE
CIRCUITS,
VOL.
SC-22,
NO. 2, APRIL
1987
PLA Folding by Simulated Annealing D. F. WONG, H. W. LEONG, MEMBER, IEEE,ANDC. L. LIU, FELLOW,IEEE
Abstract — We present in this paper a simulated-anneafing programmable-logic-array (PLA) folding algorithm for simple as well as multiple column folding. Experimental resnlts indicate that our algorith, performs very well. In many test problems, our results are snperior to those produced by the well-known heuristic algoritbnr due to De Micheli and Sangiovanni. We also show bow our algorithm can be extended to handle constrained folding.
1.
INTRODUCTION
N THIS PAPER, we present a folding algorithm for programmable logic arrays (PLA’s) that employs the technique of simulated annealing. The PLA folding problem is well known [1], [4], [5], [9]. By a simple folding of the columns of a PLA, we mean to let two input variables or two output functions share one column. In a multiple folding of the columns of a PLA, we allow any number of input variables or any number of output functions to share one column. It is customary to disallow an input variable and an output function to share the same column. For the PLA in Fig. l(a), Fig. l(b) shows a simple folding of the columns of the PLA and Fig. l(c) shows a multiple folding of the columns of the PLA. The objective, of course, is to find a simple/multiple folding of the columns of a PLA such that the total number of columns in the folded PLA is minimized. Our study is motivated by the following considerations. First, folding is an important step in the design process that can contribute significantly to the reduction of the total area of a PLA. Yet, the problem of obtaining an optimal folding has been shown to be NP complete [10]. Consequently, current research has been restricted to heuristic algorithms [1], [4], [5] which do not carry out a thorough search of the solution space, and to branch-andbound algorithms [2], [9] which can only handle PLA’s of moderate size (no more than 50–100 input/output lines). Furthermore, most of these efforts have been concentrated on simple folding. Besides [1], [3], and [17], relatively little has been done for multiple folding. Our folding algorithm can perform multiple folding as well as simple folding. As
I
Manuscript received September 4, 1986; revised January 10, 1987. This work was supported in part by the National Science Foundation under Grant DCR 84-04239, b the Semiconductor Research Corporation under Contract 86-12-109, { y a grant from the General Electrlc Company, and by a grant from the Sandia Laboratories. This paper is an extended version of the paper “Multiple PLA folding by the method of simulated annealing,” published in Proc. of the IEEE Cwtom Integrated Circuits Conference, 1986, pp. 351-355. The authors are with the Department of Computer Science, University of Illinois at Urbana-Champaign, Urbana, IL 61801. IEEE Log Number 8613640.
a matter of fact, in our algorithm the computational effort for obtaining a multiple folding is a little bit less than that for obtaining a simple folding because in our formulation, simple folding is considered as a special case of multiple folding with additional constraints. We shall also discuss how to extend our algorithm to handle constrained folding. Second, simulated annealing has been shown to be a powerful technique in the solution of discrete optimization problems, in particular, problems in the design automation area [7], [8], [13], [15]. However, although the general principles of the technique of simulated annealing are well understood, its application to specific problems still requires a certain amount of thoughtful formulation and parameter tuning. Our research has indeed brought some of these points out in evidence. Two major considerations in applying the simulatedannealing technique are the formulation of the solution space and the definition of the notion of neighborhood in the solution space. In most of the previous work on the folding of PLA’s, algorithms examine partial solutions and try to expand a partial solution in a step-by-step fashion. Such an approach is not suitable for the simulated-annealing setting because in the method of simulated annealing, complete solutions are examined one after another. We formulate the column folding problem as a row permutation problem which leads to a simple and efficient way to obtain simple/multiple foldings of PLA’s. Another important consideration is the choice of a cost function that can guide us from one solution to another (sometimes it is more effective to use a cost function that is different from the objective function to be minimized). We shall also discuss the annealing schedule as well as the equilibrium and freezing conditions. Our experimental results are very encouraging. They compare well with the results produced by an optimal algorithm [12] and an implementation of the unconstrained folding algorithm due to De Micheli and Sangiovanni [1] in the case of multiple folding. They also compare well with the optimal algorithm [9] in the case of simple folding. As a matter of fact, our algorithm consistently outperformed De Micheli and Sangiovanni’s algorithm in many test problems. This paper is organized as follows. A precise formulation of the PLA folding problem is given in Section II. Section III describes in detail our simulated-annealing algorithm for multiple PLA folding. Sections IV and V describe how our algorithm can be extended to handle realization of multiple-folded PLA and various constraints
0018 -9200/87/0400-0208$01
.00 01987 IEEE
WONG
et a[.:
PLA
FOLDING
BY SIMULATED
209
ANNEALING
/1 12 13 /4 15 (6
/7 18 19
/1
/2
/3
/4
&
/6
100000
~1
PI
Jf=
(8
/9
lolpl
ololooolop2 Oolo loo
P2 P3
17
lop,
010001101p4
P4
loolooloop6
P5
oololloll]p6
P6 w
Fig.
2,
Personality
/1
P3
M of the PLA in Fig. l(a).
matrix
I*
13
14
15
18
/7
18
/9
100000
101
PI
100100
100
P5
P6
010001101
P,
010100010
P2
P5
001011011
P6
P,
001010010
P3
P4
P2
(a) 12
14
11
PI P5
PI
P,
P5
P2
P4
P6
~ 2
L
‘3+FtFtHw
P2 P6
(b)
P3 H 13
6
/5
Fig. 3. (a) Mm obtained by permuting the rows of matrix M in Fig. 2. (b) A different realization of the PLA in Fig. l(a) corresponding to Mm.
(c) Fig. 1.
(a) A PLA. (b) Simple folding of the columns of the PLA in (a). (c) Multiple folding of the columns of the PLA in (a).
on the folding problem. The specialization of our algorithm to the problem of simple folding is described in Section VI. Finally, some experimental results and further comments are given in Section VII. II.
THE PLA FOLDINGPROBLEM
A personality matrix is a symbolic representation of a PLA which has one column for each input variable and output function, and one row for each product term. The ijth entry is a 1 if the jth input variable (or its complement) or the jth output function is present in the i th product term. Otherwise, the ijth entry is O. The personality matrix of the PLA in Fig. l(a) is shown in Fig. 2. Let M be the personality matrix of a PLA. Let n be the number of product terms, m ~ the number of input variables, and m ~ the number of output functions. Let m = ml + m z. Clearly, M is an n X m matrix. An input column will be referred to as an input line and an output column will be referred to as an output line. A line is either an input line or an output line. Let 1, denotes the i th column of M, 1< i < m. Thus, throughout our discussion, we shall have 11, 12,. ... 1~1 as the input lines, and lW,+~, 1m1+2~” “ ., In as the output lines. Let {pl, pz,. . . . p.} be the set of all the product terms of the given PLA. We
may assume that row i of M corresponds to product term p,, l