Next Article in Journal
Differential Distribution Analysis and Region and Grade Regulation on Auto-Parts Weathering External Factors with Non-Uniform Thermal Environment
Previous Article in Journal
Ammonia Gas Sensors: Comparison of Solid-State and Optical Methods
Previous Article in Special Issue
Technology Mapping of FSM Oriented to LUT-Based FPGA
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Reducing LUT Count for FPGA-Based Mealy FSMs

by
Alexander Barkalov
1,2,
Larysa Titarenko
1,3 and
Kazimierz Krzywicki
4,*
1
Institute of Metrology, Electronics and Computer Science, University of Zielona Góra, ul. Licealna 9, 65-417 Zielona Góra, Poland
2
Department of Mathematics and Information Technology, Vasyl’ Stus Donetsk National University, 21, 600-richya str., 21021 Vinnytsia, Ukraine
3
Department of Infocommunication Engineering, Faculty of Infocommunications, Kharkiv National University of Radio Electronics, Nauky avenue 14, 61166 Kharkiv, Ukraine
4
Department of Technology, The Jacob of Paradies University, ul. Teatralna 25, 66-400 Gorzów Wielkopolski, Poland
*
Author to whom correspondence should be addressed.
Appl. Sci. 2020, 10(15), 5115; https://doi.org/10.3390/app10155115
Submission received: 20 June 2020 / Revised: 17 July 2020 / Accepted: 23 July 2020 / Published: 25 July 2020
(This article belongs to the Special Issue Finite State Machines: Theory, Design and Applications)

Abstract

:
Very often, digital systems include sequential blocks which can be represented using a model of Mealy finite state machine (FSM). It is very important to improve such FSM characteristics as the number of used logic elements, operating frequency and power consumption. The paper proposes a novel design method optimizing LUT counts of LUT-based Mealy FSMs. The method is based on simultaneous use of such methods of structural decomposition as the replacement of FSM inputs and encoding of the collections of outputs. The proposed method results in three-level logic circuits of Mealy FSMs. These circuits have regular systems of interconnections. An example of FSM synthesis with the proposed method is given. The experiments with standard benchmarks were conducted. The results of experiments show that the proposed approach leads to reducing the LUT counts from 12% to 59% in average compared with known methods of synthesis of single-level FSMs. Furthermore, our approach provides better LUT counts as compared to methods of synthesis of two-level FSMs (from 9% to 20%). This gain is accompanied by a small loss of FSM performance.

1. Introduction

One of the features of our time is a wide application of digital systems in various spheres of human activity [1,2]. Modern digital systems include different combinational and sequential blocks [3,4]. The behaviour of a sequential block can be represented using the model of finite state machine (FSM) [5,6]. To improve characteristics of a digital system, it is necessary to improve such characteristics of FSMs as internal occupied resources, performance and power consumption. This necessity explains the continuous interest in developing methods aimed at optimizing these characteristics of FSM circuits. As a rule, the less internal occupied resources are used by an FSM circuit, the less power it consumes [7]. So, it is very important to reduce internal occupied resources consumed by an FSM circuit.
A sequential block can be represented as either Mealy or Moore FSM [5,6]. There are thousands of monographs and articles devoted to problems of FSM circuits design. The vast majority of these works are devoted to Mealy FSMs. Based on this analysis, we have chosen Mealy FSM as the object of research in our current article.
To diminish the required internal occupied resources, it is necessary to take into account specifics of logic elements implementing FSM circuits [8,9]. Nowadays, field programmable gate arrays (FPGAs) [10,11,12] are widely used in the implementation of digital systems [9,13,14,15]. Due to it, we choose FPGA-based FSMs as a research object in the given article. In this article, we consider a case when look-up table (LUT) elements are used to implement logic circuits of Mealy FSMs.
A LUT is a block having S L inputs and a single output [10,12]. A single LUT allows implementing an arbitrary Boolean function having up to S L arguments [16,17]. However, the number of LUT inputs is rather small [10,12]. This feature leads to the need of functional decomposition of systems of Boolean functions (SBFs) representing FSM circuits [17,18]. In turn, this leads to multi-level FSM circuits with complex systems of interconnections [9].
One of the most crucial steps in the LUT-based design flow is the technology mapping [19,20,21,22,23,24,25]. During this step, an FSM circuit is converted into a network of interconnected LUTs. The outcome of technology mapping determines resulting characteristics of an FSM circuit. These characteristics are strongly interrelated.
The internal occupied resources consumed by a LUT-based FSM circuit include LUTs, flip-flops, interconnections, circuit of synchronization, input-output blocks. Obviously, to reduce the amount of required resources, it is very important to reduce the LUT count in a circuit. As follows from [26], the more LUTs are included into an FSM circuit, the more static power it consumes. Now, process technology has scaled considerably, with current design activity at 14 and 7 nm. Due to it, interconnection delay now dominates logic delay [26]. As noted in [16,27], the interconnections are responsible for the consuming up to 70% on power. So, it is very important to reduce the amount of interconnections to improve the characteristics of FSM circuits.
As shown in [26,28], the value S L = 6 provides an optimal trade-off for the occupied chip area, performance, and power consumption of a LUT. However, the complexity of FPGA-based projects is constantly growing [9]. To overcome this contradiction, it is necessary to develop the methods of technology mapping that take into account rather small value of LUT’s inputs.
The main contribution of this paper is a novel design method aimed at reducing the number of LUTs in circuits of FPGA-based Mealy FSMs. The proposed approach is based on joint usage of two known methods of structural decomposition (replacement of inputs and encoding of collections of outputs). The method leads to FSM circuits having three levels of logic and regular system of interconnections. The proposed method allows obtaining FSM circuits with fewer LUTs compared to circuits based on either single-level or two-level FSM models. Our current study is focused in Xilinx solutions [12].
The rest of the paper is organised as the follows. Section 2 presents the theoretical background of Mealy FSMs and peculiarities of FPGAs. Section 3 discusses the state of the art of FPGA-based technology mapping. Section 4 describes the main idea of the proposed method. The synthesis example is shown in Section 5. Section 6 gives results of experiments conducted on standard benchmarks [29]. A brief conclusion ends the paper.

2. Specifics of FPGAs and Mealy FSMs

The majority of modern FPGAs are organized using so called “island-style” architecture [16,28,30]. They include different configurable logic blocks (CLBs) and a matrix of programmable interconnections [10,11,12]. In this article, we consider CLBs consisting of LUTs and programmable flip-flops. To implement LUT-based circuits of sequential blocks, it is necessary to connect outputs of some LUTs with flip-flops [5].
An extremely small amount of LUT inputs leads to the necessity of functional decomposition [17] of functions representing combinational parts of FSMs. The functional decomposition produces multi-level circuits with irregular systems of interconnections. Such circuits resemble “spaghetti-type” programs [28]. Using terminology from programming, we can say that the functional decomposition produces LUT-based circuits with “spaghetti-type” interconnections.
A Mealy FSM is defined as a vector < X , Y , A , δ , λ , a 1 > [5], where X = { x 1 , , x L } is a set of inputs, Y = { y 1 , , y N } is a set of outputs, A = { a 1 , , a M } is a set of internal states, δ is a function of transitions, λ is a function of output, and a 1 A is an initial state. A Mealy FSM can be represented using different tools, such as: state transition graphs [3,5], binary decision diagrams [31,32], and-inverter graphs [33], graph-schemes of algorithms [5]. In this article, we use state transition tables (STTs) for this purpose.
An STT includes the following columns [3,5]: a m is a current state; a s is a state of transition (a next state); X h is a conjunction of inputs (or their compliments) determined a transition from a m to a s ; Y h is a collection of outputs generated during the transition from a m to a s . The column h includes the numbers of transitions ( h { 1 , , H } ). For example, the STT (Table 1) represents some Mealy FSM S 1 .
Using STT (Table 1), the following parameters of S 1 can be found: the number of inputs L = 8 , the number of outputs N = 7 , the number of states M = 6 , and the number of transitions H = 15 . Furthermore, Table 1 uniquely defines the functions of transitions and output of FSM S 1 .
To find SBFs representing an FSM circuit, it is necessary [5]: (1) to encode states a m A by binary codes K ( a m ) ; (2) to construct sets of state variables T = { T 1 , , T R } and input memory functions (IMFs) Φ = { D 1 , , D R } and (3) to transform an initial STT into a direct structure table (DST). States a m A are encoded during the step of state assignment [3].
In this article, we use the state codes having the minimum possible number of state variables R, where
R = l o g 2 M .
This method is used, for example, in well-known academic system SIS [34]. There are other approaches for state encoding where the number of state variables differs from (1). For example, the academic system ABC [33] of Berkeley uses one-hot state assignment with R = M .
State codes are kept into a state register ( R G ). The R G consists of R flip-flops with mutual inputs of synchronization (Clock) and reset (Start). For LUT-based FSMs, D flip-flops are used to organize state registers [9]. The pulse Clock allows the functions D r Φ to change the RG content.
To find functions representing an FSM circuit, it is necessary to create a direct structure table. A DST is an expansion of an STT by the columns with codes of current and next states ( K ( a m ) and K ( a s ) , respectively). Furthermore, a DST includes a column Φ h with symbols D r Φ corresponding to 1’s in the code K ( a s ) from the row h of a DST ( h { 1 , , H } ). The following SBFs are derived from a DST:
Φ = Φ ( T , X ) ;
Y = Y ( T , X ) .
The systems (2) and (3) determine a structural diagram of Mealy FSM U 1 (Figure 1 from [35]). In Figure 1, the symbol L U T e r denotes a logic block consisting of LUTs.
In the FSM U 1 , the L U T e r Φ implements the system (2), the LUTerY the system (3). If a function D r is generated by a particular LUT, then the LUT’s output is connected with a flip-flop [9]. The flip-flops form the state register distributed among the LUTs of L U T e r Φ . It explains the existence of pulses Start and Clock as inputs of L U T e r Φ .
The main specific of Mealy FSMs is the dependence of input memory functions and outputs on inputs and state variables. So, these functions have the same nature. This specific can be used to minimize hardware in LUT-based Mealy FSM circuits [35]. In Section 4, we will explain how to use this specific.

3. State of the Art

The process of technology mapping is associated with necessity of the solution of some optimization problems [9,35]. When designing FPGA-based FSMs, four optimization problems arise [35]: (1) the reduction of hardware amount, (2) the improvement of performance, (3) the reduction of power consumption, and (4) the improvement of testability. In this article, we propose a way for solution of the first problem.
Denote as N L ( f i ) the number of literals [3] in sum-of-products (SOPs) of functions (2) and (3). If the condition
N L ( f i ) S L ( i { 1 , , N + R } )
takes place, then it is enough a single LUT to implement a circuit for any function f i Φ Y . If the condition (4) is violated for some function f i Φ Y , then the corresponding circuit is multi-level. In multi-level circuits, it is quite possible that the same inputs x l X appear on several logic levels. It results in FSM circuits with the spaghetti-type interconnections.
To improve the circuit characteristics, it is necessary to diminish the number of LUTs and make the system of interconnections more regular. It can be done using the following approaches:
  • The functional decomposition of functions representing Mealy FSM logic circuits [8,17,19,20,24,36].
  • The optimal state assignment [3,9,37,38,39,40,41,42,43].
  • The replacement of LUTs by embedded memory blocks (EMBs) [44,45,46,47,48,49,50,51].
  • The structural decomposition of FSM circuits [35,43,52].
The functional decomposition is a very powerful tool used in the process of technology mapping [19,53]. If the condition (4) is violated, then a function is broken down into smaller and smaller components. The process is terminated when any component has no more than S L arguments.
If the condition (4) takes place, then a Mealy FSM logic circuit has exactly R + N LUTs. Otherwise, an FSM circuit is represented by R + N + | Ψ | functions, where Ψ is a set of additional functions different from (2) and (3). New functions correspond to components of initial functions obtained in the process of decomposition.
A huge number of methods of functional decomposition are known. Some of them can be found, for example, in [19,20,23]. We do not discuss them in our article. All modern FPGA-based CAD systems include program tools for functional decomposition. These tools can be found in academic systems [33,34,54,55], as well as in industrial packages [56,57,58]. The open system DEMAIN [54] includes powerful methods of functional decomposition. Due to this, we chose this system for comparison with our proposed approach.
The optimal state assignment [9] is a process of obtaining state codes optimizing systems of Boolean functions (2) and (3). One of the best academic optimal state assignment algorithms is JEDI distributed with the system SIS [34]. The JEDI is aimed at reducing the numbers of arguments in functions representing a Mealy FSM logic circuit. In this article, we compare JEDI-based FSMs with FSMs based on our proposed approach
Different state assignment strategies can be found in modern industrial CAD tools. For example, the design tool Vivado [57] uses the following approaches: the one-hot ( R = M ); compact; Gray codes; Johnson codes; speed encoding; automatic state assignment (auto). The same methods can be found in the package XST by Xilinx [56].
Because modern FPGAs include a lot of flip-flops, the one-hot state assignment is very popular in LUT-based design [41]. This approach allows producing less complicated combinational parts of FSM circuits than their counterparts based on the binary state encoding where R = l o g 2 M [35]. As shown in [41], if M 8 , then FSMs based on binary state codes have better characteristics than their counterparts based on one-hot codes. The one-hot codes are more preferable if there is M > 16 . However, the characteristics of LUT-based FSM circuits significantly depend on the number of inputs [35]. As it is shown in [42], if L 10 , then it is better to use one-hot state codes. Otherwise, binary state encoding allows producing better FSM circuits. So, both approaches should be compared with our proposed method. We chose the method Auto of Vivado as a method of binary state encoding. This method allows choosing codes producing FSM circuits with the best possible characteristics.
The main goal of both Gray and Johnson state encoding approaches is the reducing switching activity of an FSM circuit. It allows reducing the dynamic power consumption [35]. We do not discuss these methods in detail. Such an analysis can be found, for example, in [42].
So, a large number of state assignment methods are currently known. They are usually focused on optimizing one or more characteristics of FSM circuits. Some of them mostly focus on area reduction. It is very difficult to say which method is the best for a particular FSM. It depends on both the features of FSM and FPGA, as well as on the accepted criteria of FSM circuit optimality.
Each literal of SOP representing a function f i corresponds to a wire in the FSM circuit. So, to diminish the number of interconnections, it is necessary to diminish the numbers of literals in Boolean functions (2) and (3). The fewer interconnections, the less power is consumed [28]. Therefore, the optimal state assignment must be performed regardless of whether the condition (4) is met or not.
Modern FPGAs include a lot of configurable embedded memory blocks [10,11,12]. Replacement of LUTs by EMB allows significantly improve the characteristics of resulting FSM circuits [41]. Because of it, there are a lot of design methods for EMB-based FSMs [43,44,46,47,48,49,59]. The survey of different methods of EMB-based design can be found in [60]. Unfortunately, these methods can be used only if there are “free” EMBs, which are not used to implement other parts of a digital system.
To optimize a LUT-based FSM circuit, it is necessary to eliminate a direct dependence of functions y n Y and D r Φ on inputs x l X . It is a main goal of different methods of a structural decomposition [35]. To eliminate this dependence, new functions f i Ψ are introduced to eliminate this dependence. These new functions depend on inputs and/or state variables. To optimize an FSM circuit, the following condition should take place:
| Ψ | N + R .
Each system of new functions determines a separate block LUTer with its unique input and output variables. These blocks can be viewed as “hardware subroutines” by analogy with subroutines in programming [61,62]. If the relation (5) takes place, then the total number of LUTs implementing functions f i Ψ is significantly less than their total number in blocks L U T e r Φ and L U T e r Y of an equivalent FSM U 1 . Using hardware subroutines allows structuring an FSM circuit. The functions f i Ψ are used as arguments of functions (2) and (3). If the condition
| Ψ | L + R
is true, then the total number of LUTs in an FSM circuit is significantly less than it is for an equivalent FSM U 1 .
If (6) takes place, then the structural decomposition leads to reduced number of literals in SOPs of functions f i Φ Y as compared to initial functions (2) and (3). In turn, it reduces the total number of LUTs in blocks L U T e r Φ and L U T e r Y (as compared to U 1 ). If condition (4) is violated for some functions f i Φ Y Ψ , then the methods of functional and structural decomposition should be used together in the process of technology mapping. A survey of different methods of structural decomposition can be found in [35].
In this article, we discuss two methods of structural decomposition. They are the methods of replacement of inputs and encoding of outputs. They have been proposed to minimize the control memory size in microprogram control units (MCU) [63]. Next, they were applied in PLA-based FSMs [64]. Each of these methods was used separately in EMB-based FSM design [44,45,48,60]. However, they have never been used in LUT-based FSM design. In this article, we propose to combine these methods together to optimize characteristics of LUT-based Mealy FSMs.
The first method is a replacement of inputs x l X by additional variables p g P = { p 1 , , p G } where G L [64]. To do it, it is necessary to create an SBF
P = P ( T , X ) .
In MCUs, SBF (7) is implemented using a multiplexer. The additional variables are used as arguments of functions f i Φ Y . These functions are represented as
Φ = Φ ( T , P ) ;
Y = Y ( T , P ) .
The functions (8) and (9) have a regular nature [35]. So, they can be implemented as a memory block having G + R address inputs and N + R outputs.
Using this approach leads to FSM U 2 shown in Figure 2. It includes a multiplexer implementing SBF (7) and a memory block implementing systems (8) and (9).
In the classical MCU [63], only a single input is checked in each cycle of operation ( G = 1 ). This results in rather slow control units. To decrease the number of cycles required for implementing a control algorithm, it is necessary to increase the value of G. To optimize an MCU performance, the value of G is determined as [64]:
G = m a x ( | X ( a 1 ) | , , | X ( a M ) | ) .
In (10), the symbol X ( a m ) stands for the set of inputs determining transitions from the state a m A .
The model U 2 was used in the FPGA-based design. Different U 2 -based approaches are discussed, for example, in [60]. In all discussed cases, EMBs implement systems (8) and (9). The system (7) is implemented with LUTs.
Collections of outputs (COs) Y q Y ( q { 1 , , Q } ) are generated during interstate transitions. The minimum number of bits in the code K ( Y q ) is determined as
R Q = l o g 2 Q .
To encode COs by codes K ( Y q ) , some additional variables z r Z = { z 1 , , z R Q } are used.
If COs are encoded, then the system of outputs is represented as
Y = Y ( Z ) .
In the case of MCU, the system (12) is implemented using two blocks, namely, a decoder and a coder [35].
To generate the additional variables z r Z , it is necessary to find an SBF
Z = Z ( T , X ) .
In the case of MCU, both systems (13) and (2) are implemented by a memory block. In the case of FPGA-based design, a memory block is represented as a network of EMBs.
Using the encoding of COs in FPGA-based design leads to Mealy FSM U 3 shown in Figure 3.
In FSM U 3 , the block EMBer implements systems (2) and (13). The block LUTer implements the system (12).
So far, these methods have been used separately to improve characteristics of circuits of FPGA-based FSMs. Moreover, some parts of FSM circuits have been implemented using EMBs [45,47]. In this article, we propose to use these methods together. Moreover, all functions are implemented by LUTs. This approach leads to Mealy FSM logic circuits having three levels of logic. The circuit for each level of logic can be viewed as a hardware subroutine. This approach allows structuring a resulting FSM circuit and makes the system of interconnections more regular. We denote the proposed Mealy FSM by the symbol U 4 .

4. Main Idea of the Proposed Method

Consider some Mealy FSM S i represented by an STT. We assume that the following procedures have been executed: (1) the replacement of inputs; (2) the encoding of COs; (3) the encoding of states and (4) the transformation of initial STT into the DST of FSM U 1 . To get SBFs representing U 4 , we should transform the DST of FSM U 1 into a DST of Mealy FSM U 4 .
To obtain the arguments of functions (8) and Z ( T , P ) , it is necessary to replace the column X h of the DST of FSM U 1 by the column P h . It is executed in the following way: if an additional variable p g P replaces an input x l X for a state a m A , then the variable x l (or its negation) from the column X h is replaced by the variable p g (or its negation) in the column P h for all transitions from the state a m A .
To obtain functions Z ( T , P ) , it is necessary to replace the column Y h of the DST of FSM U 1 by the column Z h . The filling of the column Z h is executed in the following manner. If the h-th row of DST includes a CO Y q Y such that the r-th bit of K ( Y q ) is equal to 1, then the symbol z r should be written in the h-th row of the column Z h of DST of FSM U 4 .
Using a DST of FSM U 4 , we can derive the systems (8) and
Z = Z ( T , P ) .
Using the table of replacement of inputs, we can get the system (7). Next, using the content of collections of outputs, we can obtain the system (12).
Until now, the methods of replacement of inputs and encoding of the collections of outputs were used separately in EMB-based Mealy FSM design. In this article, we propose to use them together in LUT-based Mealy FSMs. There are three levels of logic blocks in the proposed Mealy FSM U 4 . Its structural diagram is shown in Figure 4.
In FSM U 4 , the first level of logic is represented by a block L U T e r P , the second level includes blocks L U T e r Z and L U T e r T , the third level includes a block L U T e r Y . The blocks implement the following SBFs: the L U T e r P implements the system (7), the L U T e r Z the system (14), the L U T e r T the system (8), and the L U T e r Y the system (12).
If the condition
G + R S L
takes place, then the L U T e r Z consists of R Q LUTs and L U T e r T of R LUTs. It is the best possible case. If the condition (15) is violated, then it is necessary to apply the methods of functional decomposition for some functions from SBFs (8) and (14).
If the condition
R Q S L
takes place, then there are exactly N LUTs in the circuit of the L U T e r Y . If this condition is violated, then it is necessary to apply the methods of functional decomposition for some functions from SBF (12).
In this article, we propose a design method for Mealy FSM U 4 . We assume that an FSM is represented by an STT. The method includes the following steps:
  • Executing the replacement of inputs by additional variables p g P .
  • Executing the state assignment in a way optimizing the SBF P = P ( X , T ) .
  • Deriving the collections of outputs Y q Y from the STT.
  • Executing the encoding of COs in a way optimizing the SBF Y = Y ( Z ) .
  • Creating the DST of FSM U 4 on the base of initial STT.
  • Deriving the SBFs (7), (8), (12) and (14) from the DST.
  • Implementing circuit of FSM using particular LUTs.
Some steps of the proposed method are connected with solution of optimization problems. We discuss these problems in the following Section.

5. Example of Synthesis

If a Mealy FSM S j is synthesized using a model U i , then we denote it by the symbol U i ( S j ) . Consider an example of synthesis for Mealy FSM U 4 ( S 1 ) . An FSM circuit will be implemented using LUTs with S L = 6 .
Executing the replacement of inputs. We start from constructing sets X ( a m ) X . A set X ( a m ) includes inputs x l X determining transitions from the state a m A . Using Table 1 gives the following sets: X ( a 1 ) = { x 1 } , X ( a 2 ) = { x 2 , x 3 } , X ( a 3 ) = { x 4 , x 5 } , X ( a 4 ) = , X ( a 5 ) = { x 3 , x 6 , x 7 } and X ( a 6 ) = { x 8 } .
Using (10) gives G = m a x ( 1 , 2 , 2 , 0 , 3 , 1 ) = 3 . So, there is the set P = { p 1 , p 2 , p 3 } . Using (1) gives the number of state variables R = 3 .
We should construct a table of replacement of inputs [35]. This table has M columns marked by states a m A and G rows marked by variables p g P . If an input x l X is replaced by a variable p g P in the state a m A , then there is the symbol x l written at the intersection of the column a m and the row p g [64].
Inputs x l X written in a row p g form a set X ( p g ) X . If | X ( p g ) | S L R , then the circuit generating p g P is implemented as a single LUT. In the discussed case, there is S L R = 3 . To optimize the circuit of L U T e r P , we should distribute inputs x l X in a way providing the relation | X ( p g ) | 3 ( g { 1 , , G } ). It could be done using the approach from [64]. One of the possible solutions is shown in Table 2.
Executing the state assignment. To optimize the circuit of L U T e r P , it is necessary to diminish the number of literals in functions (7) [64]. It can be done due to a proper state assignment. These methods are based on results of the work [64].
Using (1) gives R = 3 . So, there are the sets T = { T 1 , T 2 , T 3 } and Φ = { D 1 , D 2 , D 3 } . One of the possible outcomes of the state assignment is shown in Figure 5.
Deriving the collections of outputs. This step is executed in the trivial way. The collections Y q Y are written in the column Y h of an STT. Using Table 1, the following COs can be found: Y 1 = , Y 2 = { y 1 , y 7 } , Y 3 = { y 2 , y 6 } , Y 4 = { y 5 } , Y 5 = { y 1 , y 4 , y 6 } , Y 6 = { y 2 , y 3 } , Y 7 = { y 4 , y 6 } , Y 8 = { y 5 , y 7 } , Y 9 = { y 2 } and Y 10 = { y 3 , y 4 } .
To optimize the circuit of LUTerY, it is necessary to minimize the number of literals in functions (12). Furthermore, it allows minimizing the number of interconnections between the blocks L U T e r Z and L U T e r Y .
Executing the encoding of COs. We start this process from a system representing outputs y n Y . as functions of collections Y q Y . It is the following system in the discussed case:
y 1 = Y 2 Y 5 ; y 2 = Y 3 Y 6 Y 9 ; y 3 = Y 6 Y 10 ; y 4 = Y 5 Y 7 Y 10 ; y 5 = Y 4 Y 8 ; y 6 = Y 3 Y 5 Y 7 ; y 7 = Y 2 Y 8 .
There are Q = 10 collections of outputs in the discussed case. Using (11) gives R Q = 4 and Z = { z 1 , , z 4 } . Using the method [64] allows obtaining codes of COs shown in Figure 6.
Creating the DST of FSM U 4 ( S 1 ) . Having codes of states and COs, we can transform the initial STT (Table 1) into a DST of Mealy FSM U 4 ( S 1 ) (Table 3).
Consider the row h = 1 of Table 3. There is a m = a 1 and a s = a 2 . As follows from Figure 5, the code of a 2 is equal to 010. Due to it, there is the symbol D 2 in the column Φ h . There is the symbol x 1 in the row 1 of STT. As follows from Table 2, the input x 1 is replaced by the variable p 1 for the state a 1 A . Due to it, there is the symbol p 1 in the first row of DST (Table 3). There is the collection of outputs Y 2 = { y 1 , y 7 } in the first row of Table 1. As follows from Figure 6, there is K ( Y 2 ) = 0100 . Due to it, there is the symbol z 2 in the row 1 of DST (Table 3). All other rows of Table 3 are filled in the same way.
Deriving SBFs representing the circuit of U 4 ( S 1 ) . During this step, the functions (7), (8), (12) and (14) should be found. It can be done using Table 2 and Table 3, as well as codes from Karnaugh maps shown in Figure 5 and Figure 6.
We start from the SBF (7). We use the symbol A m to denote a conjunction of state variables (or their complements) corresponding to the code K ( a m ) .
The following system can be derived from Table 2:
p 1 = A 1 x 1 A 2 x 2 A 5 x 6 ; p 2 = A 2 x 3 A 3 x 4 A 5 x 3 ; p 3 = A 3 x 5 A 5 x 7 A 6 x 8 .
Using codes from Figure 5, we can get the following minimized functions:
p 1 = T 1 ¯ T 2 ¯ T 3 ¯ x 1 T 1 ¯ T 2 T 3 ¯ x 2 T 2 T 3 x 6 ; p 2 = T 1 ¯ T 2 x 3 T 1 T 2 x 4 ; p 3 = T 1 T 2 x 5 T 2 T 3 x 7 T 1 T 2 ¯ x 8 .
In the discussed case, the system (19) represents L U T e r P . Each equation of (19) includes not more than six literals. Because S L = 6 , there are only G = 3 LUTs in the circuit of L U T e r P .
Each row of DST of FSM U 4 corresponds to the product term
F h = A m B h ( h { 1 , , H } ) .
In (20), the symbol B h denotes a conjuction of variables p g (or their compliments) written in the column P h of DST.
The functions (8) and (14) depend on terms (20). For example, the following equations can be derived from Table 3:
D 1 = F 2 F 8 F 11 F 12 = T 1 ¯ T 2 ¯ T 3 ¯ p 1 ¯ T 1 T 2 T 3 ¯ p 3 ¯ p 3 ¯ T 1 ¯ T 2 T 3 p 2 p 1 ¯ T 1 ¯ T 2 T 3 p 2 ¯ p 3 .
z 1 = F 2 F 4 F 6 F 10 F 12 F 14 = = T 1 T 2 T 3 ¯ p 2 ¯ p 3 ¯ T 1 T 2 ¯ T 3 ¯ p 3 .
All other functions D r Φ and z r Z are constructed in the same manner.
In the discussed case, there is R + G = 6 . Because S L = 6 , the condition N L ( f i ) S L takes place for any function f i Φ Z . It means that there are R=3 LUTs in the circuit of L U T e r T and R Q = 4 LUTs in the circuit of L U T e r Z .
Using system (17) and codes from Figure 6, we can get the following system:
y 1 = z 2 z 3 ¯ ; y 2 = z 1 ; y 3 = z 3 z 4 ; y 4 = z 1 ¯ z 4 ; y 5 = z 1 ¯ z 3 z 4 ¯ ; y 6 = z 3 ¯ z 4 ; y 7 = z 2 z 3 ¯ z 4 ¯ z 1 ¯ z 2 ¯ z 3 z 4 ¯ .
The analysis of (23) shows that there is no need in a LUT to implement the function y 2 . Because R Q = 4 is less than S L = 6 , the condition (16) takes place. So, it is necessary N 1 = 6 LUTs to implement L U T e r Y .
In general case, each function from (12) has R Q literals. For N functions, it gives R Q · N literals. In the discussed case, there is R Q · N = 4 · 7 = 28 literals. Each literal corresponds to the interconnection between blocks L U T e r Z and L U T e r Y . As follows from (23), there are 16 literals in this system. It gives a 42% savings in the number of interconnections compared to the general case. This economy is achieved due to chosen encoding of COs Y q Y . It should give economy in the power consumption.
So, there are G = 3 LUTs in L U T e r P , R = 3 LUTs in L U T e r T , R Q = 4 LUTs in L U T e r Z , and N 1 = 6 LUTs in L U T e r Y . It gives 16 LUTs in the logic circuit of Mealy FSM U 4 ( S 1 ) .
The last step of design is connected with the placement and routing procedures [16]. It is executed using industrial CAD tools such as, for example, Vivado by Xilinx [57]. We do not discuss this step for a given example.
It is known that any sequential block can be represented using either model of Mealy FSM or Moore FSM [3]. There is the following specific of Moore FSM: its outputs depend only on states. It means that, for Moore FSMs, state codes can be viewed as the codes of collections of outputs. So, there is no sense in using additional variables encoding the collections of outputs. It means that the proposed approach can be used only in the case of LUT-based Mealy FSMs.

6. Experimental Results

To investigate the efficiency of proposed method, we use standard benchmarks from the library [29]. The library includes 48 benchmarks taken from the design practice. The benchmarks are rather simple, but they are very often used by different researches to compare new and known results [9,43]. The benchmarks are represented in KISS2 format. These benchmarks are Mealy FSMs, so we can directly use them in our research. The characteristics of these benchmark FSMs are shown in Table 4.
The process of obtaining synthesis research results in Vivado [57] has been divided into two stages. The first stage was a generation of the VHDL code based on benchmarks saved in the KISS2 format. Each benchmark was generated by the tool K2F [35,45] according to the given FSM model. It should be noted that generated code uses a specific Vivado code style [65] in order to provide the proper FSM extraction and fully synthesizable code. Then, in the next stage, the VHDL code was imported into Vivado (ver. 2019.1). The target device was the Xilinx Virtex 7 (XC7VX690TFFG1761) [66]. The chip includes LUTs with six inputs. The synthesis and optimization options were set to: max_bram 0, opt_design -retarget -propconst -bram_power_opt and the selected FSM state encoding method one of the following: auto, one_hot, sequential, johnson or gray. The final results presented in the tables are taken after the post-implementation.
As we have found, our method can give economy in area if R + L > S L . We have divided the benchmarks into categories using the values of L + R and S L . If L + R 6 , then benchmarks belong to category 0 (trivial FSMs); if L + R 12 , then to category 1 (simple FSMs); if L + R 18 , then to category 2 (average FSMs); if L + R 24 , then to category 3 (big FSMs); otherwise, they belong to category 4 (very big FSMs). Obviously, there is no sense to apply our approach to FSMs belonging to category 0. As our researches show, the higher the category, the more saving the proposed approach gives.
Four other methods were taken to compare with our approach. They are: (1) Auto of Vivado; (2) One-hot of Vivado; (3) JEDI-based FSMs and (4) DEMAIN-based FSMs. The results of experiments are shown in Table 5 (the number of LUTs) and Table 6 (the operating frequency).
Table 5 and Table 6 are organized in the same order. The rows are marked by the names of benchmarks, the columns by design methods. The rows “Total” include results of summation for corresponding values. The summarized characteristics of our approach ( U 4 —based FSMs) are taken as 100%. The rows “Percentage” show the percentage of summarized characteristics of FSM circuits implemented by other methods respectively to benchmarks based on our approach. Let us point out that the model U 1 is used for designs with Auto, One-hot, JEDI and DEMAIN. Furthermore, for better visualization, summary data are presented in the Figure 7, Figure 8 and Figure 9.
As follows from Table 5 and Figure 7, the U 4 —based FSMs required fewer LUTs than it is for other investigated methods. There is the following economy: (1) 35.65% regarding Auto; (2) 59.27% regarding One-hot; (3) 12.04% regarding JEDI-based FSMs and (4) 21.20% regarding DEMAIN-based FSMs. The higher is the category, the greater is the gain in LUTs. For trivial and simple FSMs, the better results are produced by either JEDI or DEMAIN. The gain are becoming more and more noticeable, starting from the average FSMs.
As follows from Table 6 and Figure 8, the U 4 —based FSMs have a lower operating frequency than it is for other investigated methods. There is the following loss: (1) 2.65% regarding Auto; (2) 1.82% regarding One-hot; (3) 10.13% regarding JEDI-based FSMs and (4) 6.87% regarding DEMAIN-based FSMs. However, starting from big FSMs, the losses are getting smaller. It is connected with the fact that U 4 —based FSMs always have three levels of logic and more regular system of interconnections.
The main goal of the proposed approach is to reduce the LUT count in circuits of FPGA-based Mealy FSMs. As follows from Table 5, the degree of reduction in the number of LUTs depends on the category of an FSM. To clarify this dependence, we have created Table 7 (experimental results for category 0), Table 8 (experimental results for category 1) and Table 9 (experimental results for categories 2–94). Furthermore, we present these results by graphs on Figure 9, Figure 10 and Figure 11, respectively.
As follows from Table 7 and Figure 9, the proposed method produces FSM circuits having more LUTs than it is for other investigated methods. Our method has the following loss: (1) 30.34% regarding Auto; (2) 3.37% regarding One-hot; (3) 31.46% regarding JEDI-based FSMs and (4) 28.09% regarding DEMAIN-based FSMs. So, there is no sense in using our approach for designing trivial FSMs. However, it gives an economy in LUTs starting from simple FSMs (category 1).
As follows from Table 8 and Figure 10, the U 4 —based FSMs of category 1 required fewer LUTs than it is for other methods. There is the following economy: (1) 23.03% regarding Auto; (2) 65.52% regarding One-hot; (3) 3.47% regarding JEDI-based FSMs and (4) 12.62% regarding DEMAIN-based FSMs. So, for the category 1, our approach produces FSM circuits slightly better than JEDI-based FSMs.
Our method produces best results for FSMs from categories 29-4 (Table 9 and Figure 11). It is very interesting that the gain respectively the one-hot approach is approximately the same as it is in the previous case. However, we provide a bigger gain for other investigated methods as compared to FSMs of the category 1. There is the following economy: (1) 46.93% regarding Auto; (2) 19.63% regarding JEDI-based FSMs and (3) 29.39% regarding DEMAIN-based FSMs. So, our approach produces FSM circuits with better amount of LUTs for Mealy FSMs having L + R 12 .
Till now, we compared our approach with U 1 -based FSMs. However, we also compared the U 4 -based FSMs with FSMs having two levels of logic. The structural diagrams of these FSMs are shown in Figure 12. The FSM U 5 is based on the replacement of inputs (Figure 12a). There is no such an FSM in the known literature. We have got its structural diagram by transformation the FSM U 2 (Figure 2). We replaced the multiplexer by the block L U T e r P ; the memory block is replaced by L U T e r T Y . The L U T e r P implements the system (5), the LUTerTY the systems (6) and (7).
The FSM U 6 is based on the encoding of collections of outputs (Figure 12b). There is no such an FSM in the known literature. We have got its structural diagram by transformation the FSM U 3 (Figure 3). We replaced the block E M B e r by the block L U T e r T Z generating functions (2) and (11). As it is for FSM U 3 , the L U T e r Y implements the system (10).
The FSM U 7 is based on the transformation of state codes into outputs (Figure 12c) [35]. In this FSM, additional variables from the set V replace inputs for output functions. The FSM U 8 is based on the transformation of collections of outputs into state codes (Figure 12d) [35]. In this FSM, additional variables from the set V replace inputs for input memory functions. Both methods belong to the group of object transformation methods [35]. We do not discuss these approaches in this article. We just use them as examples of FSMs having two levels of logic.
We compared the FSMs (Figure 12) with our approach for the most complex benchmarks (categories 2–4). The results of experiments are shown in Table 10 and Figure 13. As follows from Table 10, our method produces better results for FSMs than it is for FSMs U 5 - U 8 . There is the following economy: (1) 17.11% regarding U 5 ; (2) 11.95% U 6 (3) 20.18% regarding U 7 and 4) 9.1% regarding U 8 . So, our approach produces FSM circuits with better amount than two-level Mealy FSMs having L + R 12 . However, the gain is noticeably less than for U 1 -based FSMs from these categories.
So, the results of our experiments show that the proposed approach can reduce the LUT counts respectively to single- and two-level Mealy FSMs having L + R 12 . Of course, this conclusion is true only for benchmarks [27] and the device XC7VX690tffg1761-2 by Virtex-7, where LUTs have 6 inputs. It is almost impossible to make a similar conclusion for the general case. However, we hope that our approach rather good potential and can be used in CAD systems targeting FPGA-based Mealy FSMs.

7. Conclusions

Contemporary FPGA devices include a lot of look-up table elements. This allows implementing a very complex digital system using only a single chip. However, LUTs have rather small amount of inputs (for the vast majority of devices the value of S L does not exceeds 6). This value is considered as optimal [26,28]. To design rather complex FSMs, the methods of functional decomposition are used. As a rule, this leads to multi-level FSM circuits with complex systems of spaghetti-type interconnections.
To optimize the LUT counts in FPGA-based FSM circuits, different methods of structural decomposition could be applied. As our researches [35] show, the structural decomposition can lead to FSM circuits having better characteristics than their counterparts based on the functional decomposition. They have regular system of interconnections and predicted number of logic levels.
The current article is devoted to a novel approach aimed at optimization of LUT-based Mealy FSMs. The proposed approach is based on simultaneous use of such methods of structural decomposition as the replacement of inputs and encoding of collections of outputs. Till now, the methods of replacement of inputs and encoding of the collections of outputs were used separately in EMB-based Mealy FSM design. In this article, we propose to use them together in LUT-based Mealy FSMs. Furthermore, we encode the collections in a way minimizing the number of interconnections between other blocks and the block generating FSM outputs. The proposed approach leads to three-level Mealy FSM circuits with regular systems of interconnections.
We compared the proposed approach with FSM circuits obtained using the Xilinx CAD tool Vivado 2019.1. These circuits were obtained using four different approaches: Auto by Vivado, One-hot by Vivado, JEDI and DEMAIN. The experiments clearly show that the proposed approach leads to reducing the number of LUTs in comparison with FSM circuits produced by other investigated methods. The results of experiments show that the proposed approach leads to reducing the LUT counts from 12% to 59% in average compared with known methods of synthesis of single-level FSMs. Furthermore, our approach provides better LUT counts as compared to methods of synthesis of two-level FSMs (from 9% to 20%). However, our approach leads to slower FSM circuits as compared to other investigated methods. Thus, our approach reduces the overall performance of a digital system including U 4 -based FSMs. So, the proposed method can be used if the LUT count is the dominant characteristic of a digital system.
There are two directions in our future research. The first is connected with development of design methods targeting FPGA chips of Intel (Altera). The second direction targets at EMB-based Mealy FSMs.

Author Contributions

Conceptualization, A.B., L.T. and K.K.; methodology, A.B., L.T. and K.K.; software, A.B., L.T. and K.K.; validation, A.B., L.T. and K.K.; formal analysis, A.B., L.T. and K.K.; investigation, A.B., L.T. and K.K.; writing—original draft preparation, A.B., L.T. and K.K.; supervision, A.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CLBconfigurable logic block
COcollection of output
DSTdirect structure table
EMBembedded memory block
FSMfinite state machine
FPGAfield-programmable gate array
LUTlook-up table
MCUmicroprogram control unit
SBFsystems of Boolean functions
SOPsum-of-products
STTstate transition table

References

  1. Marwedel, P. Embedded System Design: Embedded Systems Foundations of Cyber-Physical Systems, and the Internet of Things, 3rd ed.; Springer: Berlin, Germany, 2018. [Google Scholar]
  2. Barkalov, A.; Titarenko, L.; Andrzejewski, G.; Krzywicki, K.; Kolopienczyk, M. Fault detection variants of the CloudBus protocol for IoT distributed embedded systems. Adv. Electr. Comput. Eng. 2017, 17, 3–10. [Google Scholar] [CrossRef]
  3. Micheli, G.D. Synthesis and Optimization of Digital Circuits; McGraw–Hill: New York, NY, USA, 1994. [Google Scholar]
  4. Bailliul, J.; Samad, T. Encyclopaedia of Systems and Control; Springer: London, UK, 2015. [Google Scholar]
  5. Baranov, S. Logic and System Design of Digital Systems; TUTPress: Tallinn, Estonia, 2008. [Google Scholar]
  6. Minns, P.; Elliot, I. FSM-Based Digital Design Using Verilog HDL; John Wiley and Sons: Hoboken, NJ, USA, 2008. [Google Scholar]
  7. Jiminez, J.J.; Trojman, L.; Procel, L.-M. Power and area reduction of MD5 based on cryptoprocessors using novel approach of internal counters on the finite state machine. In Proceedings of the IEEE Fourth Ecuador Technical Chapter Meeting (ETCM), Guayaquil, Ecuador, 12–15 November 2019; pp. 1–4. [Google Scholar] [CrossRef]
  8. Czerwinski, R.; Kania, D. Finite State Machine Logic Synthesis for Complex Programmable Logic Devices; Lecture Notes in Electrical Engineering; Springer: Berlin, Germany, 2013; Volume 231. [Google Scholar]
  9. Sklyarov, V.; Skliarova, I.; Barkalov, A.; Titarenko, L. Synthesis and Optimization of FPGA-Based Systems; Lecture Notes in Electrical Engineering; Springer: Berlin, Germany, 2014; Volume 294. [Google Scholar]
  10. Intel FPGAs and Programmable Devices. Available online: https://www.intel.pl/content/www/pl/pl/products/programmable.html (accessed on 24 July 2020).
  11. Altera. Cyclone IV Device Handbook. 2020. Available online: http://www.altera.com/literature/hb/cyclone-iv/cyclone4-handbook.pdf (accessed on 24 July 2020).
  12. Xilinx FPGAs. Available online: https://www.xilinx.com/products/silicon-devices/fpga.html (accessed on 24 July 2020).
  13. Vázquez-Castillo, J.; Castillo-Atoche, A.; Carrasco-Alvarez, R.; Longoria-Gandara, O.; Ortegón-Aguilar, J. FPGA-Based Hardware Matrix Inversion Architecture Using Hybrid Piecewise Polynomial Approximation Systolic Cells. Electronics 2020, 9, 182. [Google Scholar] [CrossRef] [Green Version]
  14. Walters, E.G., III. Reduced-Area Constant-Coefficient and Multiple-Constant Multipliers for Xilinx FPGAs with 6-Input LUTs. Electronics 2017, 6, 101. [Google Scholar] [CrossRef] [Green Version]
  15. Agrawal, R.; Ahuja, K.; Hau Hoo, C.; Duy Anh Nguyen, T.; Kumar, A. ParaLarPD: Parallel FPGA Router Using Primal-Dual Sub-Gradient Method. Electronics 2019, 8, 1439. [Google Scholar] [CrossRef] [Green Version]
  16. Grout, I. Digital Systems Design with FPGAs and CPLDs; Elsevier: Amsterdam, The Netherlands, 2011. [Google Scholar]
  17. Scholl, C. Functional Decomposition with Application to FPGA Synthesis; Kluwer Academic Publishers: Boston, MA, USA, 2001. [Google Scholar]
  18. Rawski, M.; Łuba, T.; Jachna, Z.; Tomaszewicz, P. Design of Embedded Control Systems; The Influence of Functional Decomposition Onmodern Digital Design Process; Springer: Boston, MA, USA, 2005; pp. 193–203. [Google Scholar]
  19. Kubica, M.; Kania, D. Technology Mapping Oriented to Adaptive Logic Modules. Bull. Pol. Acad. Sci. 2019, 67, 947–956. [Google Scholar]
  20. Kubica, M.; Kania, D. Decomposition of multi-level functions oriented to configurability of logic blocks. Bull. Pol. Acad. Sci. 2017, 65, 317–331. [Google Scholar]
  21. Mishchenko, A.; Chattarejee, S.; Brayton, R. Improvements to technology mapping for LUT-based FPGAs. IEEE Trans. CAD 2006, 27, 240–253. [Google Scholar]
  22. 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]
  23. Kubica, M.; Kania, D. Area-oriented technologymapping for lut-based logic blocks. Int. J. Appl. Math. Comput. Sci. 2017, 27, 207–222. [Google Scholar] [CrossRef] [Green Version]
  24. Machado, L.; Cortadella, J. Support-Reducing Decomposition for FPGA Mapping. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 2020, 39, 213–224. [Google Scholar] [CrossRef]
  25. Mishchenko, A.; Brayton, R.; Jiang, J.-H.R.; Jang, S. Scalable don’t-care-based logic optimization and resynthesis. ACM Trans. Reconfigurable Technol. Syst. 2011, 4, 1–23. [Google Scholar] [CrossRef]
  26. Feng, W.; Greene, J.; Mishchenko, A. Improving FPGA Performance with a S44 LUT structure. In Proceedings of the 2018 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays (FPGA’18), Monterey, CA, USA, 25–27 February 2018; ACM: New York, NY, USA, 2018; p. 6. [Google Scholar] [CrossRef]
  27. Kilts, S. Advanced FPGA Design: Architecture, Implementation, and Optimization; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2007. [Google Scholar]
  28. Kuon, I.; Tessier, R.; Rose, J. FPGA architecture: Survey and challenges—Found trends. Electr. Des. Autom. 2008, 2, 135–253. [Google Scholar]
  29. McElvain, K. LGSynth93 Benchmark; Mentor Graphics: Wilsonville, OR, USA, 1993. [Google Scholar]
  30. Krzywicki, K.; Barkalov, A.; Andrzejewski, G.; Titarenko, L.; Kolopienczyk, M. SoC research and development platform for distributed embedded systems. Przegląd Elektrotechniczny 2016, 92, 262–265. [Google Scholar] [CrossRef] [Green Version]
  31. Opara, A.; Kubica, M.; Kania, D. Strategy of Logic Synthesis using MTBDD dedicated to FPGA. Integr. Vlsi J. 2018, 62, 142–158. [Google Scholar] [CrossRef]
  32. Kubica, M.; Opara, A.; Kania, D. Logic synthesis for FPGAs based on cutting of BDD. Microprocess. Microsyst. 2017, 52, 173–187. [Google Scholar] [CrossRef]
  33. Brayton, R.; Mishchenko, A. ABC: An Academic Industrial-Strength Verification Tool. In Computer Aided Verification; Touili, T., Cook, B., Jackson, P., Eds.; Springer: Berlin/Heidelberg, Germany, 2010; pp. 24–40. [Google Scholar]
  34. Sentovich, E.M.; Singh, K.J.; Lavagno, L.; Moon, C.; Murgai, R.; Saldanha, A.; Savoj, H.; Stephan, P.R.; Brayton, R.K.; Sangiovanni-Vincentelli, A. SIS: A System for Sequential Circuit Synthesis; Tech. Rep.; University of California: Berkely, CA, USA, 1992. [Google Scholar]
  35. Barkalov, A.; Titarenko, L.; Mielcarek, K.; Chmielewski, S. Logic Synthesis for FPGA-Based Control Units—Structural Decomposition in Logic Design; Lecture Notes in Electrical Engineering; Springer: Berlin, Germany, 2020; Volume 636. [Google Scholar]
  36. Zając, W.; Andrzejewski, G.; Krzywicki, K.; Królikowski, T. Finite State Machine Based Modelling of Discrete Control Algorithm in LAD Diagram Language With Use of New Generation Engineering Software. Procedia Comput. Sci. 2019, 159, 2560–2569. [Google Scholar] [CrossRef]
  37. Salauyou, V.; Ostapczuk, M. State Assignment of Finite-State Machines by Using the Values of Output Variables. In Theory and Applications of Dependable Computer Systems, Proceedings of the DepCoS-RELCOMEX 2020, Brunow, Poland, 29 June–3 July 2020; Zamojski, W., Mazurkiewicz, J., Sugier, J., Walkowiak, T., Kacprzyk, J., Eds.; Advances in Intelligent Systems and Computing; Springer: Cham, Switzerland, 2020; Volume 1173, pp. 543–553. [Google Scholar]
  38. De Micheli, G.; Brayton, R.K.; Sangiovanni-Vincentelli, A. Optimal state assignment for finite statemachines. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 2006, 4, 269–285. [Google Scholar] [CrossRef] [Green Version]
  39. El-Maleh, A.H. A probabilistic pairwise swap search state assignment algorithm for sequential circuit optimization. Integr. Vlsi J. 2017, 56, 32–43. [Google Scholar] [CrossRef]
  40. Klimowicz, A.S.; Solov’ev, V.V. Structural models of finite-state machines for their implementation on programmable logic devices and systems on chip. J. Comput. Syst. Sci. Int. 2015, 54, 230–242. [Google Scholar] [CrossRef]
  41. Machalec, M.; Stastny, J. Synchronous FSM design methodology for Low-Power Smart Sensors and RFID Devices. Electrorevue 2010, 1, 1–9. [Google Scholar]
  42. Sklyarov, V. Synthesis and implementation of RAM-based finite state machines in FPGAs. In International Workshop on Field Programmable Logic and Applications; Springer: Berlin/Heidelberg, Germany, 2000; pp. 718–727. [Google Scholar]
  43. Barkalov, O.; Titarenko, L.; Mielcarek, K. Hardware reduction for lut-based mealy fsms. Int. J. Appl. Math. Comput. Sci. 2018, 28, 595–607. [Google Scholar] [CrossRef] [Green Version]
  44. Rawski, M.; Selvaraj, H.; Łuba, T. An application of functional decomposition in ROM-based FSM implementation in FPGA devices. J. Syst. Archit. 2005, 51, 423–434. [Google Scholar] [CrossRef]
  45. Kołopienczyk, M.; Titarenko, L.; Barkalov, A. Design of emb-based moore fsms. J. Circuits Syst. Comput. 2017, 26, 1–23. [Google Scholar] [CrossRef]
  46. Rafla, N.I.; Gauba, I. A reconfigurable pattern matching hardware implementation using on-chip RAM-based FSM. In Proceedings of the 2010 53rd IEEE International Midwest Symposium on Circuits and Systems, Seattle, WA, USA, 1–4 August 2010; pp. 49–52. [Google Scholar]
  47. Senhadji-Navarro, R.; Garcia-Vargas, I.; Jiménez-Moreno, G.; Civit-Balcells, A.; Guerra-Gutierrez, P. ROM based FSM implementation using input multiplexing in FPGA devices. Electron. Lett. 2004, 40, 1249–1251. [Google Scholar] [CrossRef]
  48. Garcia-Vargas, I.; Senhadji-Navarro, R.; Jiménez-Moreno, G.; Civit-Balcells, A.; Guerra-Gutierrez, P. ROM-based finite state machine implementation in low cost FPGAs. In Proceedings of the IEEE International Symposium on Industrial Electronics ISIE 2007, Vigo, Spain, 4–7 June 2007; IEEE: Piscataway, NJ, USA, 2007; pp. 2342–2347. [Google Scholar]
  49. Senhadji-Navaro, R.; Garcia-Vargas, I. High-Speed and Area-Efficient Reconfigurable Multiplexer Bank for RAM-Based Finite State Machine Implementations. J. Circuits Syst. Comput. 2015, 24, 1550101. [Google Scholar] [CrossRef]
  50. Klimovich, A.S.; Solov’ev, V.V. Minimization of mealy finite-state machines by internal states gluing. J. Comput. Syst. Sci. Int. 2012, 51, 244–255. [Google Scholar] [CrossRef]
  51. Barkalov, A.; Titarenko, L.; Mazurkiewicz, M.; Krzywicki, K. Encoding of terms in EMB-based Mealy FSMs. Appl. Sci. 2020, 10, 2762. [Google Scholar] [CrossRef]
  52. Barkalov, A.; Titarenko, L.; Barkalov, A., Jr. Structural decomposition as a tool for the optimization of an FPGA-based implementation of a Mealy FSM. Cybern. Syst. Anal. 2012, 48, 313–322. [Google Scholar] [CrossRef]
  53. Testa, E.; Amaru, L.; Soeken, M.; Mishchenko, A.; Vuillod, P.; Luo, J.; Casares, C.; Gaillardon, P.; Micheli, G.D. Scalable boolean methods in a modern synthesis flow. In Proceedings of the 2019 Design, Automation Test in Europe Conference Exhibition (DATE), Florence, Italy, 25–29 March 2019; pp. 1643–1648. [Google Scholar]
  54. Selvaraj, H.; Nowicka, M.; Luba, T. Non-Disjoint Decomposition Strategy in Decomposition-Based Algorithms & Tools. In Proceedings of the International Conference on Computational Intelligence and Multimedia Application, Melbourne, Australia, 9–11 February 1998; pp. 34–42. [Google Scholar]
  55. Michalski, T.; Kokosiński, Z. Functional decomposition of combinational logic circuits with PKmin. Czas. Tech. 2016, 2016, 191–202. [Google Scholar]
  56. Xilinx. XST UserGuide.V. 11.3. Available online: https://www.xilinx.com/support/documentation/sw_manuals/xilinx11/xst.pdf (accessed on 24 July 2020).
  57. Vivado. Available online: https://www.xilinx.com/products/design-tools/vivado.html (accessed on 24 July 2020).
  58. Quartus Prime. 2020. Available online: https://www.intel.pl/content/www/pl/pl/software/programmable/quartus-prime/overview.html (accessed on 24 July 2020).
  59. Senhadji-Navarro, R.; Garcia-Vargas, I. High-Performance Architecture for Binary-Tree-Based Finite State Machines. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 2018, 37, 796–805. [Google Scholar] [CrossRef] [Green Version]
  60. Garcia-Vargas, I.; Senhadji-Navarro, R. Finite state machines with input multiplexing: A performance study. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 2015, 34, 867–871. [Google Scholar] [CrossRef]
  61. Sass, R.; Schmidt, A. Embedded System Design with platform FPGAs: Principles and Practices; Morgan Kaufmann Publishers: Amsterdam, The Netherlands, 2010. [Google Scholar]
  62. Dahl, O.; Dijkstra, E.; Hoare, C. Structured Programming; Academic Press: London, UK, 1972. [Google Scholar]
  63. Wilkes, M.; Stringer, J. Microprogramming and the design of the control circuits in an electronic digital computer. In Proceedings of Cambridge Philosophical Society; Cambridge University Press: Cambridge, UK, 1953; Volume 49, pp. 230–238. [Google Scholar]
  64. Baranov, S. Logic Synthesis of Control Automata; Kluwer Academic Publishers: Berlin, Germany, 1994. [Google Scholar]
  65. Vivado Design Suite User Guide: Synthesis; UG901 (v2019.1); Xilinx, Inc.: San Jose, CA, USA, 2019.
  66. VC709 Evaluation Board for the Virtex-7 FPGA User Guide; UG887 (v1.6); Xilinx, Inc.: San Jose, CA, USA, 2019.
Figure 1. Structural diagram of LUT-based Mealy FSM U 1 .
Figure 1. Structural diagram of LUT-based Mealy FSM U 1 .
Applsci 10 05115 g001
Figure 2. Structural diagram of FSM U 2 .
Figure 2. Structural diagram of FSM U 2 .
Applsci 10 05115 g002
Figure 3. Structural diagram of FSM U 3 .
Figure 3. Structural diagram of FSM U 3 .
Applsci 10 05115 g003
Figure 4. Structural diagram of Mealy FSM U 4 .
Figure 4. Structural diagram of Mealy FSM U 4 .
Applsci 10 05115 g004
Figure 5. State codes of Mealy FSM U 4 ( S 1 ) .
Figure 5. State codes of Mealy FSM U 4 ( S 1 ) .
Applsci 10 05115 g005
Figure 6. Codes of COs of Mealy FSM U 4 ( S 1 ) .
Figure 6. Codes of COs of Mealy FSM U 4 ( S 1 ) .
Applsci 10 05115 g006
Figure 7. Experimental results (the number of LUTs—total percentage).
Figure 7. Experimental results (the number of LUTs—total percentage).
Applsci 10 05115 g007
Figure 8. Experimental results (the operating frequency—total percentage).
Figure 8. Experimental results (the operating frequency—total percentage).
Applsci 10 05115 g008
Figure 9. Experimental results for category 0 (the number of LUTs—total percentage).
Figure 9. Experimental results for category 0 (the number of LUTs—total percentage).
Applsci 10 05115 g009
Figure 10. Experimental results for category 1 (the number of LUTs—total percentage).
Figure 10. Experimental results for category 1 (the number of LUTs—total percentage).
Applsci 10 05115 g010
Figure 11. Experimental results for categories 2–4 (the number of LUTs—total percentage).
Figure 11. Experimental results for categories 2–4 (the number of LUTs—total percentage).
Applsci 10 05115 g011
Figure 12. Structural diagrams of LUT-based Mealy FSMs with two-levels of logic: (a) replacement of inputs; (b) encoding of collections of outputs; (c) transformation of state codes into outputs; (d) transformation of collections of outputs into state codes.
Figure 12. Structural diagrams of LUT-based Mealy FSMs with two-levels of logic: (a) replacement of inputs; (b) encoding of collections of outputs; (c) transformation of state codes into outputs; (d) transformation of collections of outputs into state codes.
Applsci 10 05115 g012
Figure 13. Comparison diagrams of our approach with two-level FSMs.
Figure 13. Comparison diagrams of our approach with two-level FSMs.
Applsci 10 05115 g013
Table 1. STT of Mealy FSM S 1 .
Table 1. STT of Mealy FSM S 1 .
a m a s X h Y h h
a 1 a 2 x 1 y 1 y 7 1
a 3 x 1 ¯ y 2 y 6 2
a 2 a 4 x 2 y 5 3
a 4 x 2 ¯ x 3 y 2 y 6 4
a 5 x 2 ¯ x 3 ¯ y 1 y 4 y 6 5
a 3 a 2 x 4 y 2 y 3 6
a 5 x 4 ¯ x 5 y 1 y 7 7
a 6 x 4 ¯ x 5 ¯ y 4 y 6 8
a 4 a 5 1 y 5 9
a 5 a 2 x 3 x 6 y 2 10
a 3 x 3 x 6 ¯ y 3 y 4 11
a 6 x 3 ¯ x 7 y 2 y 6 12
a 1 x 3 ¯ x 7 ¯ y 5 y 7 13
a 6 a 4 x 8 y 2 14
a 1 x 8 ¯ 15
Table 2. Replacement of inputs.
Table 2. Replacement of inputs.
a m a 1 a 2 a 3 a 4 a 5 a 6
p g
p 1 x 1 x 2 x 6
p 2 x 3 x 4 x 3
p 3 x 5 x 7 x 8
Table 3. Direct structure table of Mealy FSM U 4 ( S 1 ) .
Table 3. Direct structure table of Mealy FSM U 4 ( S 1 ) .
a m K ( a m ) a s K ( a s ) P h Z h Φ h h
a 1 000 a 2 010 p 1 z 2 D 2 1
a 3 110 p 1 ¯ z 1 z 4 D 1 D 2 2
a 2 010 a 4 001 p 1 z 2 z 3 D 3 3
a 4 001 p 1 ¯ p 2 z 1 z 4 D 3 4
a 5 011 p 1 ¯ p 2 ¯ z 2 z 4 D 2 D 3 5
a 3 110 a 2 010 p 2 z 1 z 2 z 3 D 2 6
a 5 011 p 2 ¯ p 3 z 2 D 2 D 3 7
a 6 100 p 2 ¯ p 3 ¯ z 4 D 1 8
a 4 001 a 5 0111 z 2 z 3 D 2 D 3 9
a 5 011 a 2 010 p 2 p 1 z 1 z 3 D 2 10
a 3 110 p 2 p 1 ¯ z 3 z 4 D 1 D 2 11
a 6 100 p 2 ¯ p 3 z 1 z 4 D 1 12
a 1 000 p 2 ¯ p 3 ¯ z 3 13
a 6 100 a 4 001 p 3 z 1 z 3 D 3 14
a 1 000 p 3 ¯ 15
Table 4. Characteristics of Mealy FSM benchmarks.
Table 4. Characteristics of Mealy FSM benchmarks.
BenchmarkLNR+LM/RHCategory
bbara42812/4601
bbsse771226/5561
bbtas2269/4240
beecount34710/4281
cse771232/5911
dk1435826/5561
dk1535817/5321
dk1623975/71081
dk1723616/4320
dk2712510/4140
dk51213624/5150
donfile21724/5961
ex19191680/71382
ex222725/5721
ex322614/4360
ex4691118/5211
ex522616/4320
ex658914/4341
ex7221217/5361
keyb771222/51701
kirkman1261848/63702
lion2155/3110
lion921611/4250
mark15161022/5221
mc3568/3100
modulo1211512/4240
opus561018/5221
planet7191486/71152
planet17191486/71152
pma881449/6732
s1871454/61062
s148881915112/72512
s149481915118/72502
s1a861586/71072
s2081121737/61532
s2741811/4341
s386771223/5641
s42019227137/81374
s51019727172/8774
s841815/4201
s82018192578/72324
s83218192576/72454
sand1191888/71843
shiftreg11516/4160
sse771226/5561
styr9101667/71662
tma791363/6442
Table 5. Experimental results (the number of LUTs).
Table 5. Experimental results (the number of LUTs).
BenchmarkAutoOne-HotJEDIDEMAINOur ApproachCategory
bbara1717109101
bbsse33372426261
bbtas555580
beecount19191416141
cse40663638331
dk1410271012121
dk155165661
dk1615341214111
dk175125680
dk27354470
dk5121010910120
donfile31312226211
ex170745357402
ex2998981
ex39999110
ex415131213111
ex59999100
ex624362223211
ex7454461
keyb43614042371
kirkman42583941332
lion252260
lion96115580
mark123232021191
mc474560
modulo12777790
opus28282226211
planet1311318894782
planet11311318894782
pma94948691722
s165996164542
s1488124131108112892
s1494126132110117902
s1a49814354382
s2081231101192
s276186661
s38626392225201
s420103191084
s51048483239224
s8999991
s82088826876524
s83280796270504
sand132132114121993
shiftreg262240
sse33373032261
styr931208188702
tma45393941302
Total17922104148016011318
Percentage,%135.96159.63112.29121.47100
Table 6. Experimental results (the operating frequency, MHz).
Table 6. Experimental results (the operating frequency, MHz).
BenchmarkAutoOne-HotJEDIDEMAINOur ApproachCategory
bbara193.39193.39212.21198.46183.321
bbsse157.06169.12182.34178.91159.241
bbtas204.16204.16206.12208.32194.430
beecount166.61166.61187.32184.21156.721
cse146.43163.64178.12174.19153.241
dk14191.64172.65193.85187.32162.781
dk15192.53185.36194.87188.54175.421
dk16169.72174.79197.13189.83164.161
dk17199.28167199.39172.19147.220
dk27206.02201.9204.18205.10181.730
dk512196.27196.27199.75197.49175.630
donfile184.03184.00203.65194.83174.281
ex1150.94139.76176.87186.14164.322
ex2198.57198.57200.14199.75188.951
ex3194.86194.86195.76193.43174.440
ex4180.96177.71192.83178.14168.391
ex5180.25180.25181.16181.76162.560
ex6169.57163.80176.59174.12156.421
ex7200.04200.84200.6200.32191.431
keyb156.45143.47168.43157.16136.491
kirkman141.38154156.68143.76155.362
lion202.43204202.35201.32185.740
lion9205.3185.22206.38205.86167.280
mark1162.39162.39176.18169.65153.481
mc196.66195.47196.87192.53178.020
modulo12207207207.13207.37189.70
opus166.2166.2178.32168.79157.421
planet132.71132.71187.14185.73174.682
planet1132.71132.71187.14185.73173.292
pma146.18146.18169.83153.57156.122
s1146.41135.85157.16149.17145.322
s1488138.5131.94157.18153.12141.272
s1494149.39145.75164.34159.42155.632
s1a153.37176.4169.17158.12166.362
s208174.34176.46178.76172.87166.422
s27198.73191.5199.13198.43185.151
s386168.15173.46179.15169.21164.651
s420173.88176.46177.25172.87186.354
s510177.65177.65198.32183.18199.054
s8180.02178.95181.23180.39168.321
s820152153.16176.58166.29175.694
s832145.71153.23173.78160.03174.394
sand115.97115.97126.82120.63120.073
shiftreg262.67263.57276.26276.14248.790
sse157.06169.12174.63169.69158.141
styr137.61129.92145.64138.83118.022
tma163.88147.8164.14168.19137.482
Total8127.088061.228718.878461.17917.1
Percentage, %102.65101.82110.13106.87100
Table 7. Experimental results for category 0 (the number of LUTs).
Table 7. Experimental results for category 0 (the number of LUTs).
BenchmarkAutoOne-HotJEDIDEMAINOur ApproachCategory
bbtas555580
dk175125680
dk27354470
dk5121010910120
ex39999110
ex59999100
lion252260
lion96115580
mc474560
modulo12777790
shiftreg262240
Total6286616489
Percentage,%69.6696.6368.5471.91100
Table 8. Experimental results for category 1 (the number of LUTs).
Table 8. Experimental results for category 1 (the number of LUTs).
BenchmarkAutoOne-HotJEDIDEMAINOur ApproachCategory
bbara1717109101
bbsse33372426261
beecount19191416141
cse40663638331
dk1410271012121
dk155165661
dk1615341214111
donfile31312226211
ex2998981
ex415131213111
ex624362223211
ex7454461
keyb43614042371
mark123232021191
opus28282226211
s276186661
s38626392225201
s8999991
sse33373032261
Total390525328357317
Percentage,%123.03165.62103.47112.62100
Table 9. Experimental results for categories 2-4 (the number of LUTs).
Table 9. Experimental results for categories 2-4 (the number of LUTs).
BenchmarkAutoOne-HotJEDIDEMAINOur ApproachCategory
ex170745357402
kirkman42583941332
planet1311318894782
planet11311318894782
pma94948691722
s165996164542
s1488124131108112892
s1494126132110117902
s1a49814354382
s2081231101192
styr931208188702
tma45393941302
sand132132114121993
s420103191084
s51048483239224
s82088826876524
s83280796270504
Total1340149310911180912
Percentage,%146.93163.71119.63129.39100
Table 10. Comparison of our approach with two-level FSMs.
Table 10. Comparison of our approach with two-level FSMs.
Benchmark U 5 U 6 U 7 U 8 Our ApproachCategory
ex151495246402
kirkman38374037332
planet86808882782
planet186808882782
pma84889076722
s160586258542
s148898908794892
s14941019910496902
s1a42444642382
s2081112111192
styr79768072702
tma40374238302
sand119109124108993
s4201011111084
s51035303728224
s82067647061524
s83261576454504
Total108610211096995912
Percentage,%117.11111.95120.18109.10100

Share and Cite

MDPI and ACS Style

Barkalov, A.; Titarenko, L.; Krzywicki, K. Reducing LUT Count for FPGA-Based Mealy FSMs. Appl. Sci. 2020, 10, 5115. https://doi.org/10.3390/app10155115

AMA Style

Barkalov A, Titarenko L, Krzywicki K. Reducing LUT Count for FPGA-Based Mealy FSMs. Applied Sciences. 2020; 10(15):5115. https://doi.org/10.3390/app10155115

Chicago/Turabian Style

Barkalov, Alexander, Larysa Titarenko, and Kazimierz Krzywicki. 2020. "Reducing LUT Count for FPGA-Based Mealy FSMs" Applied Sciences 10, no. 15: 5115. https://doi.org/10.3390/app10155115

APA Style

Barkalov, A., Titarenko, L., & Krzywicki, K. (2020). Reducing LUT Count for FPGA-Based Mealy FSMs. Applied Sciences, 10(15), 5115. https://doi.org/10.3390/app10155115

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop