DESIGN OF MEALY FINITE–STATE MACHINES WITH THE TRANSFORMATION OF OBJECT CODES
A
LEXANDERA. BARKALOV
∗, A
LEXANDERA. BARKALOV, Jr.
∗∗∗
Institute of Computer Engineering and Electronics University of Zielona Góra
ul. Podgórna 50, 65–246 Zielona Góra, Poland e-mail: a.barkalov@iie.uz.zgora.pl
∗∗
Siemens-Ukraine
ul. Predslevskaja 11, 03–150 Kiev, Ukraine e-mail: alexander.barkalov@siemens.com
An optimization method of the logic circuit of a Mealy finite-state machine is proposed. It is based on the transformation of object codes. The objects of the Mealy FSM are internal states and sets of microoperations. The main idea is to express the states as some functions of sets of microoperations (internal states) and tags. The application of this method is connected with the use of a special code converter in the logic circuit of an FSM. An example of application is given. The effectiveness of the proposed method is also studied.
Keywords: finite-state machine, programmable logic device, object, design, logic circuit
1. Introduction
The control unit of any digital system can be implemented as a Mealy finite-state machine (FSM) (Baranov, 1994).
Nowadays programmable logic devices (PLDs) are widely used to implement the logic circuits of FSMs (Solovjev, 1996; 2001). This class of VLSI (PLA, PAL, CPLD, FPGA) evokes high cost that leads to high cost of FSM circuits. One of the main problems in the design of such circuits is to find a compromise between the price and the performance of a device (Barkalov, 2002). A single-level circuit of a Mealy FSM (Fig. 1) is the fastest but the most expensive solution to this problem.
3
5*
; <
Φ
7
Fig. 1. Structural diagram of a single-level circuit of a Mealy FSM.
Here the circuit P implements the systems
Y = Y (T, X) , (1)
Φ = Φ (T, X) , (2)
where Y = {y
1, . . . , y
N} is a set of microoperations, X = {x
1, . . . , x
L} is a set of logic conditions, T = {T
1, . . . , T
R} is a set of internal variables to encode the states a
m∈ A, A = {a
1, . . . , a
M} is a set of internal states, R = ]log
2M ], and Φ = {φ
1, . . . , φ
R} is a set of excitation functions. The register RG keeps the codes K (a
m) of the internal states a
m∈ A. Denote this struc- ture by P FSM.
The subcircuit P of the P FSM has a maximal possi- ble number of outputs t (P ) = N + R. To minimize the cost of the P FSM, we can use various algorithmic meth- ods (Ahmad and Dhodhi, 2000; Kania, 2003; Lahtinen et al., 2002; Singh and Nowick, 2000).
If the performance is not a critical issue, then the minimization of the cost can be achieved by increasing the number of levels in the FSM circuit (Barkalov, 2002).
One of the possible solutions is the application of either maximal encoding of microoperations sets (Barkalov and Palagin, 1997) or encoding the fields of compatible mi- crooperations (Barkalov, 2003). Both methods lead to a two-level circuit (Fig. 2) that will be denoted by PY FSM.
Here the circuit P implements the system (2) and the system
Z = Z (T, X) , (3)
where Z = {z
1, . . . , z
G} is the set of variables to encode
the sets of microoperations Y
q⊆ Y . The value of the
3
5*
; <
Φ
7
<
=
Fig. 2. Structural diagram of a two-level circuit of a Mealy FSM.
parameter G depends on the method of encoding micro- operations. The circuit Y implements a system
Y = Y (Z) . (4)
In the case of maximal encoding of microoperations, the circuit Y is implemented using PROMs and G =] log
2Q[, where Q is the amount of different sets of microop- erations in the initial flow chart (Barkalov and Palagin, 1997). In the case of encoding the fields of compati- ble microoperations, the circuit Y is a collection of I decoders DC
1, . . . , DC
I. Here I is the amount of the fields of compatible microoperations (Barkalov, 2003) and G = G
1+ G
2+ · · · + G
I, where G
iis the number of the variables to encode the microoperations forming the i-th field (i = 1, . . . , I). It is clear that the circuit P of a PY FSM has t(P Y ) = G + R < t(P ) outputs.
It was shown (Solovjev, 2001) that the price of the FSM circuit directly depends on the number of the re- quired outputs of the circuit P. The fewer outputs for a fixed number of inputs, the lower the price of the circuit.
In this paper we propose methods of minimizing the num- ber of the outputs of the circuit P based on the transfor- mation of the codes of objects. In this case the internal states of the FSM and sets of microoperations are the ob- jects to be transformed. The application of the proposed method is most effective if the circuit P is implemented using PLA, and a less notable gain can be expected in the case of FPGA and CPLD implementations.
2. Main Idea of the Method
Let a Mealy FSM be represented by a direct structural ta- ble (DST) with columns (Baranov, 1994). Here a
mis the initial state of the FSM, K(a
m) is the code of the state a
m∈ A, a
sis the state of the transition, K(a
s) is the code of the state a
s∈ A, X
hconstitutes an input signal causing the transition ha
m, a
si and it is equal to the con- junction of some variables x
e∈ X, Y
his an output sig- nal for the transition ha
m, a
si, Y
h⊆ Y , Φ
his the set of excitation functions that are equal to 1 to switch the regis- ter RG from K(a
m) to K(a
s), Φ
h⊆ Φ, h = 1, . . . , H
is the number of DST lines. Each line of the DST corre- sponds to one term F
hof the disjunction normal form of the functions (1) and (2):
F
h= A
hmX
h, h = 1, . . . , H. (5) Here A
hmis a conjunction of the internal variables T
r∈ T , corresponding to a code of the state a
m∈ A from the h-th line of the DST,
A
m= ∧
Rr=1
T
rlmr, m = 1, . . . , M , (6) where l
mr∈ {0, 1} is the value of the r-th bit of the code K(a
m), T
r0= T
r, T
r1= T
r, r = 1, . . . , R.
The functions (1) and (2) are represented as y
n=
H∨
h=1
C
nhF
h, n = 1, . . . , N , (7) ϕ
r=
H∨
h=1
C
rhF
h, n = 1, . . . , N , (8) where C
nh(C
rh) is the Boolean variable that is equal to 1 if a function y
n(ϕ
r) is written in the h-th row of the DST.
The Mealy FSM S
1(Table 1) has the following characteristics: A = {a
1, . . . , a
5}, X = {x
1, . . . , x
4}, Y = {y
1, . . . , y
7}, M = 5, R = 3, L = 4, N = 7 and H = 12.
Table 1. Direct structural table of the Mealy FSM S
1. a
mK(a
m) a
sK(a
s) X
hY
hΦ
hh
a
1000 a
2010 x
1y
1y
2D
21 a
3011 x
1y
3D
2D
32
a
2010
a
2010 x
2y
1y
2D
23 a
3011 x
2x
3y
4D
2D
34 a
4100 x
2x
3y
1y
2D
15 a
3011
a
4100 x
1y
2y
5D
16 a
5101 x
1y
6D
1D
37 a
4100 a
5101 1 y
3y
7D
1D
38
a
5101
a
2010 x
2x
3y
1y
2D
29 a
3011 x
2x
3y
3D
2D
310 a
5101 x
2x
4y
3y
7D
1D
311
a
1000 x
2x
4— — 12
The memory of the FSM S
1is implemented as a register with information inputs of the D type that cor- responds to a practical case (Solovjev, 1996). From Ta- ble 1, for example, we can form F
1= T
1T
2T
3x
1, y
7= F
8∨ F
11, D
1= F
5∨ F
6∨ F
7∨ F
8∨ F
11.
Without no loss of generality, we restrict ourselves
only to the method of maximal encoding of the sets of
microoperations. Let us encode each set Y
q⊆ Y by a binary code K(Y
q) and form a set Z = {z
1, . . . , z
G}.
In the case of the FSM S
1there are Q = 7 dif- ferent sets of microoperations in Table 1: Y
1= ∅, Y
2= {y
1, y
2}, Y
3= {y
3}, Y
4= {y
4}, Y
5= {y
2, y
5}, Y
6= {y
6}, Y
7= {y
3, y
7}. Therefore G = 3 and Z = {z
1, z
2, z
3}. Let K(Y
1) = 000, K(Y
2) = 001, . . . , K(Y
7) = 110. Form the transformed DST of the Mealy FSM S
1by replacing the column Y
hwith the column Z
hwhich contains the variables z
g∈ Z that are equal to 1 in the code K(Y
q) of the set of microop- erations Y
q⊆ Y for each line of the DST. The result- ing table (Table 2) is a base for the implementation of the PY FSM. From Table 2 we can form the system (3), e.g.
z
1= F
6∨ F
7∨ F
8∨ F
11.
Table 2. Transformed DST of the Mealy FSM S
1.
a
mK(a
m) a
sK(a
s) Z
hY
hΦ
hh a
1000
a
2010 x
1z
3D
21
a
3011 x
1z
2D
2D
32
a
2010
a
2010 x
2z
3D
23
a
3011 x
2x
3z
2z
3D
2D
34 a
4100 x
2x
3z
3D
15 a
3011
a
4100 x
1z
1D
16
a
5101 x
1z
1z
3D
1D
37 a
4100 a
5101 1 z
1z
2D
1D
38
a
5101
a
2010 x
2x
3z
3D
29 a
3011 x
2x
3z
2D
2D
310 a
5101 x
2x
4z
1z
2D
1D
311
a
1000 x
2x
4— — 12
Let us call the states of the FSM a
m∈ A (resp. the sets of microoperations Y
q⊆ Y ) the objects of the first (resp. second) kind. Let us represent the objects of one kind as functions of the objects of the other kind.
Let us represent the states of the transition as some functions of the sets of microoperations. From the analy- sis of Table 2 it is clear that there is no one-to-one corre- spondence between the states and the sets of microoper- ations. For example, the set Y
1⊆ Y corresponds to the states a
2(rows 1, 3, 9) and a
4(row 5). Therefore, we need some labels to express the states of transitions (ex- citation functions) as functions of the sets of microopera- tions. Let I = {I
1, . . . , I
K} be a set of labels (we shall discuss later how to determine the parameter K). In this case we can represent the states a
m∈ A as functions:
A = A(Z, I). (9)
If the tags I
k∈ I are encoded by the binary codes K(I
k) using the variables v
b∈ V = {v
1, . . . , v
B}, where B =
] log
2K[, then the excitation functions ϕ
r∈ Φ can be represented as
ϕ
r= ϕ
r(Z, V ), r = 1, . . . , R. (10) This leads to a Mealy FSM of the first kind or the P
YA Mealy FSM (Fig. 3). Here the circuit P forms the func-
3
5*
; <
Φ
7
<
=
&&
9
Φ
Fig. 3. Structural diagram of a P
YA Mealy FSM.
tions (3) and the system
V = V (T, X). (11)
The systems (3) and (11) depend on the terms (5). The code converter CC implements the system (10) and the circuit Y forms the functions (4).
Let us represent the sets of microoperations Y
q⊆ Y as some functions of the states a
m∈ A. Because a one-to-one correspondence between these objects usually does not exist, we need some tags I
k∈ I for a desirable representation. In this case we can represent the sets of microoperations Y
q⊆ Y as functions:
Y = Y (A, I). (12)
The system (12) can be transformed into the form y
n= y
n(T, V ), n = 1, . . . , N, (13) where the variables v
b∈ V are used to encode the tags I
k∈ I. This leads to a Mealy FSM of the second kind, or a P
AY Mealy FSM (Fig. 4).
3 5*
; Φ <
7
<
9
&& =
Fig. 4. Structural diagram of a P
AY Mealy FSM.
Here the circuit P forms the functions (2) and (11), the circuit Y forms the functions (4), and the code con- verter CC forms the functions
Z = Z(T, V ). (14)
It is clear that here the system (13) is transformed into the system
y
n= y
n(Z(T, V )), n = 1, . . . , N . (15) This means that the cycle time of the P
AY Mealy FSM is greater than that of the equivalent P
YA Mealy FSM and the difference is determined by the propagation time of the code converter CC.
Such an approach permits to reduce the number of the outputs of the circuit P to the value t(P
YA) = G + B in the case of a P
YA FSM, or to the value t(P
AY) = R + B in the case of a P
AY FSM. This permits to decrease the cost of the circuit P in comparison with the equivalent PY FSM. Of course, such an approach makes sense if the total cost of the circuits P and CC is lower then the cost of the circuit P of the PY Mealy FSM.
3. Design of Mealy FSMs of the First and Second Kinds
Let a Mealy FSM be represented by a transformed DST of a PY Mealy FSM. The proposed method of P
YA Mealy FSM design includes the following steps:
1. Identification of states. Let A(Y
q) be a set of states such as the set Y
q⊆ Y is formed under the transition in the state a
m∈ A(Y
q). It is sufficient to employ m
q= |A(Y
q)| tags for the states a
m∈ A(Y
q). It also suffices to use K = max(m
1, . . . , m
Q) tags for the determination of any state a
m∈ A , and they form a set I. Let us encode each tag I
k∈ I by a binary code K(I
k) with B =] log
2K[ bits and let us form the set V = {v
1, . . . , v
B}. Let the pair α
qs= hI
k, Y
qi cor- respond to the state a
s∈ A(Y
q). In this case the code C(a
s)
qcorresponds in a one-to-one manner to the con- catenation
C(a
s)
q= K(Y
q) ∗ K(I
k), (16) where ‘*’ denotes the concatenation operator.
2. Formation of the table for the P
YA FSM. This table is a base to form the systems (3) and (11). It is constructed by the replacement of the columns a
s, K(a
s), Φ
hof the transformed DST with the column V
h. The column V
hcontains the variables v
r∈ V that are equal to 1 in the code of the label for the state a
s∈ A from the h-th line of the DST.
3. Formation of the table for the code converter. This table is a base for the formation of the system (10).
It contains the columns Y
q, K(Y
q), I
k, K(I
k), a
s, K(a
s), Φ
hand h. This table contains H
0= m
1+
· · · + m
Qrows and each row corresponds to one pair
α
qs, q = 1, . . . , Q and s = 1, . . . , M . The sys- tem (10) is represented as
ϕ
r=
H∨
0h=1
C
rhV
hZ
h, r = 1, . . . , R, (17) where C
rhis the Boolean variable that is equal to 1 if the function ϕ
r∈ Φ is written in the h-th row of the table of the CC, V
his a conjunction of the variables v
b∈ V corresponding to the code K(I
k) from the h-th line of this table, Z
his a conjunction of the vari- ables z
r∈ Z corresponding to the code K(Y
q) from the h-th row of the table of the CC, h = 1, . . . , H
0. 4. Formation of the table of microoperations. This table is
a base to form the system (4). It contains the columns Y
q, K(Y
q), y
1, . . . , y
Nand q. Each line of this table corresponds to one set of microoperations Y
q⊆ Y . 5. Design of the logic circuit of the FSM. The circuit of the
P
YA FSM is designed using the system (3) and (11) for the circuit P, the system (17) for the code converter CC and the system (4) for the circuit Y. Here the circuit P and the CC are implemented using PLD, the circuit Y is implemented using PROM because the system (15) includes more than 50% of possible terms (Barkalov, 2002).
The proposed method of the P
AY Mealy FSM de- sign is very similar to the previous one and includes the following steps:
1. Identification of the sets of microoperations. Let Y (a
s) be a collection of the sets of microopera- tions such as Y
q∈ Y (a
s) if the set Y
q⊆ Y is formed under the transition in the state a
s∈ A. It is sufficient to employ n
s= |Y (a
s)| tags for the sets Y
q∈ Y (a
s). To identify any set Y
q⊆ Y it is enough to use K = max(n
1, . . . , n
M) labels I
k∈ I. Let us encode each tag I
k∈ I by a bi- nary code K(I
k) with B =] log
2K[ and form a set V = {v
1, . . . , v
B} to encode the tags. Let the pair β
sq= hI
k, a
si with a unique tag I
k∈ I cor- respond to a set Y
q⊆ Y . Now a code C(Y
q) of the set Y
q⊆ Y can be expressed as
C(Y
q) = K(I
k) ∗ K(a
s). (18) 2. Formation of the table for the P
AY FSM. This table constitutes a base to form the functions (2) and (11).
It is constructed by the replacement of the column Z
hof the transformed DST with the column V
h. This column contains the variables v
b∈ V that are equal to 1 in the code K(I
k) corresponding to the expression (18) for the set Y
q⊆ Y from the h-th row of the transformed DST, h = 1, . . . , H.
3. Formation of the table for the code converter. This
table constitutes a base for the formation of the sys-
tem (14). It contains the columns a
s, K(a
s), I
k,
K(I
k), Y
q, Z
qand q. All pairs β
sqare written in this table for the sets Y
q⊆ Y . The table of the code converter has Q
0= n
1+ · · · + n
Mrows and the system (14) is represented as
z
g=
Q∨
0q=1
C
gqV
qA
q, g = 1, . . . , G. (19) Here C
gqis the Boolean variable that is equal to 1 if the variable z
g∈ Z is written in the q-th line of the table of the CC, q = 1, . . . , Q
0, V
qis a con- junction of the variables v
b∈ V corresponding to the code K(I
k) from the q-th row of the table, A
qis a conjunction of the internal variables T
r∈ T corresponding to the state a
s∈ A from the q-th line of the table, q = 1, . . . , Q
0.
4. Formation of the table of microoperations. This step is executed in the same manner as for the P
YA Mealy FSM.
5. Design of the logic circuit for the FSM. The cir- cuit P is implemented on PLD using the systems (2) and (12). The circuit Y is implemented on PROM using the system (4). The circuit CC is imple- mented on PLD using the system (19). The prob- lems connected with the design of similar circuits are well known and can be found in (Solovjev, 1996;
2001). These problems are beyond the scope of our paper.
4. Example of the Application of the Proposed Method
The design methods of P
YA and P
AY FSMs are very sim- ilar. Taking this into account, we shall discuss only an example regarding the design of a P
YA Mealy FSM S
1and we shall start from the transformed table (Table 2).
Let us form the sets A(Y
q): A(Y
1) = {a
1}, A(Y
2) = {a
2, a
4}, A(Y
3) = {a
3}, A(Y
4) = {a
3}, A(Y
5) = {a
4}, A(Y
6) = {a
5}, A(Y
7) = {a
5}. There- fore m
1= m
3= · · · = m
7= 1, m
2= 2, K = 2, I = {I
1, I
2}, B = 1, V = {v
1}. Let K(I
1) = 0, K(I
2) = 1. Let us form the pairs α
qsfor all elements of the sets A(Y
q) ⊆ A. If m
q= 1, then the first component of the corresponding pair α
qsis written as ∅. This implies the code K(I
k) = ∗ for such a pair. In our case there are the following pairs: α
11= h∅, Y
1i, α
22= hI
1, Y
2i, α
24= hI
2, Y
2i, α
33= h∅, Y
3i, α
43= h∅, Y
4i, α
54= h∅, Y
5i, α
65= h∅, Y
6i and α
75= h∅, Y
7i. The codes C(a
s)
qcorresponding to (16) are shown in Table 3.
Table 3 has H
0= 8 rows. The first three positions of the column C (a
s)
qcontain the code K (Y
q), while the last position corresponds to the code K (I
k).
Table 4 represents the table of the P
YA FSM S
1that is constructed from the transformed table of the FSM S
1Table 3. Encoding the state of the P
YA FSM S
1.
a
sC(a
s)
qα
qsh a
1000* α
111 a
20010 α
222 a
3010* α
333 a
3011* α
434 a
4100* α
545 a
40011 α
246 a
5101* α
657 a
5110* α
758
Table 4. Settings for the P
YA Mealy FSM S
1.
a
mK(a
m) X
hZ
hV
hh a
1000
x
1z
3- 1
x
1z
2* 2
a
2010
x
2z
3* 3
x
2x
3z
2z
3* 4 x
2x
3z
3v
15
a
3011 x
1z
1* 6
x
1z
1z
3* 7
a
4100 1 z
1z
2* 8
a
5101
x
2x
3z
3- 9 x
2x
3z
2* 10 x
2x
4z
1z
2* 11
x
2x
4- * 12
Table 5. Settings for the code converter of the P
YA FSM S
1.
Y
qK (Y
q) I
kK (I
k) a
sK(a
s) Φ
hh
Y
1000 - * a
1000 - 1
Y
2001 I
10 a
2010 D
22
I
21 a
4100 D
13
Y
3010 - * a
3011 D
2D
34
Y
4010 - * a
3011 D
2D
35
Y
5011 - * a
4100 D
16
Y
6100 - * a
5101 D
1D
37
Y
7101 - * a
5101 D
1D
38
(Table 2). The symbol ‘-’ in the column V
hmeans that v
1= 0, while the symbol ‘*’ means that v
1can have any value (the ‘don’t care’ situation). This table is used to form the system (3) and (11), for example, v
1= F
5.
Table 5 corresponds to the code converter that is con-
structed using the encoding table for the states (Table 3)
and the transformed table of the FSM S
1(Table 2). This table is used to form the system (17), where the conjunc- tion V
his determined as
V
h= v
1lh1. . . v
BlhB, h = 1, . . . , H
0.
Here l
hb∈ {0, 1, ∗} is the value of the b-th bit of the code K (I
k) from the h-th row of the table of the CC, v
0b= v
b, v
b1= v
b, v
∗b= 1, b = 1, . . . , B.
From this table we can form, for example, the func- tion
D
2= z
1z
2z
3v
1∨ z
1z
2z
3∨ z
1z
2z
3.
The table of microoperations describes the PROM with the inputs Z and the outputs Y (Table 6).
The circuit of the P
YA Mealy FSM S
1includes
• the circuit P with S = L + R = 7 inputs, t = G + B = 4 outputs and H = 12 terms;
• the circuit CC with S = G + B = 4 inputs, t = R = 3 outputs and H
0= 8 terms;
• the circuit Y with S = G = 3 inputs, t = N = 7 outputs and Q = 7 terms.
Table 6. Microoperations of the P
YA FSM S
1.
Y
qK (Y
q) y
1y
2y
3y
4y
5y
6y
7q
Y
1000 0 0 0 0 0 0 0 1
Y
2001 1 1 0 0 0 0 0 2
Y
3010 0 0 1 0 0 0 0 3
Y
4010 0 0 0 1 0 0 0 4
Y
5011 0 1 0 0 1 0 0 5
Y
6100 0 0 0 0 0 1 0 6
Y
7101 0 0 1 0 0 0 1 7
5. Analysis of the Proposed Method
Let us find an area where P
YA Mealy FSMs have lower cost than the equivalent PY Mealy FSMs. Let us use the probabilistic approach suggested by Novikov (1974) and developed in (Barkalov, 2002). There are three key points in such an approach:
1. The use of a class of flow charts instead of a par- ticular flow chart. This class is characterized by the pa- rameters
p
1= O (Γ) O (Γ) + C (Γ) + 2 , p
2= C (Γ)
O (Γ) + C (Γ) + 2 ,
(20)
where O (Γ) is the number of the operational nodes in the flow chart Γ, C (Γ) is the number of the conditional nodes in the flow chart Γ, number 2 being added to take account of the existence of the start and end nodes in the flow chart. It is clear that
lim
K(Γ)→∞
(p
1+ p
2) = 1, (21) where K (Γ) = O (Γ) + C (Γ). Therefore p
1(resp. p
2) can be treated as the probability of the event that a par- ticular node of the flow chart Γ is an operational (resp.
conditional) one.
2. The use of matrix realization for the circuit of the control unit (Baranov, 1994) instead of the standard VLSI.
In this case we can determine a hardware amount as the volume of matrices for a given circuit of the control unit.
3. The study of the relation S (U
1)/S (U
2), where S (U
i) is the volume of matrices for the implementation of the circuit of the control unit U
i, i = 1, 2. In (Barkalov, 2002) it was proved that such relations for the cases of matrix realization and implementation of the circuit of the FSM using the standard PLD have the same values.
A matrix realization of a PY Mealy FSM is shown in Fig. 5.
M
1X
T
&
M
2F Z
Φ
1 & M
3M
4Z
11
RG
Y
Fig. 5. Matrix realization of a PY Mealy FSM.
Here M
1is a conjunctional matrix that implements the system F of the terms (5). M
2is a disjunctional matrix that implements the systems (3) and (8). M
3is a conjunc- tional matrix that implements the terms Z
1of the sys- tem (4). M
4is a disjunctional matrix that implements the system (4). Therefore the matrices M
1and M
2represent the circuit P and the matrices M
3and M
4represent the cir- cuit Y. The complexity of these circuits can be expressed as
S (P ) = 2 (L + R) H + H (G + R) , (22)
S (Y ) = 2GQ + QN. (23)
A matrix realization of this P
YA Mealy FSM is shown in Fig. 6.
Here the circuit P is realized by the matrices M
1and M
2, the circuit Y is realized by the matrices M
3and M
4, the circuit CC is realized by the matrices M
5and M
6, where F
1is a set of the terms of functions (10). The complexity of the circuits P and CC can be expressed as
S (P )
1= 2 (L + R) H + H (G + B) , (24)
S (CC)
1= 2 (G + B) H
0+ H
0R. (25)
M1
X
T
&
M2
F Z
Φ
1 & M3
M4
Z1 1
RG Y
M5
&
M6
F1 1 V
Fig. 6. Matrix realization of a P
YA Mealy FSM.
Here index 1 means that the circuits P and CC are parts of the P
YA Mealy FSM. It is clear that S (Y )
1= S (Y ).
To find the area of an effective application of P
YA Mealy FSMs, we should examine the function
f = S (P )
1+ S (CC)
1+ S (Y )
1S (P ) + S (Y ) . (26) If f < 1 , then the cost of the logic circuit of the P
YA FSM is lower than that of the equivalent PY FSM.
To reduce the number of variables in (22)–(26), we can use the results of (Barkalov, 2002), where the parame- ters L, R, H and Q are expressed as functions of K (Γ) and some coefficients:
H = 4.44 + 1.44p
1K (Γ)
p
3, (27)
M = 3.55 + 0.44p
1K (Γ) p
3, (28)
L = (1 − p
1) K (Γ) p
4, (29)
Q = p
1K (Γ) p
3. (30)
Here p
3= O (Γ)/Q, p
4= C (Γ)/L, 1 ≤ p
3, p
4≤ 1.3 (Barkalov, 2002).
Let us use the coefficients p
5= H/H
0, p
6= B/R, p
7= C
R/C
P, where C
Ris the cost of PROM, C
Pis the cost of PLD with the same number of inputs and outputs.
Now the function (26) can be expressed as the function f = f (K (Γ) , N, p
1, p
3, . . . , p
7) . (31) Some results of investigation are shown in Figs. 7 and 8.
From the analysis of these figures it is clear that the P
YA Mealy FSMs always offers gains in the cost com- pared with PY FSMs. This gain is increased with reducing the number of the nodes of the initial flow chart (resp. de- creasing the parameter K(Γ)) and decreasing the length of the codes of the sets of microoperations in the initial flow chart (resp. increasing the parameter p
3). The maxi- mal gain from 9% to 13% is achieved for flow charts with the number of nodes 100 ≤ K(Γ) ≤ 200.
The same results were obtained for a comparison of P
YA and PY Mealy FSMs. But here the gain was up to
K(ΓΓ)
Fig. 7. Function f for p
1= 0.1 and p
3= 1.
K(ΓΓ)