You are currently viewing a new version of our website. To view the old version click .
Applied Sciences
  • Article
  • Open Access

18 December 2024

Area and Performance Estimates of Finite State Machines in Reconfigurable Systems

Faculty of Computer Science, Bialystok University of Technology, Wiejska 45A, 15-351 Bialystok, Poland
This article belongs to the Special Issue Advances in Field-Programmable Gate Array (FPGA)-Based Reconfigurable Systems

Abstract

Modern reconfigurable systems are typically implemented in field-programmable gate arrays (FPGAs) based on look-up tables (LUTs). Finite state machines (FSMs) perform the functions of control devices and are integral to reconfigurable systems. When designing reconfigurable systems, the problem of optimizing the area and performance of FSMs often arises. The FSM synthesis and state encoding methods generally use only one estimate of the FSM area or performance. However, regardless of the computational complexity of the FSM synthesis or state encoding method, if the estimate incorrectly reflects the optimization aim, the result is far from the optimal solution. This paper proposes several estimates of the area and performance of FSMs implemented in LUT-based FPGAs. The effectiveness of the proposed estimates was investigated using the sequential method for FSM state encoding. Experimental studies on benchmarks showed that the FSM area decreases on average from 3.8% to 6.5%, compared to known approaches (for some cases by 33.3%), while the performance increases on average from 3.5% to 7.3% (for some cases by 27.6%). Recommendations for the practical use of the proposed estimates are also provided. The Conclusions section highlights promising directions for future research.

1. Introduction

Currently, various reconfigurable systems are widely used in all spheres of human activity [1]. A distinctive feature of modern reconfigurable systems is the intensive use of field-programmable gate array (FPGA) based on a look-up table (LUT) [2]. When developing reconfigurable systems, there is often a need to improve the design parameters, such as the area (implementation cost), performance (speed), and power consumption. Because finite state machines (FSMs) are an integral part of most reconfigurable systems (FSMs act as controllers of digital devices and systems), it is important to reduce the number of LUTs [3], increase the performance [4], and reduce the power consumption [5] of FSMs.
To solve these problems, it is vital to estimate the area, performance, and power consumption of FSMs with the highest accuracy. The power consumption estimates of the FSMs implemented in FPGAs are given in [6,7]. However, it is much more difficult to estimate the area and performance of FSMs implemented in reconfigurable systems. The methods of minimization and decomposition of Boolean functions used by design tools are usually unknown to developers. In addition, design tools typically use various logical and physical synthesis techniques, for example, to satisfy timing constraints. Therefore, even exact estimates of the expected area and performance usually differ from the area and performance of the implemented FSM circuit.
When implementing FSMs in an LUT-based FPGA, an area is measured by the number of LUTs in the FSM circuit. Performance is determined by the delay of signals in the critical (longest) signal path from input to output of the circuit, which is measured by the number of levels (depth) of LUTs in the FSM circuit. Both of these parameters (area and depth) are usually minimized in FSM synthesis methods for reconfigurable systems.
This paper considers several estimates of the area and performance of FSMs, as well as other estimates that are not directly related to the computation of the area or performance of an FSM. The proposed estimates were investigated using the sequential method for FSM state encoding [8].
Note that the results of FSM synthesis or state encoding depend significantly on the estimates used (area, speed, or power consumption). Because (regardless of the computational complexity of the method) if the estimate does not correctly reflect the optimization aim, the synthesis results will not be optimal. Therefore, it is very important in FSM synthesis methods to use efficient estimates that contribute optimization and more exactly reflect the synthesis results.
The main goal of this paper is to reduce the area and increase the performance of FSMs for reconfigurable systems by using the most efficient or exact estimates in synthesis methods or state encoding of FSMs.
The main contribution of this paper is a new approach to synthesizing and state encoding FSMs for reconfigurable systems, when several different estimates, rather than one, are applied in determining the area and performance of the FSM. To this end:
  • Several area and performance estimates of FSMs, as well as estimates that are not directly related to the computation of the area or performance estimates of FSMs, are presented;
  • For each estimate, and the expressions and algorithm for its computation are given;
  • The efficiency of the estimates is verified on benchmarks of FSMs using the estimates in the sequential method of FSM state encoding [8];
  • A comparison of different estimates was performed to determine their efficiency for optimizing the area and performance of FSMs;
  • It has been shown that the use of the considered estimates in the method [8] allows to obtain solutions on average better in comparison with known methods;
  • Recommendations on the practical use of the proposed estimates are given.
The rest of the paper is organized as follows. Section 2 includes a short analysis of related works. Section 3 discusses essential information about the FSM representations and presented FSM estimations. Section 4 includes the experimental results and their analysis. Section 5 shows a short summary.

3. Materials and Methods

This section discusses the representation of FSMs in the form of a transition list, which is widely used in practice and will be used to compute FSM estimates. The estimates are described for the area and performance of FSMs, as well as other estimates. For each estimate, expressions and an algorithm for its computation are given.

3.1. Representation of FSMs

The main parameters of an FSM are as follows: L is the number of inputs (input variables); N is the number of outputs (output variables); M is the number of states; and T is the number of transitions between states. Let X = {x0,…,xL−1} be the set of FSM input variables; Y = {y0,…,yN−1} be the set of FSM output variables; S = {s0,…,sM−1} be the set of FSM states, where s0 is the initial state; D = {d0,…,dR−1} be the set of FSM transition functions; and E = {e0,…,eR−1} is the set of FSM feedback variables, where R = ⌈log2M⌉ is the number of code bits (code length) in case of encoding the FSM states by a binary code. The structural model of the FSM with the above notations is shown in Figure 1, where Φ is the combinational circuit realizing the FSM transition functions of the set D; Ψ is the combinational circuit realizing the FSM output functions of the set Y; and RG is the register (memory of the FSM), at the outputs of which the values of feedback variables of the set E are formed.
Figure 1. Generalized structural model of an FSM.
In practice, during synthesis, the FSM is often represented in the form of a transition list (Table 1), which is sometimes called a transition table.
Table 1. Transition list of the FSM.
One line of the transition list corresponds to one transition between the FSM states, where Xt is the input vector; Yt is the output vector; pst is the initial state of the transition (present state); and nst is the final state of the transition (next state).
The input vector Xt is L bits long and corresponds to a conjunction of input variables, the value 1 of which initiates the transition t, t = 0 , T 1 ¯ . Each j-th bit of the vector Xt takes the value “1” when the conjunction contains the literal xj, the value “0” when the conjunction contains the literal x j ¯ , and the value “-” when the variable xj does not affect the transition t, t = 0 , T 1 ¯ .

3.2. Estimates of FSMs

Because the FSM state encoding affects the area and delay of only the transition functions of the set D, all the estimates considered in this paper concern only the transition functions. If necessary, the proposed estimates can also be applied to the output functions of the set Y.

3.2.1. Area Estimates

When FSMs are implemented in FPGAs, the area is usually measured by the number of LUTs used in the FSM circuit. Let n be the number of LUT inputs; X(dr) be the set of input variables that are arguments of function dr, drD; X(t,j) be the j-th bit of the input vector Xt; K(si) be the code of the state si; K(si,r) be the r-th bit of the code of the state si; and X(pt) be the set of input variables affecting the t-th transition.
The e_FPGA estimate. The e_FPGA estimate is often used when FSMs are implemented in FPGAs. For this estimate, the area of each transition function dr is calculated using expression (13):
a r e a d r = 1 ,                                                                 r a n k d r n ; r a n k d r n n 1 + 1 ,         r a n k ( d r ) > n ;
where rank(dr) denotes the rank of the transition function dr, drD. The rank rank(dr) is determined by the number of arguments of function dr as follows:
r a n k d r = X ( d r ) + R ,
where |A| denotes the cardinality of set A.
The e_FPGA estimate according to (13) and (14) is calculated using Algorithm 1.
Algorithm 1. Calculation of e_FPGA estimate.
INPUT: transition list.
OUTPUT: area.
area = 0;
for all r = 0 to R − 1 do     // loop by transition functions of set D
   X(dr) = Ø;         // define the set X(dr), Ø is an empty set
   for all t = 0 to T − 1 do     // loop by FSM transitions
      if K(nst,r) = 1 then    // code K(nst,r) has one in bit r
         for all j = 0 to L − 1 do   // loop by input variables
            if X(t,j) = 1 or X(t,j) = 0 then   // xj affects the transition t
              X(dr) = X(dr) U {xj};    // include xj in the set X(dr)
            end if
         end for
      end if
   end for
   rank(dr) = |X(dr)| + R;    // determine the rank of the function dr
   if (rank(dr) <= n) then    // calculate the area of the function dr
      area(dr) = 1;
   else
         a r e a ( d r ) = ( r a n g d r n ) / ( n 1 ) ;
   end if
   area = area + area(dr);    // increasing the total area
end for
Return area.
The disadvantage of the e_FPGA estimate is that it only considers the number of arguments of each transition function dr, and it does not consider the number of FSM transitions. Therefore, the e_FPGA estimate can be considered a lower bound on the number of LUTs in the realization of FSM transition functions.
The e_CPLD estimate. For this estimate, the area of each transition function dr is defined as the number of cubes (minterms) in the SOP of the function dr, drD:
d r = m 0   r + + m Q 1 r ;
where m q r is the q-th minterm of function dr; and Q is the number of minterms in the SOP of the function dr, drD. In this case, the area of function dr is defined as follows:
area(dr) = Q.
The computation of the e_CPLD estimate, according to (15) and (16), is described by Algorithm 2.
Algorithm 2. Calculation of the e_CPLD estimate.
INPUT: transition list.
OUTPUT: area.
area = 0;
for all r = 0 to R − 1 do               // loop by transition functions of the set D
    area(dr) = 0;                 // determine the area of the function dr
   for all t = 0 to T − 1 do          // loop by FSM transitions
      if K(nst,r) = 1 then         // nst state code contains 1
         area(dr) = area(dr) + 1;    // increase the area of the function dr
      end if
   end for
   area = area + area(dr);          // increasing the total area
end for
Return (area).
The e_CPLD estimate has the following disadvantages: the number of arguments of function dr is not considered; the complexity of each minterm is not considered; and the LUT parameters are not considered. However, despite these disadvantages, the e_CPLD estimate has shown high efficiency in the implementation of FSMs in CPLDs [19], so it is called e_CPLD.
The classic estimate. Most of the e_CPLD estimate disadvantages were absent in the classic estimate. The classic estimate corresponds to the number of gate inputs when function f is realized on elements of small and medium degrees of integration.
The SOP of each transition function dr, drD, can be represented as follows:
d r = t = 0 T 1 X t · E t · f l a g ( r , t ) ,
where Xt is the conjunction of input variables initiating the t-th transition; Et is the conjunction of feedback variables defining the state code pst; and flag(r, t) = 1 if the minterm X t · E t is included in the SOP of the function dr, otherwise flag(r, t) = 0. It follows from (17) that the number of literals in each minterm is equal to
X t + R .
The computation of the classic estimate, based on (17) and (18), is described by Algorithm 3.
Algorithm 3. Calculation of the classic estimate.
INPUT: transition list.
OUTPUT: area.
area = 0;
for all r = 0 to R − 1 do        // loop on transition functions of the set D
    area(dr) = 0;          // determine the estimate of the function dr
    for all t = 0 to T−1 do    // loop by transitions of a finite automaton
       if K(nst,r) = 1 then      // state code nst contains 1
           area(dr) = area(dr) + 1;     // count the number of minterms
           X(pt) = Ø;          // define the set X(pt)
           for all j = 0 to L − 1 do
               if X(t,j) = 1 or X(t,j) = 0 then    // xj affects the transition t
                   X(pt) = X(pt) U {xj};       // xj is included in X(pt)
               end if
           end for
          area(dr) = area(dr) + | X(pt) | + R;      // increase area(dr)
       end if
     area = area + area(dr);     // increase the total area
end for
Return area.
Note that the classic estimate does not consider the LUT parameters.
The terms estimate. The terms estimate assumes that each minterm of transition functions is implemented in the FPGA as a separate Boolean function. The terms estimate assumes, in advance, the use of a redundant number of LUTs, but it takes into account more properties of the transition functions. In the terms estimate, the area is computed as the sum of the areas of all the minterms of each transition function dr, drD:
a r e a d r = q = 0 Q 1 a r e a ( m q r ) ,
where a r e a ( m q r ) is the area of the minterm m q r of the function dr, drD.
The value of area a r e a ( m q r ) of minterm m q r is determined by expression (13), only instead of the rank r a n k d r of function dr the rank r a n k m q r of minterm m q r is used, which is calculated by expression (20):
r a n k m q r = X ( m q r ) + R ,
where X ( m q r ) is the set of input variables that are arguments of the minterm m q r .
The computation of the terms estimate, according to (13), (19), and (20), is described by Algorithm 4.
Algorithm 4. Calculation of the terms estimate.
INPUT: transition list.
OUTPUT: area.
area = 0;
for all r = 0 to R − 1 do      // loop on transition functions of the set D
    area(dr) = 0;      // determine the estimate of the function dr
    for all t = 0 to T − 1 do      // loop by transitions of the FSM
      if K(nst,r) = 1   then           / /   state   code   ns t   contains   1  
         X ( m t r ) = Ø ;           / /   define   the   set   X ( m t r ) ,   Ø   is   an   empty   set  
         for   all   j = 0   to   L 1   do           / /   loop   by   bits   of   input   vector   X t  
            if   X ( t , j ) = 1   or   X ( t , j ) = 0   then  
              X ( m t r ) = X ( m t r )   U   { x j } ;         / /   include   x j   in   X ( m t r )  
            end if
         end for
         r a n k ( m t r ) = |   X ( m t r )   | + R ;           / /   determine   the   rank   of   minterm   m t r
           if   ( rank ( m t r )   < = n )   then  
             a r e a ( m t r ) = 1 ;    
         else
           a r e a ( m t r ) = ( r a n k m t r n ) / ( n 1 ) ;
         end if
         a r e a ( d r ) = a r e a ( d r ) + a r e a ( m t r );      // increase area(dr)
       end if
       area = area + area(dr);           // increase the total area
    end for
end for
Return area.
A special feature of the terms estimate is that it considers the area of each minterm of each transition function. Despite the redundancy of the terms estimate, in an FSM encoding and synthesis methods, this redundancy is an advantage over other estimates because it takes into account more properties of the transition functions.

3.2.2. Performance Estimates

The performance of an FSM is determined by the maximum operation frequency of the FSM circuit. At the logic synthesis level, performance is often associated with the critical path length (cpl). When FSMs are implemented in LUT-based FPGAs, the path length is determined by the number of LUTs through which signals pass from the input to the output of the circuit.
There are two main ways of decomposing complex Boolean functions: sequential (Figure 2a) and parallel (Figure 2b).
Figure 2. Generalized decomposition structures: (a) sequential; (b) parallel.
The number pls of LUT levels in the case of the sequential decomposition of the Boolean function f is determined by expression (21):
p l s ( f ) = 1 ,                                                           r a n k f n ; r a n k f n n 1 + 1 ,         r a n k f > n ; ,
where rank(f) is the number of arguments of function f.
The number plp of LUT levels in the case of parallel decomposition of the Boolean function f is determined by expression (22):
p l p ( f ) = log n ( r a n k ( f ) ) = log e r a n k ( f ) log e n .
The seq_dec estimate. The seq_dec estimate determines the critical path length of FSM transition functions for the case of the sequential decomposition of Boolean functions when the signal path length is computed using expression (21). Let pls(dr) be the signal path length of a transition function dr, drD. The computation of the critical path length cpl of the seq_dec estimate is described by Algorithm 5.
Algorithm 5. Calculation of the seq_dec estimate.
INPUT: transition list.
OUTPUT: cpl.
cpl = 0;
for all r = 0 to R 1   do         / /   loop   by   function   d r ;
   Determine the set X(dr) as in Algorithm 1;
   rank(dr) = |X(dr)| + R;     // determine the rank of the function dr
   if rank(dr) <= n then     // calculate the path length pls(dr) of the function dr
     pls(dr) = 1;
   else
     pls(dr) = ⌈(rang(dr) − n)/(n − 1)⌉;
   end if
   if pls(dr) > cpl then      // determine the length of the critical path
     cpl = pls(dr);
   end if
end for
Return cpl.
The par_dec estimate. The par_dec estimate determines the critical path length of the FSM functions for the case of parallel decomposition of Boolean functions when the signal path length is computed using expression (22). Let plp(dr) be the signal path length of a transition function dr. The computation of the critical path length cpl of the par_dec estimate is described by Algorithm 6.
Algorithm 6. Calculation of the par_dec estimate.
INPUT: transition list.
OUTPUT: cpl.
cpl = 0;
for all r = 0 to R 1   do         / /   loop   by   function   d r
    Determine the set X(dr) as in Algorithm 1;
    rank(dr) = |X(dr)| + R;         // determine the rank of the function dr
    plp(dr) = ⌈log⁡(rang(dr))/log⁡n⌉;    // calculate the path length plp(dr) for dr
    if (plp(dr) > cpl) then         // determine the length of the critical path
       cpl = plp(dr);
    end if
end for
Return cpl.
The disadvantage of the seq_dec and par_dec estimates is that they do not take into account the number of transitions T and the number of states M of the FSMs.
The avg_dec estimate. The avg_dec estimate is calculated as the arithmetic mean of the seq_dec and par_dec estimations according to Equation (23):
a v g _ d e c = ( s e q _ d e c + p a r _ d e c ) / 2 .

3.2.3. Other Estimates for FSMs

In addition to estimates directly aimed at determining the area or performance of the FSM being designed, other estimates can be proposed that are not directly aimed at computing the area or performance of the FSM.
The diff_w estimate. The diff_w estimate is based on the following assumption: if all transition functions dr, drD, have approximately the same complexity, which is determined by the weight w(dr), then the depth and possibly the area of the FSM will be minimized.
Let the weight of function dr, drD, be defined as the number of cubes [9] in the SOP of the function dr, i.e., using expression (24):
w d r = i = 0 M 1 C s i · K s i , r ,
where C(si) is the number of transitions ending in state si, siS.
The value of the diff_w estimate is determined by expression (25):
diff_w = max d r D w d r min d r D ( w ( d r ) ) .
The computation of the diff_w estimate, according to (24) and (25), is described by Algorithm 7.
Algorithm 7. Calculation of the diff_w estimate.
INPUT: transition list.
OUTPUT: max(w(dr)) − min(w(dr)).
for all i = 0 to M − 1 do       // determine the set of values C(si)
    C(si) = 0;       // determine the number of transitions to the state si
    for all t = 0 to T − 1 do
      if nst = si then
         C(si) = C(si) + 1;
      end if
    end for
end for
for all r = 0 to R − 1 do       // determine weights of functions dr
    w(dr) = 0;
    for all i = 0 to M − 1 do       // loop on the FSM states
      if K(si,r) = 1 then       // state code si has 1 in bit r
         w(dr) = w(dr) + C(si);
      end if
    end for
end for
max_w = −1; min_w = 10,000;       // find the maximum and minimum values of weight
for all r = 0 to R−1 do          // loop by weights of functions dr
    if w(dr) > max_w then max_w = w(dr) end if
    if w(dr) < min_w then min_w = w(dr) end if
end for
Return (max_w − min_w);
The max_w estimate. The max_w estimate is based on the assumption that in order to increase the speed of FSMs, it is reasonable to minimize the length of the critical path, which is defined by the weight w(dr), drD.
In the max_w estimate, the result is the maximum weight value of all transition functions dr, drD. Therefore, the value of max_w estimate is determined by expression (26):
max_w = max d r D ( w ( d r ) ) .
The computation of the max_w estimate, according to (24) and (26), is described by Algorithm 8.
Algorithm 8. Calculation of the max_w estimate.
INPUT: transition list.
OUTPUT: max(w(dr)).
Determine the set of values C(si), siS, as in Algorithm 7;
Determine the weights w(dr) of functions dr, drD, as in Algorithm 7;
max_w = −1;            // find the maximum value of weight
for all r = 0 to R − 1 do       // loop by weights of functions dr
    if w(dr) > max_w then
      max_w = w(dr);
    end if
end for
Return max_w.
In the diff_w and max_w estimates, the weight w(dr) of the transition function dr, drD, can be computed in different ways, not necessarily using expression (24). By defining other weights of the function dr, other estimates can be defined to increase the performance or reduce the area of the FSMs. Depending on the selected weight of the function dr, the optimization criteria can be changed. For example, to minimize the area, one can choose e_FPGA, e_CPLD, classic, or terms estimate as the weight w(dr), and to increase performance, one can choose seq_dec, par_dec, or avg_dec estimate as the weight w(dr).
In this way new estimates of the area and performance of FSMs can be created based on the diff_w and max_w estimates. In Algorithms 7 and 8, the number of cubes [9] in the SOP of function dr is used as the weight w(dr), which corresponds to the e_CPLD estimate.
Table 2 presents the parameters of FSMs that are considered (directly or indirectly) in the above estimates, where “+”—the parameter is taken into account; “-”—the parameter is not taken into account.
Table 2. The parameters of FSMs that are taken into account in the presented estimates.
Table 2 shows that all estimates consider the number of code bits R. Most estimates consider the number of FSM inputs L and the number of LUT inputs n. The estimates e_CPLD, classic, and terms consider the number of transitions T. The estimates diff_w and max_w consider both the number of transitions T and the number of states M.
The e_FPGA, e_CPLD, classic, diff_w, and max_w estimates were used in [8] to determine the implementation cost of the FSM; the seq_dec and par_dec estimates were used in [4] to determine the performance of the FSM; and the terms and avg_dec estimates are new.

3.3. Example of Calculating FSM Evaluations

For example, consider the FSM whose transition list is presented in Table 1. Our FSM has 6 states s0,…,s5. Let the FSM states be encoded by a sequential binary code: s0—000, s1—001, s2—010, s3—011, s4—100, and s5—101. For convenience in demonstrating the computation of the considered estimates, the columns K(pst) and K(nst) with the codes of the initial and final states of the transitions have been added in Table 1. Moreover, the row with the variables of sets E, X, D, and Y has been added to the header of Table 1. The modified transitions list of the FSM (also called the structural transition table) is presented in Table 3.
Table 3. Transitions list of the FSM with the state codes.
Based on the structural transition table, the following logical equations in SOP forms can be written for the FSM transition functions:
d 0 = e 2 ¯ · e 1 ¯ · e 0 ¯ + x 1 ¯ · x 0 · e 2 ¯ · e 1 ¯ · e 0 + x 2 · x 1 · x 0 · e 2 ¯ · e 1 ¯ · e 0 + x 2 · e 2 ¯ · e 1 · e 0 ¯ ; d 1 = x 0 ¯ · e 2 ¯ · e 1 ¯ · e 0 + x 1 ¯ · x 0 · e 2 ¯ · e 1 ¯ · e 0 ; d 2 = x 2 ¯ · x 1 · x 0 · e 2 ¯ · e 1 ¯ · e 0 + x 2 · x 1 · x 0 · e 2 ¯ · e 1 ¯ · e 0 + x 2 ¯ · e 2 ¯ · e 1 · e 0 + x 2 · e 2 ¯ · e 1 · e 0 ¯ + e 2 ¯ · e 1 · e 0 .
In Equation (27), the sign “∙” denotes logical AND, and the sign “+” denotes logical OR.
The area values for the transition functions d0,…,d2 as well as the total area of the FSM for the e_FPGA, e_CPLD, classic, and terms estimates are given in Table 4.
Table 4. Values of the estimates for area.
Table 4 shows that the e_FPGA estimate does not distinguish the area of the transition functions for our example. However, other estimates indicate differences in the area of each transition function. Each of these estimates indicates that the area of function d1 is half the area of function d0, and the area of function d2 is larger than the area of function d0.
Table 5 presents the ranks of the transition functions in computing the performance estimates, the number of LUT levels pls(dr) or plp(dr) for each function dr, drD, and the value of the critical path length cpl.
Table 5. The rank values, the number of levels, and the critical path length of the FSM transition functions in calculating performance estimates.
For our simple example, the ranks of the transition functions differ only slightly. Therefore, the value of the estimates as well as the value of the critical path length match. Nevertheless, for large and complex FSMs, the seq_dec, par_dec, and avg_dec estimates can be useful in the FSM state encoding.
In computing the diff_w and max_w estimates, we have the following values for the weights of the transition functions: w(d0) = 4, w(d1) = 2, and w(d2) = 5. Therefore, diff_w = 3 and max_w = 5. The diff_w and max_w estimates are not computed for each transition function. However, the diff_w and max_w estimates can evaluate the intermediate results of FSM state encoding and can positively influence finding the best solution.

4. Results and Discussions

The considered estimates were used in the sequential method of FSM state encoding [8]. The studies were performed using design tool Quartus from Intel version 24.1 while implementing the FSM benchmarks of the Microelectronics Center of North Carolina (MCNC) [20] in FPGAs of family Cyclone 10 LP. The selection of states to encode was performed in P_C mode [8], when for encoding the state si, siS, with the maximum number of connections to already encoded states is selected. The search for the most appropriate code was performed using the considered estimates.

4.1. Results with Respect to the FSM Area

The experimental results with respect to the FSM area are shown in Table 6 and Table 7, where L1, …,L7 are the number of LUTs in the FSM circuit when using the corresponding estimate; Lmin is the minimum value of area for a particular example; Best is the number of best solutions; Unique is the number of unique solutions; L1/Lmin, …,L7/Lmin are the ratios of the corresponding parameters; and Av is the arithmetic mean of the parameter. Here, the unique solution is understood as the best solution, which is achieved using a particular estimate and which is not achieved using other estimates.
Table 6. Area (number of LUTs) of FSMs when using the considered estimates in the sequential state coding method [8] (the best solutions are in bold).
Table 7. Comparison of the FSM area using different estimates with the best solution Lmin.
In the sequential state coding method [8], the e_CPLD, classic, and terms estimates lead to the same results when the code with the minimum number of ones is selected at each step of the algorithm. Therefore, in Table 6 and Table 7, the values for the classic estimate only are given.
Table 7 shows that with respect to the best area solution on average (parameter Av), the estimates can be arranged in the following order:
avg_dec—1.059;
par_dec—1.063;
seq_dec—1.068;
e_FPGA—1.072;
classic—1.072;
max_w—1.104;
diff_w—1.193.
Unexpectedly, the avg_dec, par_dec, and seq_dec estimates, which are designed to measure the performance rather than the area of FSMs, are the best in terms of area on average. Of these, the par_dec estimate achieves the largest number (13) of best solutions (Table 6). The e_FPGA estimate, which is designed to most accurately measure the area when implementing FSMs in FPGAs, achieves 9 best solutions and follows immediately after the avg_dec, par_dec, and seq_dec estimates. This is followed by the estimates of classic, max_w, and diff_w. Note that the max_w estimate unexpectedly reaches the highest number of unique solutions (9). The diff_w estimate ranks last in the order given, but it achieves the best 5 solutions, among which 3 solutions are unique.
Given the reported results, we recommend that when searching for the best area solution using the sequential state coding method [8], all estimates should be considered, since each estimate can achieve the best solution.
Figure 3 shows the graphs of the efficiency of the considered estimates in terms of area. Here, the estimates are assigned place numbers by the average area value (Average) according to the order given above, with the avg_dec estimate having the highest number 7 and the diff_w estimate having the lowest number 1.
Figure 3. Efficiency by area of the estimates considered: Average is the place in order by average value area; Best is the number of best solutions; Unique is the number of unique solutions.
According to Figure 3, the ranking in terms of average area value (Average) approximately corresponds to the number of best solutions (Best).

4.2. Results with Respect to the FSM Performance

The results of the studies with respect to performance are summarized in Table 8 and Table 9, where F1,…,F7 are the maximum frequency of the FSM operation (in megahertz) using the corresponding estimate; Fmax is the maximum frequency value for a particular example; Fmax/F1,…, Fmax/F7 are the ratios of the corresponding parameters; and Best, Unique, and Av meaning as before.
Table 8. Performance of FSMs when using the considered estimates in the sequential state coding method [8] (the best solutions are in bold).
Table 9. Comparison of FSM performance using different estimates with the best solution Fmax.
Table 9 shows that with respect to the best performance solution on average (parameter Av), the estimates can be arranged in the following order:
classic—1.055;
avg_dec—1.069;
par_dec—1.071;
max_w—1.072;
seq_dec—1.080;
e_FPGA—1.088;
diff_w—1.113.
Unexpectedly, the best in terms of performance on average is the classic estimate, which is designed to determine the FSM area. The classic estimate also achieves the highest number of best (11) and unique (10) solutions (Table 8). The classic estimate is expectedly followed by the avg_dec and par_dec estimates, which on average perform reasonably well in terms of performance. This is followed by the max_w, seq_dec, and e_FPGA estimates. The diff_w estimate shows noticeably worse results (1.113). However, the diff_w estimate reaches the 5 best solutions, among which 4 solutions are unique.
Given the reported results, we recommend that to find the best solution in terms of performance, all estimates should be applied because each estimate can achieve the best unique solution. Of the avg_dec, par_dec, and seq_dec estimates, only one avg_dec estimate can be applied because it achieves the largest number of best solutions.
Figure 4 shows the graphs of the efficiency of the considered estimates in terms of performance. Here, the estimates are assigned place numbers by the average performance value (Average) according to the order given above, with classic estimate having the highest number 7, and diff_w estimate having the lowest number 1.
Figure 4. Efficiency by performance of the estimates considered: Average is the place in order by average value performance; Best is the number of best solutions; Unique is the number of unique solutions.
Figure 4 shows that the ranking in terms of average performance value (Average) approximately corresponds to the number of best solutions (Best).

4.3. Comparison of the Sequential State Coding Method Using Presented Estimates with Known Methods

To verify the effectiveness of the proposed estimates, let us compare the results of the sequential method (s_method) with simple binary coding (seq_code method), the Sequential mode of the Quartus system (Quartus method), and the JEDI program [21] (JEDI method). The results of this comparison are shown in Table 10 and Table 11, where LS, LQ, and LJ are the number of LUTs in the FSM circuit synthesized using the seq_code, Quartus, and JEDI methods; Lmin is the minimum area value from Table 6 for the particular example obtained using the s_method method; LS/Lmin, LQ/Lmin, and LJ/Lmin are the ratios of the corresponding parameters; FS, FQ, and FJ are the maximum operation frequency in megahertz of the FSM synthesized using the seq_code, Quartus, and JEDI methods; Fmax is the maximum frequency value from Table 8 for a particular example, obtained using the s_method method; Fmax/FS, Fmax/FQ, and Fmax/FJ are the ratios of the corresponding parameters; Max is the maximum value of the parameters; and Av, Best, and Unique meaning as before.
Table 10. Comparison of the sequential state encoding method using presented estimates with known FSM state encoding methods in terms of area (the best solutions are in bold).
Table 11. Comparison of the sequential state encoding method using presented estimates with known FSM state encoding methods in terms of performance (the best solutions are in bold).
Table 10 shows that using the proposed estimates in the s_method method reduces the FSM area by 6.5% on average compared to the seq_code method, by 4.4% compared to the Quartus method, and by 3.8% compared to the JEDI method. The largest area improvement by the s_method method is observed over the seq_code method in example ex5 (33.3% better), over the Quartus method in example ex4 (20.0% better), and over the JEDI method in example s510 (26.2% better). The s_method method achieves the largest number (16) of best solutions, of which 11 solutions are unique.
According to Table 11, using the proposed estimates in the s_method method on average improves the FSM performance by 7.3% over the seq_code method, 3.5% over the Quartus method, and 4.0% over the JEDI method. The greatest performance superiority of the s_method method is observed over the seq_code method in example bbara (23.0% better), over the Quartus method in example pma (27.6% better), and over the JEDI method in example dk16 (19.5% better). The s_method method achieves the largest number (16) of best area solutions, of which 15 solutions are unique.

5. Conclusions

In this paper, four FSM area estimates are proposed to estimate the quality of FSM state encoding: e_FPGA for implementing FSMs in FPGAs; e_CPLD for implementing FSMs in CPLDs; classic for implementing FSMs on elements of small and medium degree of integration; and terms for considering the largest number of FSM parameters. Three estimates of FSM performance are proposed: seq_dec, when sequential decomposition of Boolean functions is used; par_dec, when parallel decomposition of Boolean functions is used; and avg_dec, when an unknown method of Boolean function decomposition is used. In addition, two estimates that do not directly aim at computing area or delay are proposed: diff_w to ensure that the complexity of the FSM transition functions is approximately equal and max_w to minimize the maximum complexity of the FSM transition functions. It is shown how new estimates of the area and performance of FSMs can be generated from the diff_w and max_w estimates. The expressions and algorithms for the computation of each estimate are given.
A comparison of the efficiency of the estimates between each other on the benchmark of FSMs when using the proposed estimates in the sequential state coding method [8] is performed. The use of the considered estimates reduces the area of FSMs on average from 3.8% to 6.5%, compared to known approaches (for some cases by 33.3%), and increases the performance on average from 3.5% to 7.3% (for some cases by 27.6%).
Future research will be directed to the development of new estimates of the area and performance of FSMs, which should take into account more parameters of the FSM, as well as take into account the peculiarities of synthesis methods or state encoding of FSMs. The development of estimates based on other principles of measuring FSM parameters (e.g., based on information measures) is also seen as a promising direction.

Funding

The APC was supported by the Bialystok University of Technology grant number W/WIIIT/1/2024 financed from a subsidy provided by the Ministry of Science and Higher Education of Poland.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data supporting the findings of this study are derived from FSM benchmarks provided by the Microelectronics Center of North Carolina (MCNC). These benchmarks are openly accessible, with references and links included within the article.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Göhringer, D.; Podlubne, A.; Vargas, F.; Krstic, M. Self-Aware Reliable and Reconfigurable Computing Systems—An Overview. In Proceedings of the IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW), San Francisco, CA, USA, 27–31 May 2024; pp. 124–129. [Google Scholar] [CrossRef]
  2. Badhoutiya, A.; Jaffer, Z.; Hussein, H.M.; Juyal, A.; Mittal, M.; Anand, R. Field Programmable Gate Array: An Extensive Review, Recent Trends, Challenges and Applications. In Proceedings of the 11th International Conference on Computing for Sustainable Global Development (INDIACom), New Delhi, India, 28 February 2024; pp. 1084–1090. [Google Scholar] [CrossRef]
  3. Barkalov, A.; Titarenko, L.; Mielcarek, K.; Mazurkiewicz, M. Hardware reduction for FSMs with extended state codes. IEEE Access 2024, 12, 42369–42384. [Google Scholar] [CrossRef]
  4. Salauyou, V.; Borecki, D.; Grzes, T. The Synthesis Method of High-Performance Finite State Machines in FPGA. In Proceedings of the Computer Information Systems and Industrial Management: 19th International Conference (CISIM 2020), Bialystok, Poland, 16–18 October 2020; pp. 97–107. [Google Scholar] [CrossRef]
  5. Grzes, T.N.; Solov’ev, V.V. Minimization of power consumption of finite state machines by splitting their internal states. J. Comput. Syst. Sci. Int. 2015, 54, 367–374. [Google Scholar] [CrossRef]
  6. Anderson, J.H.; Najm, F.N. Power estimate techniques for FPGAs. IEEE Trans. Very Large Scale Integr. (VLSI) Syst. 2004, 12, 1015–1027. [Google Scholar] [CrossRef]
  7. Goeders, J.B.; Wilton, S.J. VersaPower: Power estimate for diverse FPGA architectures. In Proceedings of the International Conference on Field-Programmable Technology, Seoul, Republic of Korea, 10–12 December 2012; pp. 229–234. [Google Scholar] [CrossRef]
  8. Salauyou, V.; Bułatow, W. Optimized Sequential State Encoding Methods for Finite-State Machines in Field-Programmable Gate Array Implementations. Appl. Sci. 2024, 14, 5594. [Google Scholar] [CrossRef]
  9. Brayton, R.K.; Rudell, R.; Sangiovanni-Vincentelli, A.; Wang, A.R. MIS: A multiple-level logic optimization system. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 1987, 6, 1062–1081. [Google Scholar] [CrossRef]
  10. Legl, C.; Wurth, B.; Eckl, K. A Boolean approach to performance-directed technology mapping for LUT-based FPGA designs. In Proceedings of the 33rd annual Design Automation Conference, Las Vegas, NV, USA, 3–7 June 1996; pp. 730–733. [Google Scholar] [CrossRef]
  11. Huang, J.D.; Jou, J.Y.; Shen, W.Z. ALTO: An iterative area/performance tradeoff algorithm for LUT-based FPGA technology mapping. IEEE Trans. Very Large Scale Integr. (VLSI) Syst. 2000, 8, 392–400. [Google Scholar] [CrossRef][Green Version]
  12. Yamashita, S.; Sawada, H.; Nagoya, A. An efficient framework of using various decomposition methods to synthesize LUT networks and its evaluation. In Proceedings of the Asia and South Pacific Design Automation Conference, Yokohama, Japan, 25–28 January 2000; pp. 253–258. [Google Scholar] [CrossRef]
  13. Calvino, A.T.; De Micheli, G.; Mishchenko, A.; Brayton, R. Enhancing Delay-Driven LUT Mapping with Boolean Decomposition. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2024, in press. [Google Scholar] [CrossRef]
  14. Deniziak, S.; Wisniewski, M. A symbolic RTL synthesis for LUT-based FPGAs. In Proceedings of the 12th International Symposium on Design and Diagnostics of Electronic Circuits & Systems, Liberec, Czech Republic, 15–17 April 2009; pp. 102–107. [Google Scholar] [CrossRef]
  15. Hamed, B.A.; Salem, A.; Aly, G.M. Area estimate of LUT based designs. In Proceedings of the International Conference on Electrical, Electronic and Computer Engineering (ICEEC’04), Cairo, Egypt, 5–7 September 2004; pp. 39–42. [Google Scholar] [CrossRef]
  16. Atasu, K.; Todman, T.; Mencer, O.; Luk, W. Optimal implementation of combinational logic on look-up tables. In Proceedings of the Ph.D. Research in Microelectronics and Electronics, Istanbul, Turkey, 22 June 2008; pp. 153–156. [Google Scholar] [CrossRef]
  17. Klimowicz, A. Balanced Power, Performance and Area Transformation Procedure for Finite State Machines. In Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics (SMC), Prague, Czech Republic, 9–12 October 2022; pp. 2313–2318. [Google Scholar] [CrossRef]
  18. Burgun, L.; Dictus, N.; Lopes, E.P.; Sarwary, C. A unified approach for FSM synthesis on FPGA architectures. In Proceedings of the Twentieth Euromicro Conference. System Architecture and Integration, Liverpool, UK, 8 September 1994; pp. 660–668. [Google Scholar] [CrossRef]
  19. Kubica, M.; Kania, D.; Kulisz, J. A technology mapping of FSMs based on a graph of excitations and outputs. IEEE Access 2019, 7, 16123–16131. [Google Scholar] [CrossRef]
  20. Yang, S. Logic Synthesis and Optimization Benchmarks User Guide; Version 3.0; Microelectronics Center of North Carolina (MCNC): Research Triangle Park, NC, USA, 1991; Available online: https://ddd.fit.cvut.cz/www/prj/Benchmarks/LGSynth91.pdf (accessed on 13 December 2024).
  21. Lin, B.; Newton, A.R. Synthesis of multiple level logic from symbolic high-level description languages. In Proceedings of the IFIP International Conference on VLSI, Munich, Germany, 16–18 August 1989; North-Holland: New York, NY, USA, 1989; pp. 187–196. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.