Upload
phamdien
View
213
Download
0
Embed Size (px)
Citation preview
An ISOP-based Method For Threshold Logic Identification
Augusto Neutzling1; Mayler G. A. Martins
2; Renato P. Ribas
1,2, André I. Reis
1,2
1PPGC /
2PGMICRO, Institute of Informatics, UFRGS, Porto Alegre, RS, Brazil.
{ansilva, mgamartins, rpribas, andreis}@inf.ufrgs.br
Abstract—In this paper, an improved method to identify
threshold logic functions (TLF) is proposed. Threshold logic is a
promising alternative to conventional Boolean logic that has been
recently revisited due to the suitability to emerging technologies,
such as memristors, QCA, RTD, SET and spintronics.
Identification and synthesis of TLF are fundamental tasks for the
development of a circuit design flow based on such a logic style.
The proposed method is an improvement of a previous method,
which exploits both the order of Chow parameters and the
system of inequalities, extracted from a function, to assign
optimal variable weights and optimal threshold value. This is the
first heuristic algorithm that is not based on integer linear
programming (ILP) able to identify all threshold functions with
up to six variables. Moreover, it also identifies more functions
than other related heuristic methods when the number of
variables is higher from six. Differently than ILP, the proposed
algorithm is scalable and the average execution time is less than 1
ms per function.
Keywords— Digital circuit, threshold logic, logic synthesis,
nanotechnologies.
I. INTRODUCTION
The limits of MOS transistor scaling make necessary the investigation of new alternatives to VLSI circuit design. Among the potential candidates, there are the nano-devices technologies such as memristors, resonant tunneling devices (RTD), quantum cellular automata (QCA) single electron transistor (SET), and spintronics [1]. These new technologies usually present some particularities in respect to the most appropriate design style to implement digital circuits. In this sense, threshold logic gates (TLG) are being revisited recently due to the suitability to such emerging technologies [2][5][6]. Several implementations of TLGs have been proposed for both CMOS and new nanometric technologies [3][4].
In order to achieve a complete design flow based on threshold logic, the synthesis of Boolean functions using TLG represents a crucial process. In order to accomplish this step, most of the methods solve a system of inequalities generated from the truth table of the function, using integer linear programming (ILP) [7]. This approach has been used to synthesize TLGs and optimal results are obtained [5][6][8]. However, such approach has the drawback of not being scalable, because when the number of variables increases the number of inequalities to be solved increases exponentially.
One of the first non-ILP based methods proposed to identify threshold logic functions (TLF) was presented by Gowda et al., in [9], and improved afterwards in [10]. It is based on functional decomposition and min-max factorization tree. In [11], Palaniswamy et al. proposed a new method based directly on the modified Chow parameters, being improved
later in [12]. However, the main limitations of these methods are the number of identified functions and the fact that the assigned input weights are not always the minimum possible value. These non-minimal weights impact the final area of the TLG based circuits [2][5].
This paper proposes a novel non-ILP method to perform the identification and synthesis of TLF. The proposed algorithm is an improvement of the previous method, presented in [13], which manipulates the inequalities generated from the irredundant sum-of-products (ISOP) to assign the TLG input weights. To the best of our knowledge, it is the first approach which identifies all functions with up to six variables being suitable to be inserted in the known threshold logic synthesis tools without loss of efficiency [6][10][14]. The proposed method is also able to identify more functions than the other non-ILP methods, presenting reasonable execution time.
The rest of this paper is organized as follows. In Section II, we present some fundamentals about threshold logic for a better understanding of the work. The proposed method is described in detail in Section III, complemented by an example of execution in Section IV. Section V presents the results, demonstrating the algorithm efficiency. Finally, the conclusions are outlined in Section VI.
II. PRELIMINARIES
Some concepts are essential for a good understanding of the proposed method. In this section, the fundamentals of threshold logic and some of its properties are reviewed. Moreover, Chow parameters are explained.
A. Threshold Logic Gate
Threshold logic gate (TLG) is a circuit that implements a Boolean function in the following way. Each input has a specific weight, and the gate has a threshold value. If the sum of ON (input value equal 1) input weights is equal or greater than the threshold value, the output gate value is ‘1’. Otherwise, the output is ‘0’. This operating behavior can be expressed as [7]:
{ ∑
where xi represents each input value [0,1], wi is the weight of each input, and T is the gate threshold value.
B. Threshold Logic Function
Threshold logic function (TLF) is a Boolean function that can be implemented using a single TLG. TLF can also be called ‘linearly separable’ function. A TLF is completely represented by a compact vector [w1,w2,…,wn;T]. For instance, the corresponding TLG of the functions ƒ= x1.x2.x3 and g = x1˅x2˅x3 are [1,1,1;3] and [1,1,1;1], respectively. Note that to represent the OR operation the symbol “˅” will be used instead of the symbol “+” in order to avoid confusion with the arithmetic sum.
TLF can represent complex functions, such as ƒ = x1 x2 ˅ x1 x3 ˅ x2 x3 x4 ˅ x2 x3 x5 which corresponds to the TLG ƒ = [4,3,3,1,1;7]. For this reason, an important advantage of threshold logic is to reduce the total number of gates used in the circuit [6][7].
C. Threshold Logic Functions Properties
All TLF are unate functions,therefore if a function has binate variables, the function cannot be TLF. However not all unate functions are TLF [14]. The function ƒ = x1.x2˅x3.x4 is a simple example of an unate function that is not TLF.
If the given logic function contains complemented variables, these variables can be manipulated in the same way as functions having all non-complemented variable in order to identify if it is a TLF or not. If ƒ(x1,x2,…,xn) is TLF, defined by
[w1,w2,…,wn;T], then its complement (̅x1,x2,…,xn) is also TLF, defined by [-w1,-w2,…,-wn;1-T].
If a function is TLF and inverters are available, then it is possible to obtain a realization by using TLG with only positive weights by selectively complementing the inputs.
D. Chow Paramaters
Chow parameters represent a particular set of parameters used to define the relationship among the weights of TLF. Given a function ƒ(x1,x2,…,xn), we call mi the number of entries for which ƒ(xi) = 1 and xi = 1, and ni the number of entries for which ƒ(xi) = 1 and xi = 0. The Chow parameter pi of a variable xi is defined as [7]:
For instance, Fig. 1 shows the Chow parameter computation, considering the function ƒ = x1. (x2 ˅ x3).
The correlation among pi and pj values of two input variables induces the correlation among the weights wi and wj of the input variables xi and xj, respectively. If pi > pj then wi > wj [7].
x1 x2 x3 ƒ m1 = 3 and n1 = 0
0 0 0 0 p1 = 6
0 0 1 0
0 1 0 0 m2= 2 and n2 = 1
0 1 1 0 p2 = 2
1 0 0 0
1 0 1 1 m3 = 2 and n3 = 1
1 1 0 1 p1 = 2
1 1 1 1
Figure 1: Calculation of Chow parameters value for f.
III. PROPOSED METHOD
The most common strategy used to identify TLF is generating a system of inequalities from the truth table, and then solving this system using integer linear programming (ILP). If there is a possible solution, the function is TLF, and the solutions of the system correspond to the input weights. If the system of inequalities cannot be solved, the function is not TLF and it requires more than one TLG to be implemented.
In the proposed method, a complete system of inequalities is also generated using similar approach to ILP inequalities generation algorithms. However, unlike the ILP approach, the inequalities system is not solved. The proposed algorithm selects some of the inequalities as constraints to compute the input weights, in a bottom-up approach. In the next, after assigning the weights, the consistency of the complete system is verified to check if the weights have been correctly assigned.
As mentioned before, if a function is not unate, then this function is not TLF. Therefore, the algorithm first performs a test to check whether the function is unate. A negative variable can be changed into a positive variable if the weight signal is inverted, and this amount is subtracted from the threshold value. Without loss of generality, it is possible to consider if the proposed algorithm has been initialized from a positive unate function.
In order to facilitate the understanding of our approach, the algorithm is split in eight steps, which are summarized in the following: in step (1) the Chow parameters are computed and the ordering of the variable weights is identified; steps (2) and (3) demonstrate how to generate the inequalities system and, in step (4), how to simplify these inequalities; in step (5), it is explained the procedure that associate each variable with some inequalities; in step (6), the input weight assignments is detailed and the solution consistency is presented in in step (7). The calculation of the threshold value is performed in step in step (8). The proposed algorithm flow containing each step is shown in Fig. 2
Order Variables
using Chow
Generate
Inequalities
Simplify
Inequalities
Assign weights
Positive Unate
Function
Calculate Threshold
Gate Value
Associate
Inequalities for
each Variable
Threshold
Logic Gate
Is a TLFCheck results consistency
Is not a TLF
Step (1) Steps (2)(3) Step (4) Step (5)
Step (6)Step (7)Step (8)
.
Figure 2: Calculation of Chow parameters value for f.
A. Step 1: Ordering Variable Weights
As discussed above, the ordering of Chow parameters corresponds to the ordering of the variable weights. This is used to define the ascending order in which the weights should be assigned. The proposed algorithm assumes that when the Chow parameter values of two variables are the same, the variables must have equal weight. Based on this statement, the variables are grouped by their Chow parameter value.
For the example illustrated in the next section,
ƒ=x1.x2˅x1.x3.x4, the calculated Chow parameters of the
variables x1, x2, x3, and x4 are 10, 6, 2 and 2, respectively. In
this case, the algorithm assigns first the weight of the variables
x3 and x4, after the weight of the variable x2 and the variable x1
weight is the last to be assigned.
B. Step 2: Inequalities System Generation
Equation (1) defines the relationship between the inputs
weights and the threshold value of a TLF. If the function
output is ‘1’ for determined assignment vector, then the sum
of weights of this assignment is grater or equal then the
threshold value. Otherwise the sum of weights is less than the
threshold value. This procedure is demonstrated bellow.
For instance, given the truth table of the function
ƒ=x1.x2˅x1.x3.x4, the relationship between weights inputs and
the threshold value is shown in Table I.
Table I - Relationship between input weights and gate threshold
value.
x1 x2 x3 x4 ƒ
0 0 0 0 0 0 < T
0 0 0 1 0 w4 < T
0 0 1 0 0 w3 < T
0 0 1 1 0 w2 + w4 < T
0 1 0 0 0 w2 < T
0 1 0 1 0 w2 + w4 < T
0 1 1 0 0 w2 + w3 < T
0 1 1 1 0 w2 + w3 + w4 < T
1 0 0 0 0 w1 < T
1 0 0 1 0 w1 + w4 < T
1 0 1 0 0 w1 + w3 < T
1 0 1 1 1 w1 + w3 + w4 ≥ T
1 1 0 0 1 w1+ w2 ≥ T
1 1 0 1 1 w1+ w2 + w4 ≥ T
1 1 1 0 1 w1 + w2 + w3 ≥ T
1 1 1 1 1 w1 + w2 + w3 + w4 ≥ T
Some relations on Table I are redundant, due to dominance
between inequations. For instance, since we have the relation
[(w1+w2) ≥ T] and the input weights are always positive, the
relation [(w1+w2+w3) ≥ T] is redundant. The relevant
information are the less assignments that make the output
`1`(true) and the greater assignment that make the output
`0`(false). An assignment vector A (a1,a2,a3..an) is small than
or equal to an assignment vector B(b1,b2,b3…bn) , denoted as
A≤B , if and only if ai≤bi, for (i=1,2,3…n). For example, the
assignment vector (1,0,0,1) < (1,1,0,1). However the
assignment vectors (0,1,0,1) and (1,1,0,0) are not comparable.
In the proposed method, these redundancies are avoided
using the ISOP and the negated ISOP expressions of the
function. In the example, the less true assignment vectors are
(1,1,0,0) and(1,0,1,1) and the greatest false assignment vectors
are (1,0,1,0), (1,0,0,1) and (0,1,1,1). Therefore, the algorithm
creates only (w1+w2), (w1+w3+w4) in the greater side and
(w1+w3), (w1+w4) and (w2+w3+w4) in the lesser side. Each sum
of input weights greater than the threshold value is placed in
the greater side set. And that each sum of weights which is
less than the threshold value belongs to the lesser side set.
Table II shows these two sets.
Table II - Greater and smaller sets of inequalities from Table I.
greater side
lesser side
(w1+w2) ≥ T > (w1+w4)
(w1+w3+w4) ≥ T > (w1+w3)
---
T > (w2+w3+w4)
C. Step 3: Inequalities System Criation
Each greater side element is greater than each lesser side
element due greater side elements are greater (or equal) than
the threshold value, and lesser side elements are smaller than
such threshold.
The method crates a new inequality, from the other two
inequalities. The inequalities system is generated by
performing a kind of Cartesian product of the greater side set
and the lesser side set. Table III shows the 6 inequalities
generated for the example given in the previous section (Table
I). If it had been used all assignment vertices, 55 inequalities
would be generated.
Table III – Generated Inequalities System.
1 (w1+w2) > (w1+w4) 4 (w1+w3+w4) > (w1+w4)
2 (w1+w2) > (w1+w3) 5 (w1+w3+w4) > (w1+w3)
3 (w1+w2) >(w2+w3+w4 6 (w1+w3+w4) >(w2+w3+w4)
D. Step 4: Inequalities Simplification
Besides generating only irredundant inequalities, the
algorithm simplifies each inequality and discards some of
them. The inequalities simplifications step is performing in
four basic steps, which are showed in the flow of Fig 3.
Group variables
with the same
Chow
(Fake
Variables)
Eliminate
variables which
appear in both
inequality sides
Eliminate
inequalities
with no
elements in the
smaller side
Eliminate
inequalities
with a single
element in each
side
Figure 3: Calculation of Chow parameters value for f.
The method considers if two variables have the same
Chow parameter values, they have the same weight (it is not
proven for functions which have more than seven of
variables). Based on this premise, the algorithm creates a new
reduced set of variables, where each variable corresponds to
one Chow parameter value.
Reducing the number of variables allows a reduction in
amount of inequalities and consequently it decreases the
algorithm runtime. Table IV shows the created fake variable
for the current example. The new number of variables is three.
Table IV: Fake variables based in the variable Chow parameter
Variable Chow parameter Fake Variable w1 10 A w2 6 B
w3 and w4 2 C
Table V presents the new inequalities system, with the fake
variables.
Table V: Inequalities system with the fake variables
1 (A+B) > (A+C) 4 (A+C+C) > (A+C)
2 (A+B) > (A+C) 5 (A+C+C) > (A+C)
3 (A+B) > (B+C+C) 6 (A+C+C) > (B+C+C)
The inequalities simplification occurs when the variable
weight, appears on both sides of some inequality. When it
happens, this variable is removed from such inequality. For
example, considering the inequality [(A+C+C) > (B+C+C)], it
is simplified removing C, resulting on inequality [A > B]. This
procedure is showed in Table VI.
Table VI: Inequalities simplification for the given example.
1 (A+B) > (A+C) 4 (A+C+C) > (A+C)
2 (A+B) > (A+C) 5 (A+C+C) > (A+C)
3 (A+B) > (B+C+C) 6 (A+C+C) > (B+C+C)
The resultant set of inequalities is presented in table VII.
Table VII: Resultant set of inequalities.
1 B > C 4 C >
2 B > C 5 C >
3 A > C+C 6 A > B
Since all input weights are positive, the algorithm discards
the inequalities having no weight (or ‘0’) in the lesser side.
These inequalities are not useful, because they only confirm
the weights are positive.
The inequalities which contain only one element in each
side are checked only once directly with the Chow parameters.
If one of these inequalities is inconsistent the function is
defined as not TLF, because the Chow parameter order is not
respected. For example, for the inequality number 1 of the
Table VII (B > C), we replace the variables by the chow
parameter value getting (6>2). In this case the inequality does
not disrespect the Chow parameter order, than this inequality
is discarded. It is crucial to note that in this moment:
• The method is not assigning the input weights yet;
• The method cannot determine the function is a TLF;
• It is only possible determine some functions that are not a
TLF.
After all this simplifications the set of useful inequalities is
greatly reduced. In the demonstration example the only
remaining inequality is the number 3 (A > C+C). This will be
the only inequality used in the assignment step
E. Step 5: Associating inequalities for each variable
Before compute the input weights, a kind of map
associating the variables with some of the inequalities is
created. In this map each variable points for inequalities in
which the variable is contained on the greater side. This map
will be used in the weights assignment step.
Fig. 4 shows an example of one of these maps, which
represent a different function. The function which has been
used in the other steps example is not useful to present how
the map works, because the simplified set has only one
inequality.
A
B
C
A > D + BA > D + CA > C + C
A + B > D + C + CA + C + C > D + B + B
A + C > D + BB + B > D + A
B > D + CB + C > A
B + B > D + CD
Variables Inequalities
Figure 4: Example of map associating variables and inequalities.
In order to compute the input variable weights, it is necessary to select the inequalities having only one weight in the greater side. This variable weight is larger than all variable weight from the smaller side. Such procedure is essential for the next step (‘weights assignment’). For the previous example, the selected inequalities after the simplifications are only [w1 > w2] and [w1 > w3].
The input weight from the greater side is defined as the key of the inequality. The algorithm creates a relation between inequalities that have the same key. In the example, the key of both inequalities is the weight w1.
F. Step 6: Weights Assignment
The weight assignment step receives the fake variables
order, defined by the Chow parameters, the inequalities and
the map defined in the previous section. The first step is to
assign minimum values for each variable. The variable with
the lowest Chow parameter value is assigned by `1`, the
second smallest with `2` and so on. In the previous sections
example the initial weights are C = 1, B = 2 and A = 3.
For each variable, in ascending order, the method checks
the inequalities for which the variable points on the map
(inequalities where such variable appears on the greater side).
The check is performed by simply checking if the sum of the
current values of the greater side variables is greater than the
sum of the current values of the lesser side variables.
If any of these inequalities is inconsistent, the value of the
variable can be incremented, to try make it consistent. When
the value of some variable is incremented, the value of the
variables with the higher Chow are also incremented, to
maintain order. That means if there was an inequality, for
example (A + C> B + B + B), increasing the value of C would
never become consistent the inequality, because it would also
increase the value of A and B. Consequently the lesser side
would always increase more.
The decision whether a variable should be incremented or
not taken as follows: When the value of the variable is
incremented, the sum of the greater side must increase more
than the lesser side. This ensures that increment the variable
value is the correct way to make the inequality consistent.
This procedure is done for each variable, increasing the
variable values when necessary. In the end a single check is
performed on the original system, replacing the variables with
the values found. If all inequalities are consistent, the values
are correct input weights. If at least one inequality is
inconsistent, the method sets the function is not a TLF. This
ensures that the method does not find false positive solution.
For the previous sections example, only one inequality
(A>C+C) remains to the assignment step. The assigned
weights were C = 1, B = 2 and A = 3. The equation is
consistent with such values then no increment is required.
These fake variables values are assigned to the respective
input weights, resulting w1=3 w2=2, e w3=w4=1. Table VIII
shows the original system with the assigned values.
Table VIII: Original system with the computed input weights
1 (3+2) > (3+1) 4 (3+1+1) > (3+1)
2 (3+2) > (3+1) 5 (3+1+1) > (3+1)
3 (3+2) > (2+1+1) 6 (3+1+1) > (2+1+1)
Since all inequalities are consistent, the computed values are
accepted as the solution of the system
G. Step 7: Check the Weights on the Original System
This step performs a check to ensure that the weights encountered are a valid solution of the inequalities system. All the inequalities of the original system, shown in Table III, are checked with the weights that were defined by the algorithm for each variable.
If all inequalities are consistent, the function is defined as
TLF, and the input weights assigned are accepted. If at least
one of the inequalities is false, the function is defined as not
being TLF. This ensures that the algorithm does not result in a
false positive TLF. In the example, since all inequalities are
consistent, the computed values are accepted as the solution of
the system
H. Step 8: Calculate the Threshold Value
After checking if the weights assigned are correct, the
algorithm calculates the threshold value. In a TLF represented
through an ISOP form, each product needs to have the variable
weights sum greater or equal than the threshold value.
Therefore, the threshold value is the less sum of weights value
of the greater side set. In the example given above, the
threshold value is ‘5’, from the greater side element any
inequalities (in this case all greater sides have the same sum).
When a variable is incremented, an already checked
inequality can become inconsistent. One way to identify and
prevent the occurrence of this problem is explained in this
section.
I. Exceptional functions
Let us consider for example that for a given function, the
growing order of the variables is D, C, B, A, where A is the
highest value and the lowest D value. At a certain time the
algorithm has checked the inequalities associated with the D,
C and B variables. The inequalities associated with the
variable "A" are checked and an inconsistency determines that
the variable-A needs to be incremented. However there is an
inequality (B+C+D>A) which has already been checked. By
increasing the value of the variable "A", the inequality that
had been considered consistent can become inconsistent.
This kind of problem can occur when a variable in the
lesser side of the inequality has greater value than any greater
side variable. In experiments, it was found this occurs in less
than 3% of the six input functions and not occurs in five or
fewer inputs, a slight increment in the assignment step was
developed to solve this problem. A new map where variables
point to inequalities, similar to the map of step 5, was created
and called "map 2". If a variable X is on the lesser side and his
Chow parameter value is greater than any Chow parameter of
the greater side variables, this information is recorded on the
map. In the assignment step, when the method specifies that a
variable will be incremented, this "map 2" should also be
consulted.
At the moment of a variable increment, the method:
•Checks if there is an inequality associated with such
variable, in the "map 2";
•Check if after the increment in the variable value the
inequality becomes inconsistent,
•If so, the method increments the greatest value variable of
the greater side, and makes the inequality consistent again.
It is important to note that whenever the value of some
variable is incremented, the value of the higher variables must
also be increments, i.e., the order must be maintained.
IV. EXAMPLE OF EXECUTION
In the previous section, it was explained how the method
works. The example used was very simple, to facilitate the
understanding. However, the importance of each step can be
confused. In order to become it clear, this section presents a
more complex example. It is a six input function which the
method finds the exact solution
Given the function ƒ=x1.x2˅x1.x3˅x1.x4˅x2.x3˅x2.x4˅x1.x5.x6,
the first step is compute de Chow parameter for each variable
and sort this values. Table IX presents the four different values
of Chow parameters computed, and the correspondent
variables.
Table IX: Chow parameter values for the first example.
Chow Parameter Variables 2 x5, x6
14 x4, x3 30 x2 34 x1
The given function has 64 possible assignment vectors,
since it has six variables. Between these assignments 23 are
false and 41 are true, it would generate 943 inequalities.
However, as it was explained, the method uses the ISOP
expression and generates only the greatest false assignments
and the less true assignments. The greater side and lesser side
sets are presented below, in Table X:
Table X: Inequalities generation for the first example.
Greater side Lesser side
w1 + w2
> T >
w3 + w4 + w5 + w6
w1 + w3 w2 + w5 + w6
w1 + w4 w1 + w6
w2 + w3 w1 + w5
w2 + w4
w1 + w5 + w6
After that, the “cartesian product” between the greater side
and the lesser side is performed, and 24 inequalities are
generated, as showed in Table XI.
Table XI: Original inequalities system for the first example.
1 w1+w2 > w3+w4+w5+w6 13 w2+w3 > w3+w4+w5+w6
2 w1+w2 > w2+w5+w6 14 w2+w3 > w2+w5+w6
3 w1+w2 > w1+w6 15 w2+w3 > w1+w6
4 w1+w2 > w1+w5 16 w2+w3 > w1+w5
5 w1+w3 > w3+w4+w5+w6 17 w2+w4 > w3+w4+w5+w6
6 w1+w3 > w2+w5+w6 18 w2+w4 > w2+w5+w6
7 w1+w3 > w1+w6 19 w2+w4 > w1+w6
8 w1+w3 > w1+w5 20 w2+w4 > w1+w5
9 w1+w4 > w3+w4+w5+w6 21 w1+w5+w6 > w3+w4+w5+w6
10 w1+w4 > w2+w5+w6 22 w1+w5+w6 > w2+w5+w6
11 w1+w4 > w1+w6 23 w1+w5+w6 > w1+w6
12 w1+w4 > w1+w5 24 w1+w5+w6 > w1+w5
The algorithm create the fake variables, based in repeated
Chow parameters, and replace the input weights, as showed in
table XII.
Table XII: Fake variable crated for each Chow parameter value.
Input weights
Variable Chow parameter Fake Variable
w1 34 A
w2 30 B
w3 and w4 14 C
w5 and w6 2 D
The simplification is performed, removing the equal values
that appear in the both sides of the inequality. The simplified
set of inequalities is showed in the table XIII:
XIII: Simplified inequalities system.
1 A+B > C+C+D+D 13 B > C+D+D
2 A > D+D 14 C > D+D
3 B > D 15 B+C > A+D
4 B > D 16 B+C > A+D
5 A > C+D+D 17 B > C+D+D
6 A+C > B+D+D 18 C > D+D
7 C > D 19 B+C > A+D
8 C > D 20 B+C > A+D
9 A > C+D+D 21 A > C+C
10 A+C > B+D+D 22 A > B
11 C > D 23 D >
12 C > D 24 D >
The method selects, for the weight assignment, only
inequalities that have more than one weight in the lesser side,
and discards repeated inequalities. Table XIV presents the
selected inequalities for the given example.
Table XIV: Selected inequalities for the weight assignment step.
1 A+B > C+C+D+D 13 B > C+D+D
2 A > D+D 14 C > D+D
5 A > C+D+D 15 B+C > A+D
6 A+C > B+D+D 21 A > C+C
In the first step the variables are assigned with minimum
values , respecting the order defined by the Chow parameters.
The values are A = 4, B = 3, C = 2 and D = 1 [Fig 5(1)]. Since
there are not inequalities on the map appointed by the variable
D, the method accepts the value 1 for such variable and starts
to verify the inequalities appointed by C. The inequality
number 13 is inconsistent and increasing the variable value
this inequality becomes consistent [Fig. 5(2)]. The updated
value of the variable C is 3, and with this value all of "its"
inequalities are consistent.
Next, the method checks the inequalities appointed by B.
The inequality number 14 is verified inconsistent. Increment
once the value of the variable B does not become consistent
the inequality [Fig 5(3)], but decreases the delta between the
two sides , i.e., this is the way to make consistent inequality .
The increment is done again, and the current values are B = 6
and A = 7 [Fig 5(4)] which make all inequalities appointed by
B becomes consistent. Finally, the method checks the
inequalities appointed by A and verifies that such inequalities
also are consistent with the weights A = 7, B = 6 , C = 3 and
D = 1 .
Due the bottom-up approach used in the proposed method,
the weight inputs and threshold value found are the minimum
possible. It is a relevant advantage, since impacts directly in
the area of the TLG. In the Palaniswamy`s method, for
example, the solution found for the same example is
[9,8,4,4,1,1;11].
C++
A+B> C+C+D+D
A> D+D
A> C+D+D
A+C> B+D+D
B> C+D+D
C> D+D
B+C> A+D
A> C+C
B++ B++
A=4
B=3
C=2
D=1
(1) (2) (3) (4)
4+3> 2+2+1+1
4> 1+1
4> 2+1+1
4+2> 3+1+1
3> 2+1+1
2> 1+1
3+2> 4+1
4> 2+2
5+4> 3+3+1+1
5> 1+1
5> 3+1+1
5+3> 4+1+1
4> 3+1+1
3> 1+1
4+3> 5+1
5> 3+3
6+5> 3+3+1+1
6> 1+1
6> 3+1+1
6+3> 5+1+1
5> 3+1+1
3> 1+1
5+3> 6+1
6> 3+3
7+6> 3+3+1+1
7> 1+1
7> 3+1+1
7+3> 6+1+1
6> 3+1+1
3> 1+1
6+3> 7+1
7> 3+3
Figure 5: Example of map associating variables and inequalities
V. EXPERIMENTAL RESULTS
Two set of experiments were carried out to validate and compare the algorithm to existing algorithms available in the literature. The first part evaluates the efficiency of method, through the number of identified TLF. The execution time is evaluated in a second comparison, calculating the average time per identified function. The platform used was Intel Core i5 processor with 2GB main memory.
A. Proposed method efficiency
The main goal of TLF identification algorithms is to
maximize the number of TLF identified. In this sense, the first
experiment compares the efficiency through the number of
identified TLF. The enumeration of all TLF up to eight
variables has been already calculated by Muroga, in [16].
These numbers were used as reference.
In [9], Gowda et al. presented the first method to identify
TLF without using linear programming, and improved it
afterwards in [10]. The approach presented by Palaniswamy et
al., in [11] and improved in [12] provides better results. For
this reason, such results were used as the basis of comparison
for evaluating the proposed method.
Table XV shows the experimental results. In the first
column, it is shown the total of NP representative classes of
functions for each number of inputs, calculated by Muroga
[16]. The second column presents how many of this total of
functions the Palaniswamy’s method identifies, and the third
column shows how many TLF were identified by the proposed
method. For up to four variables, both methods identify all existing
TLFs. For five variables, Palaniswamy’s method identifies 91.3% of the 86080 functions whereas the proposed method identified all existing TLFs. For six variables Palaniswamy’s method identified 73.2% and the proposed method also identifies all TLF. The proposed algorithm is the first non-ILP algorithm that is able to identify correctly all TLF up to 6 inputs, and delivers superior results in comparison to the state-of-the-art algorithm when the number of inputs increases.
Table XV - Number of TLF identified for each method.
Inputs ILP [16] Palaniswamy [12] Our approach
TLF TLF % TLF %
1 2 2 100 2 100
2 8 8 100 8 100
3 72 72 100 72 100
4 1536 1536 100 1536 100
5 86080 75200 87.4 86080 100
6 14487040 9424000 65.1 14487040 100
Each of the NP representative class corresponds to a larger
set of TLF. Table XVI shows the number NP representative
threshold logic functions identified for each method from 1 to
7 inputs.
Table XVI - Number of NP representative TLF identified for each method.
Inp
uts
ILP [16] Gowda
[10]
Palaniswamy
[12] Our approach
TLF TLF % TLF % TLF %
1 1 1 100 1 100 1 100
2 2 2 100 2 100 2 100
3 5 5 100 5 100 5 100
4 17 15 88.2 17 100 17 100
5 92 52 56.5 84 91.3 92 100
6 994 181 18.2 728 73.2 994 100
7 28262 573 2.0 9221 32.6 22477 79.5
B. Execution time
In the second experiment, the execution time was evaluated by calculating the average time spent to identify each TLF. All TLFs were evaluated by the proposed algorithm, and the results are shown in Table XVII. These values demonstrate that the proposed algorithm is as fast as the Palaniswamy’s method [12]. For all NP functions with up to seven variables, the average execution time to identify each function was less than one millisecond. The execution time does not increase exponentially as occurs in the ILP-based algorithms.
Table XVII - Execution time per identified TLF.
Inputs 1 2 3 4 5 6 7
Time (ms) 0.3 0.2 0.3 0.4 0.5 0.4 0.6
To try the scalability of the proposed algorithm, random sets of 5000 threshold logic functions of eight to eleven variables were selected. The results are in Table XVIII.
Table XVIII - Execution time per identified TLF.
Inputs 8 9 10 11
Time (ms) 0.7 0.7 0.8 0.9
When the number of variables increases, solving the inequalities system by linear programming becomes quite expensive. Fig. 6 shows the scalability of the proposed algorithm, against the exponentially behavior of the ILP algorithm. The results are obtained using the library 44-6.genlib, which contains unate functions with up to 16 inputs. The average execution time per function was calculated for each number of variables, and the results are presented in a logarithm scale.
Figure 6 – Average execution time per function for each
number of variables, using the 44-6.genlib.
Up to six inputs the difference is about one order of magnitude. The ILP method execution time has a marked increase from eight variables, and reaches tens of seconds for sixteen variables. In the other hand, the proposed algorithm reaches only some milliseconds, for this number of variables. The difference is about four magnitude orders. Moreover, our approach identifies correctly all TLF for this benchmark, emphasizing again the algorithm efficiency.
VI. CONCLUSIONS
An improved non-ILP algorithm to identify threshold logic functions (TLF) was proposed. The proposed algorithm manipulates inequalities generated from the ISOP form of the function, to avoid using linear programming. The input weights are assigned using a bottom-up approach, based in the Chow
parameter order, to compute the weights. The algorithm identifies more functions than the previous heuristic methods. The results show that the method is able to identify all functions with up to six variables. It is suitable to be inserted in the known threshold logic synthesis tools without loss of efficiency, since such a frameworks limit to six the number of TLG inputs. The runtime per function is scalable, differently of the ILP approaches, enabling the application of the algorithm when the number of inputs increases.
ACKNOWLEDGEMENTS
Research partially supported by Brazilian funding agencies CAPES, CNPq and FAPERGS, under grant 11/2053-9 (Pronem).
REFERENCES
[1] “Semiconductor Industries Association Roadmap.” http://public.itrs.net 2011.
[2] Gao, L., Alibart F. and Strukov D. "Programmable CMOS/memristor threshold logic", IEEE Trans. Nanotechnol., vol. 12, no. 2, pp.115 -119 2013
[3] Celinski, P. et al., 2003, “State of the art in CMOS threshold logic VLSI gate implementations and systems”, in Proc. of the SPIE, pp. 53–64.
[4] Beiu, V., Quintana, J. M. and Avedillo, M. J., Sep. 2003, “VLSI implementations of threshold logic: A comprehensive survey,” IEEE Trans. Neural Netw., vol. 14, no. 5, pp. 1217–1243.
[5] Avedillo, M. J. and Quintana J.M., 2004, “A threshold logic synthesis tool for RTD circuits,” in Proc. Euromicro Symp. Dig. Syst. Des., pp. 624–627.
[6] Zhang, R., Gupta, P., Zhong L. and Jha, N.K., 2005, “Threshold network synthesis and optimization and its application to nanotechnologies,” IEEE Transactions on CAD, vol. 24, no. 1, pp. 107–118.
[7] Muroga S., 1971, “Threshold Logic and Its Applications” New York: Wiley-Interscience.
[8] Subirats, J., Jerez, J. and Franco, L., Nov. 2008, “A new decomposition algorithm for threshold synthesis and generalization of boolean functions”, IEEE Trans. Circ. Syst. vol. 55, no. 10, pp. 3188–3196.
[9] Gowda, T., Vrudhula, S. and Konjevod, G., 2007, “A non-ilp based threshold logic synthesis methodology”, In Proc. IWLS.
[10] Gowda, T. and Vrudhula S., 2008, “A decomposition based approach for synthesis of multi-level threshold logic circuits”, Proc. of ASP-DAC, pp. 125-130.
[11] Palaniswamy, A.K., Goparaju, M.K. and Tragoudas, S. 2010 “Scalable identification of threshold logic functions”, in Proc. GLSVLSI. 269–274.
[12] Palaniswamy, A.K., Goparaju, M. K., and Tragoudas S., Aug 2012, “An Efficient Heuristic to Identify Threshold Logic Functions”, In ACM Journal on Emerging Technologies in Computing Systems, Vol. 8, No. 3, pp. 19:1–19:17.
[13] Neutzling, A., Martins, M. G. A., Ribas, R. P. and Reis, A. I., 2013 “Threshold Logic Synthesis Using Functional Composition Paradigm” in Proc. of IWLS.
[14] Neutzling, A., Martins, M. G. A., Ribas, R. P. and Reis, A. I., 2014 “A Constructive Approach for Threshold Logic Circuit Synthesis” in Proc. of ISCAS.
[15] Avedillo M. J., Quintana J.M., and Rueda, A.: "Threshold Logic" In the "Encyclopedia of Electrical and Electronics Engineering", John Webster (Ed.) 1999, John Wiley & Sons. vol. 22, pp. 178-190.
[16] Muroga S., Tsuboi T. and Baugh, C. R., 1970, “Enumeration of Threshold Functions of Eight Variables,” IEEE Trans. Comput vol. C, no. 9, pp. 818–825.
0,01
0,10
1,00
10,00
100,00
1.000,00
10.000,00
100.000,00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Avera
ge
Tim
e p
er
Fu
nc
tio
n
(mil
iSeco
nd
s)
Number of Variables
ILP
Our Approach