Professional Documents
Culture Documents
An Expert System To Optimize Combinational Logic
An Expert System To Optimize Combinational Logic
An Expert System To Optimize Combinational Logic
Theses
2-5-1987
Recommended Citation
Lin, Gu-Ching, "An expert system to optimize combinational logic" (1987). Thesis. Rochester Institute of
Technology. Accessed from
This Thesis is brought to you for free and open access by RIT Scholar Works. It has been accepted for inclusion in
Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
ritscholarworks@rit.edu.
Rochester Institute of Technology
by
Gu-Ching Lin
A thesis, submitted to
February 5, 1987
Title of Thesis: An Expert System To Optimize Canbinational Logic
--------~--~~------~----------------------~--
I Gu~g Lin °- prefer to be contacted each time a request for
reproduction is made. I can be reached at the following address:
Optimization
Systems
3. System Implementation
3.1 Minimization
3.2 Decomposition
3.3 Synthesis
3.4 Optimization
Appendix B. Example
Bibliography
ii
1. Introduction and Background
chips.
1
(data flow design, control logic design, physical layout, etc.),
optimization.
retained.
design into DF and minimizing the DF, this information has been
subexpressions .
is largely avoided.
care"
are in the early stages of development. Finally, there is
ALERT16
system was validated on an existing design, the IBM 1800,
DAS/Logic9
applications of digital system design. (Design
OPS52
rule-based system written in which refines a textual
OR gate structures are changed into NAND or NOR gates. The final
both the design cycle time and the overall quality of the
tion tools, for performing logic level reduction are a major step
(Figure 1.1) :
.
minimizing the Boolean equations,
.
factoring the two-level functions into multilevel
functions,
.
synthesizing an initial network, and
.
optimizing the network for a given technology.
transformations4'5
series of local on the circuit. These
rule-based system.
circuit by a
| BOOLEAN FUNCTION j
I I
I
f^
| MINIMIZATION '1 ESPRESSO-IIC |
I I I
| DECOMPOSITION |
I I
j SYNTHESIS
I
| . AND/OR
| .NAND/NOR
I I LOCAL TRANSFORMATION
j OPTIMIZATION 1
I NAND/NOR GATE
I I
| RULE LIBRARY |
I I
this technology.
and rules that use those facts as the basis for decision making.
10
I I
FACTS j INTERPRETER |
1"
I I
1
I I
RULES I SCHEDULER I
frames.24
or more
as it more efficient, more easily understood,
making
modified.
easily
11
The inference engine uses knowledge in the knowledge
a solution.
Rl7
applications of such systems is the system used at DEC to
2 . 1 Productions systems
by the rules.
12
A production rule is a statement cast in the form "If
B
"X- r . J Y
IF
a NOR inverter is connected to the output of a NOR
THEN
remove the NOR inverter and NOR gate X from net list
13
The control structure uses a rule interpreter, sometimes
"metarules"
encoded in terms of to find the enabled rules and to
of rules to find ones that would conclude the current goal, then
14
Not all expert system are rule-based. Rule-based
as a result of experience.
AI.
15
. Since optimization techniques depend heavily on the
problem.
problem.
knowledge-
encoded, the modularity and incremental development of
with modularity
maintenance in large systems.
16
Despite their disadvantages, knowledge-based expert
17
3. System Implementation
Prolog3
a given technology, and was selected as a formalism to
18
3.1 Minimization
19
3.2 Decomposition
20
Then the substitution s(v,g,f) of v for g in f is the expression
=
Cx + D. The kernal (common subexpression) A + B is pulled out
To compute f/g:
1. Let g =
{a^} and for i | f).
each set
h^ =
{bj ajbj ^
2. Set f/g =
h^.
| o | =
number of cubes in f.
kernal (k, f ) :
For i =
k + 1 to n
Let c =
f/li
if |c| > 2 and i =
n then
=
kernal(lj_,f) c
kernal (lj.,f) =
kernal (i,c)
else
next i
21
We now describe the first step of decomposition, which
"distillation"6.
exists, stop.
4. Set f^ =
s(v,k fl k',fj.) for each function.
5. Go to 1.
k'
pair k A selected in step 2 can influence the quality of, the
"condensation" 6 .
22
The Condense Algorithm:
|c fi
c'
| > 2. if no such pair exists, stop.
3. Set f-[ =
s(v,c A c',^) for each function.
4. Go to 1.
be applied in step 1.
Example: Let f =
AB(C(D + E) + F + G) + H and
g
=
AI(C(D +E) + F + J) + K
Distillation:
k'
|k fi | =
D + E > 2
set L =
D + E
then f =
AB(CL + F + G) + H
g
=
AI(CL + F + J) + K
kernal (g) =
CL + F + J
set M =
|kAk'| =
CL + F > 2
then f =
AB(M + G) + H
g
=
AI(M + J) + K
23
Condensation:
Pass 1: set N =
ABM C\ AIM =
AM > 2
then f =
B(N + AG) + H
then g =
I(N + AJ) + K
L =
D + E
M =
CL + F
N =
AM
and let the process go back to step 2 to select the second order
24
results in many more logical components than the first algorithm.
subexpression exists, go to 1.
5. Set f^ =
s(v,kfi k',fi) for each function.
6. go to 2 .
25
Now we look another example that has more structure than
the first one. The incoming data and resulting design for part of
a 16-bit bus structure are shown below. The varl through var8 are
f3 =
h'i'j'k'r + e'f'ar + c'ap'r + b'ap'r + d'ar + aps + h'i'jkr
+ h'ikl'r + d'hjkl'r + b'hjk'l'p'r + e'hjkl'f'r + c'hjkl'p'r
+ hjkl'ps
f4 =
h'i'j'k't + c'ap't + b'ap't + e'f'at + d'at + apu + h'i'jkt
+ h'ikl't + e'hjkl'f't + d'hjkl't + c'hjkl'p't + b'hjkl'p't
+ hjkl'pu
f5 =
h'i'j'k'v + d'av + b'ap'v + c'a p'v + e'f'av + apw + h'i'jkv
+ h'ikl'v + c'hjkl'p'v + e'hjkl'f'v + b'hjkl'p'v + d'hjkl'v
+ jhkl'pw
f6 =
h'i'j'k'x + d'ax + c'ap'x + b'ap'x + e'f'ax + apy + h'i'jkx
+ h'ikl'x + c'hjkl'p'x + b'hjkl'p'x + d'hjkl'x + e'hjkl'f'x
+ hjkl'py
+ hjkl'p'bl
c'hjkl'p'bl + hjkl'pcl
hjkl'phl
26
The results of decomposition are shown below. Each of the lines
the new variable varl with the expression j'k'+jk. The variable
'k'
1. varl =
j + jk
hjkl'
2. var2 =
a +
ikl' varli'
3. var3 = +
b' c'
4. var4 = +
d' var4p'
5. var5 =
e'f + +
var3h'
6. var6 = + var5var2
var2p' var3h'
7. var7 = +
8. var8 =
var2p
f3 = var6r + var8s
f4 = var6t + var8u
f5 = var6v + var8w
f6 = var6x + var8y
f7 = var6z + var8al
f8 = var6bl + var8cl
f9 = var7xl + var8dl
flO = var7el + var8yl
fll = var7gl + var8fl
fl2 = var7il + var8hl
27
3.3 Synthesis
derived from the previous module and one that generates a NAND
AND/OR implementation.
(F')'
F = and then applying DeMorgan's laws:
out by using
' Xx* Xn'
+ + + Xn) =
x2'...
(Xx X2
' Xx' X2' Xn'
Xn) = + + +
(Xx X2 ... ...
A.
B B
A+B A4-B
AB
tXj
A-
B"
B
MD-'rO-O
A+B AB
AB
28
The above conversion produces a lot of cascaded inverters in a
multilevel netlist, but since the double inversion does not alter
'levels'
the output is referred to as the number of of gates. The
network has 4 levels, the first level is gates, the fouth level
is gatel. The logic conversion is started from the gates that are
in the highest level. The rules for obtaining the NOR network
29
4. If the output signal is 0 and the gate is an OR gate,
implementation are exactly the same as for NOR network except the
added for the NAND implementation so that a NAND gate can have no
next lower level (level 2) . Gate 4 is also an AND gate but with
30
signal 1 for gate 5 that we mentioned before still exists. Gate 5
is translated to a NOR gate and an inverter but the NOR gate with
31
rt
A
B o$*te5
=o
J
6*fceA
F
Gutel
Qatt^
A M>xOlOiH
B o
butt* tot & _. fateJ
XVy'/
k>H>Gate I
D^^O^-E^
&ate$
32
3.4 Optimization
substitutions on an to the
existing netlist, similar way an
structure.
circuit.
3.4.1 Knowledge-Base
33
configuration. Substituting the replacement configuration for the
circuit.
"adjust_netlist"
clause removes the NOR inverter G2 and NOR gate
gate Gl.
A A
B
S3
c o
:-
nor_rule_l(X,Y)
node_(nor,Y,Z) ,
gate_(nor,Z,Vars) ,
adjust netlist(nor,X,Y,Vars) .
34
The rules within rule library are ordered by their desirability.
rules based on how many times a rule has been used in the
circuit. There are sixteen rules in the system now (see Appendix
structure will use rules from the first rule until there is no
a new
operators each work by producting a single new object
space
representation.24
tree.
35
implementation. Optimization is equivalent to finding a path from
a meta-rule.
select rule
36
search function is called, it is given two arguments: a rule, and
variable for gate Gl and connects to a NOR gate G3. Since the
37
A sample netlist: A rule selected
by control structure:
(nor,pl,p2,p3) nor_rule_l(X,Y) :-
(nor,p2,p4,p5) node_(nor,Y,Z) ,
(nor,p3,p6) inverter(nor,Y,Z) ,
(nor,p6,p7,p8) gate_(nor,Z,Vars)
adjust_netlist(nor,X,Y,Vars)
PL
P2
PS
GZ
PI
PI PC Gl
P2 > P3
Gt- Gl
Nt'
PL.
P
PI
O-i <*
P2
PS'
Pi
Gl
38
3.5 Program Organization
39
(nor , f 12 , norl , nor2 )
(nor,norl,gate22,il)
(nor,gate22,/p,var2,/hl)
(nor, /hi, hi)
(nor,/p,p)
(nor , var2 , gate39 , a)
(nor,gate39,l,/k,/j,/h)
(nor,/k,k)
(nor,/j,j)
(nor,/h,h)
(nor , nor2 , nor21 , gate47 , gate46)
(nor,gate47,h,var3)
(nor,var3,gate41,gate40)
( nor, gate41,i, varl)
(nor , varl gate3 8 gate37 )
, ,
(nor,gate38,/k,/j)
(nor,gate37,k, j)
(nor,gate4 0,l,/k,/i)
(nor,/i,i)
(nor,gate4 6,p,var2)
(nor , nor2 1 , var2 , /hi )
40
4. Conclusion and Future Work
that is capable of
automatically synthesizing and transforming
functional specifications into gate level implementations. The
above 100 gates, the system achieved area reductions ranging from
40
action describing how to replace it with the replacement
configuration .
timing constraints.
41
Appendix A. User's Manual
NAME
preopt -
generate Prolog accepted form from truth table
SYNOPSIS
preopt [file]
DESCRIPTION
preopt generates a form suitable for Prolog from a truth
table which defines a set of Boolean functions. If no output
file is specified, the default output file "_opt " is
generated (e.g. test_opt) . Since Prolog does not accept a
period within file name, all the file name including a
period will be changed to "_".
The following keywords are reserved for the system use, they
should not appear in the input file for input variable or any
other variable.
SEE ALSO
Eqntott ,
Espresso
NAME
logopt -
combinational logic optimization
SYNOPSIS
logopt [option] [type] [file]
DESCRIPTION
logopt takes as input a two-level Boolean functions
optimized functional equivalent netlist. The system consists
of four distinct modules: minimization, decomposition,
synthesis and optimization. The optimization module is
implemented by a rule-based system.
"type"
specifies the target technology for the system. The
allowed types are -nand for NAND gate, and -nor for NOR gate.
The output netlist only includes NOR gate if -nor type is
specified.
"option"
specifies boolean function decomposition which
11
1
1 Boolean Function j
1
| Eqntott
sir
1
1 Truth Table |
1
| Espresso-IIC (Minimiz
| Truth Table |
| After Minimization |
1
| Preopt
| Prolog |
| Accepted Form j
1
| Logopt (Optimization)
1 1
| Netlist |
m
Appendix B. Example
Example 1
r0 =
b&c&d&e&h& ! i & j & k & ! 1 5
f0 =
b&c&d&t&h& ! i & j & k & ! 1 ;
1-0 =
d&e&h&i&.j& k & ! 1 & o ;
f0 =
d & f & h & i & j & k & ! 1 & o ;
f 0 =!d&e&h&i&j& k & ! 1 & r.i & n ;
1 W ! d & f & h & i & & k & ! 1 & &
=
j m n ;
|-0 =
a & b & c & d & e ;
f0 =
a & b & c & d & f ;
& ! d &
-
1-0 a g ;
1-0 =
a i- !e S- !f g ;
! d & & ! i & & k & ! 1
-
f0 g j ;
I 0 =
! 3 & !f&g&!i&j&k&!l;
f0 =
g & ! h & 1 & k & ! 1 ;
1 0 =
g & ! h & .
j & k & ! 1 ;
lr0 =
g & ! h ! i & ! j & ! k ;
f 0 =
! h & ! i & .i
& k & 1 & ! p ;
1-0 =
d & ! e & ! f & h & i & j & k & ! 1 & rn 5
f = !d&e&!h&ii&.j&k&l& m & n & ! p
f =
! d & f & ! h & ! i & j & k & 1 & rn & n & ! p
f =
d & ? & ! h & ! 1 & j & k & 1 & o & ! p ;
l'
f =
d & f & ! h & ! i & J & k & & o & ! p ;
f =
d & e & h & ! i & j & k & ! 1 & o ;
f =
d & f & h & ! i & j & k & ! 1 & o ;
f =
a & ! d & e & rn & n ;
! d & f & &
f & n
-
a rn ;
f =
a & d & e o ;
f =
a & d & f & o 5
f =
! d & ! i & j & k & i 1 & q
f -
! e & I f & ! i & j & k & ! 1 & q i
f =
! h & ! i & J k & q ;
f =
! h & ! i & ! j & ! k & q ;
f5 a & Ic ! p & v
ffj ! b & h .j
& k & 1 & ! p & v
f5 a & id v ;
f5 a & !e ! f & v
f5 a & p & w ;
f5 h & j & k & 11 & p & w
f6 a & !c ! p & x
fb !h & i
& !j & ! k & x ;
f& !h & i
l & .1
& k & x ,
f& !h i & k & ! 1 & x ;
f6 a & p & y ;
f6 h & J & k & ! 1 & p & y ;
f7 a & ! b & ! p & z :
f7 ! b h &
.j
& k & 1 & ! p &
1 1
f7 !c & h & &
=
j k & ! 1 & ! p & z 5
f7 =
a & !d 2 5
f7 -
a & !e & ! f & z ;
f7 =
!d & h & j & k & ! 1 & z ;
f"7 =
! ! f & h & &
e
j k & ! 1 & z ;
f7 =
!h ! i & ! .
j & ! k & z ;
f7 =
!h ! i & j & k & z ;
f7 =
ih i & k & ! 1 & z ;
f7 =
a & p & al ;
f7 h & & k & &
=
j 11 p & a 1 ;
f8 & ! b & ! p &
=
a b1 ;
f8 =
a & !c & ! p & b1 ;
fB =
! b & h & j & k & ! 1 & ! p & b1 ;
fa !c & h & k & ! 1 & I p & b1
j
.
;
fa =
a & !d is bl ;
fa =
a & le & ! f & b1 ;
fa =
!d & h & & k & ! 1 & b1
.
j ;
fa =
!e ! f & h & j & k & 11 & bl ;
fa =
!h ! i & ! .i
& ! k & b1 ;
fa =
!h I i & .j
& k bl ;
fa =
!h i & k & ! 1 & bl ;
fa -
a p & cl ;
fa =
h & J & k & ! 1 & p & cl ;
fd =
a & !p & xl ;
f9 h & k ! 1 & ! p & 1
=
j x ;
f9 =
a & P & dl ;
f9 =
h & J & k & ! 1 & p & d 1 ;
f9 I h ! i ! & ! k & 1
=
j x ;
f9 =
!h I i & j & k & x 1 ;
f9 =
!h i & k & ! 1 & x 1 ;
f 10 a !p & el ;
f 10 h j & k & ! 1 & ! p & e 1 ;
f 10 a p & yi ;
f 10 h j * k & ! 1 & p & y1 ;
f 10 !h & ! i & ! .
j & ! k & e 1 ;
& k 8-
f 10 !h & ! i & .j
el ;
f 10 !h & i & k & ! 1 & el ;
&
f 11 a !P & gl ;
f 11 h & j & k & ! 1 & ! p & g l ;
f 11 a & p & fi ;
f 11 h & J & k & ! 1 & p & fl ;
111
step 1: eqntott -r-
/* s a rn p1 e . aq n * /
. i 37
. Ci 1
. na sample
1 b b c d h i k 1 f
- .i
e
j o m n a g p q r s t u v w x
y z a l b1
c 1 x 1 d 1 el yl gl fl il hi
.ob f0 f f3 f4 fS fb f7 fa f9 fl0 fll fl
.
p 1 40
0000 1.
0 0 0 0 0 0 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 0 0 0 0 0 0 0
0 1-110 0 i 0 0 0 10 0 0 0 0 0 0 0
-0-1-110 1 0 0 10 0 0 0 0 0 0 0 0
10--
0 1-1 --0-1 0 0 10 0 0 0 0 0 0 0 0
01-1100 1 0 0 10 0 0 0 0 0 0 0 0
_0_...
1-110 0-1 0 0 10 0 0 0 0 0 0 0 0
1-110 1 1 0 0 0 0 0 0 0 0 0 0 0 1
1-110 1 1 0 0 0 0 0 0 0 0 0 0 10
1-110 1 1 0 0 0 0 0 0 0 0 0 1 0 0
1-110 1 1 0 0 0 0 0 0 0 0 10 0 0
1-110 1 1 0 0 0 0 0 0 0 10 0 0 0
1-110 1 1 0 0 0 0 0 0 3 0 0 0 0 0
1-110 1 1 0 0 0 0 0 10 0 0 0 0 0
1-110 1 1 0 0 0 0 10 0 0 0 0 0 0
1-110 1 1 0 0 0 10 0 0 0 0 0 0 0
1-110 1 1 0 0 1 0 0 0 0 0 0 0 0 0
0-111101-11 10 0 0 0 0 0 0 0 0 0 0
--01 111 0 10 0 0 0 0 0 0 0 0 0
0100111 11 0 0 10 0 0 0 0 0 0 0 0 0
0111110 11 1 0 0 0 0 0 0 0 0 0 0 0
_._.
10 0_-l_l 0 10 0 0 0 0 0 0 0 0 0
X H 1 010000000000
10001110-1 0 0 10 0 0 0 0 0 0 0 0 0
--_
1-001 1 1 1 1 0 0 10 0 0 0 0 0 0 0 0 0
1-1011011 0 1 0 0 0 0 0 0 0 0 0 0
10111100-1
"
! 0 0 000000000
1100111-1 0 0 10 0 0 0 0 0 0 0 0 0
1110110-1 010000000 0 00
1111110-1 1 0 0 0 0 0 0 0 0 0 0 0
111 1 1 1 000000000 0 0
111-101101 10 0 0 0 0 0 0 0 0 0 0
1111 1 1 00000000 0 00
111110110 10 0 0 0 0 0 0 0 0 0 0
. e
VI
step : espresso sample. eqn > sample. esp
/* sample. */
esp
. na sample
. i 1 b b c? d c h i k 1 f o rn n a
.j
g p q r s t u v i bl
c 1 x 1 <J 1 1
e y1 g 1 f 1 i 1 h 1
.ob f0 f f3 f4 fz> fb f7 fa f9 f!0 fil fl
. i 37
. o 1
.
p 140
0-
00 i j 1 1 -
1 1 0 0 1 0000000000
--0 1 00 1 1 1 --
1 1 0 v;i X 0000000000
0-
- -
1 000 1 1 1 3 0 0 1 0000000000
0-1 1 1 101-1 1 100000000000
1 1 i i 1 0--
--0 1 1 1 00000000000
1 1 1-10 J 10 1
100000000000
i 1 1 1 1 01 10 1 00000000000
1-001 111 1 0 010000000000
1 1001 1 i-1 0 010000000000
1011 1 100-1 100000000000
--i-1 1 i I0i i 100000000000
~~1 1 1 1 1 10 -
1 100000000001 I
3 101 101 1
-- ~
010000000000
0-
-
1 1 101 1 1 0 1 0000000000
0-0 3. 100 1 010000000000
0-0 1 3 00 .1.
100000000000
1 J j j 1 i 00000000000
111 1 1 100000000000
0 j-J 1 J 010000000000
01 1 1 1 010000000000
0000 1 000000001000
0000 1 000000000100
0000 1 0000000000 1 0
1-
0000 000000000001
1 -11 0 i .
1 00000000 1 000
1-1 10 1 1 000000000100
1-1 10 1 1 000000000010
1-! 10 1 1 000000000001
0-
1 0 1-1 0 1 0000000000
0000 1 010000000000
0000 1 100000000000
0000 1 00 1 000000000
0000 1 000100000000
0000 1 0000 1 0000000
0000 1 00000 i 000.000
0000 1 000000100000
VI 1
0000 ! 000000010000
1-1 10 1 1 001000000000
000 1 00000000
1-11 0 1 1 0000 1 0000000
1-11 0 1 1 00000 1 000000
j _
1 10 j ^ 000000100000
1 _
1 10 1 ^ 0000000 1 0000
Gl 1 100 i 001000000000
0 ..
H00 1 000100000000
0-_.
1 100 1 000010000000
0. ._
1 1 00 1 00000 1 000000
01 100 j 000000100000
0.
1 100 1 000000010000
-0 1 10 0..J 001000000000
0 1 10 0_1 _
001000000000
~ * 10 & 1 000100000000
0 ! !0 0 i 000100000000
...
0 j 10 0 1 000010 0 0 0 0 0 0
0 1 10 0 j 000010000000
-.0 1 10 0 j 000001000000
0 1 10 0 1 000001000000
-0 1 ) 0 0 1 000000100000
0 1 1W 0 1 000000100000
...0 1 10 0 ^ 000000010000
0 1 10 0 1 000000010000
001 1 1 0 100000000000
0--01 10 1 010000000000
--0--01 10 1 100000000000
01-10 1 000000001000
01-10 J 000000000100
01 ...
10 1 0000000000 1 0
1-
01-10 000000000001
01 ...10 1 010000000000
01 -
10 1 1 00000000000
01-10 1 001000000000
0 1-1 0 1 000 1 00000000
0 1-1 0 1 0000 1 0000000
01-10 1 000001000000
01-10 1 000000100000
01-10 1 000000010000
1 1 1 1 0 1 0000000000
1 1 1--1 010000000000
001 1 1 000000001000
001 1 1 000000000100
001 1 1 000000000010
001 1 1 ~
00000000000 1
0"
-0 1 100000000000
0"
-0 1 001000000000
0-
-0 000100000000
0-
-0 0000 1 0000000
0-
-0 000001000000
0"
-0 000000 1 00000
VI 1 1
0 -0-
000000010000
1--
001 010000000000
0011-
001000000000
1-
001 000100000000
0011-
000010000000
1-
001 000001000000
0011-
000000100000
1_
001 -
000000010000
0 H0 1 001000000000
--0 110 000100000000
0 110 000010000000
0 H0 000001000000
0 i X0 000000 100000
--0 1 10 000000010000
-0 1 -0-1 001000000000
0 1 -0-1 001000000000
1 000100000000
1 000100000000
--
1 000010000000
1 0000 i 0000000
1 -0 1 000001000000
0 1 -0 1 000001000000
1 000000100000
1 000000100000
1 000000010000
--
1 000000010000
110 000000001000
1 10 _0 000000000100
110 000000000010
10" 00000000000 i
1
-1-
0-1 10 1 100000000000
-1 000000001000
_! 000000000 100
-1
.
1 000000000010
-1 1 000000000001
001000000000
-1 1 000100000000
-1 1 000010000000
000001000000
-1 1 000000100000
_1 000000010000
-0-
1 , 100000000000
-0-
1 001000000000
-0-
1 000100000000
-0-
1 000010000000
-0-
1 000001000000
1_.
-0- 000000100000
-0- 000000010000
-0-
000000001000
-0-
000000000100
-0-
000000000010
-0-
-1-
000000000001
: t e p 3 : pre o pt s a rn pie.
. ria sampl * /
. 3 1 1> b e cl C-'
h i j k 1 f o rn n a d p q r r>
b1 c: 1 x 1 d 1 el / 1 13 1 f 1 l 1 h 1 *-
/
. ob f 0 f f3 f 4 ) fb f / t O f9 f 10 f 3 1 f 1
. i 3 i */
/* . c i 1 >: /
/ x .
p 1 40 k /
/ >: . e * /
L'
/d' ' '
r Vi f 0, , fi, i j, k, / 1 ,
i , rn, nil ) .
c, h i
n'
fn i f-0, I / , , .
i , , , in , r i ; .
, h, i , j, k, / . /f , rn .1 j
' '
f ,--. ( f 0, Ho , h ,
i ,
i , k, / 1 , f , o J ; .
' '
i n. .
t f0, L ci , e . r i , i , j ,
k , / 1 . o j ) .
,
'
/ i'
, j, k,
'/!','
/f '
,
u'J )
fn. ( f 0, [hi, c, d, f ,
all ) .
fn ( f 0, lib, c, d, c.?, a ] ) .
fn '. (f0,
II' /h'
, i, k,
' /I'
,
gJ ) .
' '
* ri. (f 0,
H' /e'
,
/f , a, t\l ) .
' '
t n ( f 0, [ / d ,
a , g II ) .
' /p'
/d' ' /h' ' /i'
k, 1, f rn, n, J )
fn <f, C J,
-
,
"
, , ,
' /p'
f n ( f, L' /d'
e,
' /h' ' / l '
, j , k, 1 , rn, n, i ) .
, ,
' ' /p1
' /i'
/f J >
fn "<f,
" Hd,
' /e'
,
' /h'
, ,k, 1,
'
.j,
/p'
, rn,
fn (f , [.ci,
' /h' ' /i'
k, 1, f, o, J ) .
"
, , J,
' /p'
'
/IT '
/ i
'
j , k, 1 , o, 1 )
( f , Cd,
.
fn e, , ,
' /I'
' /i' f,oID.
fn. <f, rd, h, , j, k, ,
' ' /l'
oil).
f n. <f, lld,e,h, ,.j,k, ,
'/!',' '
[' /e' ' /i' /f
fn. _<f',
, , j, k, ,qll).
fn ( f C
'
/d '
,
f ,
rn ,
n ,
a J ) .
_ ,
(f L' /d'
e, rn, n, a 3 )
, ,
.
'
fn. ~(f, hid,
' /e'
, /f ,m,all) .
fn ~(f,
/d' ' /i' qJ)
C , , j, k, ,
' /l'
1 ri. "<f,
L' /h' qll )
, i, k, ,
tn (f , Cd, e, o, aJ ) .
/h' ' /i'
fn ._
(
f, c , ,.j,k,q3).
' '
f"_ f3, < r.f !,.), k , / 1 , p , s 3 ) .
LI'
fn _
( f3, /IV , i, k, ' /l' , r3 ) .
L' /d'
f3, , a,
rll ) .
/h'
II" ' /i' ' /.j' ' /k'
, t3
fn ._ f4, , , , )
' /I'
fn.. f4, Cl i)J. k, , p,
ull ) .
fn.. f4, C
/e'
,
'
/ f' , a, t 3 ) .
f n_ ( f 4, c<=>, P, u3 ) .
/d' '
fn._ (f4, II , a,
t3 ) .
' /l'
/h' '
v3 ).
f.. (f5, II , i, k, ,
'
f>' Cf3, L
' /e'
,
/f , a, v3 ) .
/i'
' /h' ' v3 )
fX_ (fS, C , j, k,
.
,
' /l'
' /d' v3 )
f^r (f5, c , j, k,
.
,
' /p'
c /e' '
v3 )
fn. (fS, , a, ,
.
' /p'
' /b' v3 )
fri_. <f5, c , a, ,
.
c a, p, w3 )
Fr.l (f5,
.
' /k'
II /h' ' /i' ' /.j' x3 )
fr... (fb, , , , ,
' /l'
c k, p, y3i
f" (ft., " i 3 i ,
.
'
c ' /e' ' /l'
/f x3 ) .
fn.. (fb, , ,
fri_ , ,
fr._ (fa, , ,
/d' ' /l'
*3>
fn_ (fb, C , j, k, ,
fn_ (f6, , a, ,
c a, P, y3 )
fn_ (f6, .
X 1
II' /d'
f r_ < fb, , a, x3 ) .
C /C /l' /p'
f>__ f"7, ,
z3 ) .
/b' /l','
fn_ f7, C /p', z3 ) .
' '
fn". Cf8, Ci i , j , k, / 1 , p , c 1 3 ) .
/b' '/l','/p'
f._ fa, r , j,k, , bl3 ) .
' '
1 1 a, c /f a, bl3 )
/e'
fn.. , ,
.
fr (f8, L< a , p ,
c 1 3 ) .
/d'
fn.. .fa, c , a, bl3 ) .
'
fn_ f9, Cl i,j,k, /l',p,dl3).
L1 /h' ' '
fr< (f9, , i, k, /] ,
xi3 ) .
'
fn_ >f9, Cc=* , /p' , x
i 3 ) .
'
t~rt_ fl0,
[' /h'
,
' /i'
,
' /.j'
,
/k ' ,
e 1 3 )
' /l'
f f'_ (fl0, Lh, j, k, ,
P,yl3).
' /l'
I' /h'
i, k, el.] )
f^_ fl0, , ,
' /i'
(f 10, [' /h'
k, el3 )
f>'_ , , .j,
.
' /p' )
f "_ < f 10, [a, ,
el3 .
/j' '
f ii, I' /h' ' /i' '
/k ' gl3>
f>'.. , , * ,
, ,
f r' _
( f ll, I a , p , f 1 3 ) .
k,'/l' p,hl3).
f ri... < f i, -h,.j, ,
X 1 1
fn_(fl, C.j, k, ' /l' , ' /p'
, ill) .
fn_ (f 1, [.a, p , h 1 3 ) .
f nna. ( f ) .
f nna .
<f"3) .
f nna_ ( f 4 ) .
f nna.. (f'5) .
.
fi'ma. .
( f 6> .
fnna ( f /) .
f nna. (fa).
f nna.. (f9) ,
.
f nna. ( f i 0 ) .
.
f vi n a ( f 1 1 >
f nna ( f i ) .
(nor, f 0, i nvl )
(nor, i i g at e34 3, t e3 1 9, t
."
nv , , var 11 a , gat n a ei gat 6't ,
gat (-
g at g . i , g at e 1 )
( n at c 3. 4 i 1 /k /d 3 0, /h / /b)
ri o r , , / j , , , , , var , c,
(nor, /c, c)
(nor, /t-i, b)
(nor, /h, h)
( nor, /d. d )
( n o r , v a r 10, e , f)
(nor, /k, k)
(nor, / j , i )
(nor, var3, /.j, i, /k, h, p, /l )
(nor, /l, 1 )
( nor, gat t:3 1 , 1 , / k, h , / l , / g >
(nor, /g, g )
(nor, / i , 3 )
(nor, gat e9, /j, i, 1, /k, var&, /g)
(nor, vs.r&, vav-10, /d)
( nor , g at e 7 , k , j , i , h , / g )
X 1 1 1
(n va rll, gate49, gate48)
(n te49, /n, d,
gate varl0)
(n /n, n) r i /
(nc i i , i niv
v i )
( vi f , 3, gate30,
invi, nor, norl, gate3L, gate33, gatel)
(m 7
var-
(no v
var'3, /fc), /c)
(no v
var3, a, gate39)
k, Ji )1 Ij
-
I- ,-.-?
( no gate36,
(nc gate40, 1, /k, / /i )
(nc /u, u)
gate44)
(no nor4, gate, gate45,
(n f 5, nor 5, norb)
(n v)
ir5, gate0,
nor5, gateL-, -
/w)
(n gaite0, /p, var
arc,
(no /w, w)
( no /y( y>
ate44)
(n norB, gatel9, gate45, g
xiv
(n r , f7 ,
nor 9 , nor 10)
(no r, noi-9, gateiB, z)
(no r, gateiB, /p, va.r\^^ /al)
(no r , /a1 ,
a 1 )
( no r, nor id, gatoiB, gate45, gate44)
(nc r-
,
t B, no
rll, nor 1 )
(nc r, nor 1 1, gatei7, bl)
(yn>i> r, )
yatelV, /p, V3.rd., /cl
( nc r, /ci, cl)
i nc r, gate46, p, var 3)
(nc r , f 1 0 , nor 1 5 , nor 1 6 )
(r,c r , nor 1 Li , g at e 1 3, e 1 )
(nc r, gatelB, /p, var, /yi)
(no r, /yl, yl)
(n r, nor 16, gate44, gat el 5, g\te4&)
( no r , f1 1 ,
nor 17 ,
nor 1a)
<n r, nor 1 7, gat el 4 , g 1 )
(no r, gate 14, /p, var, /fl)
(n r, /f 1, f 1 )
< no
r, norlB, gate44, gatel4, gate4b)
(no r, /hi, hi )
(no r, nor0, gate44, gate! 3, gate4&)
xv
Example
' /b'
gate ( invert , , Cb3 ) .
' /c'
gate (invert, , Cc3 ) .
/b' '
gate, (and, gat el , C ,
/c'
3 ) .
' /a'
gate.. ( invert , , Ca3 ) .
' /b'
gate, (and, gate4, [varl, 3).
'
gate . (or, varl , Ca, /C 3 ) .
/a1
gate, (and, vat-d., C ,
b3 ) .
A*P~*fl SYA/THZSIS
a. \jflj
a.
6 Oh f/
c
c> var/
c
^
o
6T
o f*
*0* St*THf*tS
a.
c
-^c^
>4
Mc
Appfy YfcV3
a
ny^y- ti
&
>^>J s*-
b
c ;:4I>^>^V-^
b ft2
c
mi
a.
7^n
Q)
s>-*
- A/>ra
a
#Mfc6
App/J
i^>.
fiu\c
fippiy
fl
-c=>^=> s*-
DM>^>+i
bppltf (Luje 9
a.
>=> /v^/
**Y2.
Appendix C. Rule Base
A >_>_D_I>
B _^=>
Figure Cl Nor_Rule 1
B
o-o H
o-
B
A
B r>fC^E -> B o-o
c
Figure C4 Nor_Rule 4
11
-* Ot=0-h
Figure C5 Nor_Rule 5
o-* ->
B OM> E
Figure C6 Nor_Rule 6
111
A-
DnHO B > A-
>
B
A
B
o B !>?>
IV
A
L>^>^>- j^D
A
B
C
i>fCK^^ H
O
c
B
*V c
A N
%
s *
B )
A
r> c
B
CM
A
:
B
C
""
VI
A
B
.'^okiH CH=0
A
C
B -E
B
O
Nand_Rule 6
Figure C.14
Vll
B>- A- C
>
A O-r-O
B
A
& > B
vm
BIBLIOGRRPHy
11. W.W. Cohen, K.A. Bartlett, and A.J. DeGeus, Impact of Meta-
Rules in a Rule-Based Expert System for Gate Level
Optimization, Proc. Int'l IEEE Conf. on Computer Design,
Oct. 1984.
Hall, 1972.
IEEE Design
26. T. Uehara, A Knowledge-Based Logic Design System,
and Test, Oct 1985.