# Transforming Group Codes in Mealy Finite State Machines with Composite State Codes
## 4 The Main Idea of the Proposed Method  
In this paper, we propose a method aimed at the relocation of group variables from \(LUTerY\tau\) to blocks from the first logic level. This diminishes the number of arguments in functions \(f_{i}\in D\cup Y\). In turn, this increases the probability of obtaining a single-level circuit for the block \(LUTerY\tau\). We propose encoding the groups \(G^{k}\in\Pi_{AC}\) using one-hot codes. The states are still encoded by maximum binary partial codes. Now, the groups are encoded using the elements of the set \(\tau_{0}=\{g_{1},\dots,g_{KC}\}\). These variables enter the blocks \(LUTer1\)-\(LUTerKC\). This means that the variable \(g_{k}\in\tau_{0}\) determines a literal used by all the PBFs generated by the LUTs of the block \(LUTerk\). This method is focused on a situation where a single-level implementation of the function assembler circuit is impossible. Now, the variables determining the one-hot group codes should enter the LUTs of the blocks \(LUTer1\)-\(LUTerKC\). This leads to a change in equations for both PBFs and full functions. Now, the LUTs of the first logic level generate the following SBFs:  
\[D^{k}=D^{k}(g_{k},\tau_{S},X^{k}); \tag{17}\]  
\[Y^{k}=Y^{k}(g_{k},\tau_{S},X^{k}). \tag{18}\]  
Figure 2: Architecture of CSC-based FSM \(U_{2}\). In this case, there are no connections between the group codes and LUTs of \(LUTerY\tau\). This leads to the following SBFs representing the function assembler:  
\[D=D(D^{1},\ldots,D^{KC}); \tag{19}\]  
\[Y=Y(Y^{1},\ldots,Y^{KC}). \tag{20}\]  
Now, the IMFs in (19) are used to create the composite state codes. In these codes, groups are represented by maximum binary codes. To create the one-hot group codes, it is necessary to transform these maximum group codes into their one-hot equivalents. The transformation is executed by an additional code transformer block. The code transformer generates the following system of functions:  
\[\tau_{0}=\tau_{0}(\tau_{G}). \tag{21}\]  
We name the resulting state codes mixed composite state codes (MCSCs). The term \"mixed\" means that the groups are represented by OHCs and the partial state codes are maximum codes. The proposed approach leads to the development of the MCSC-based Mealy FSM \(U_{3}\). Its architecture is shown in Figure 3.  
In an MCSC-based FSM, SBFs (17) and (18) are generated by the LUTs of the first logic level. These LUTs create the blocks \(LUTerk(k\in\{1,\ldots,KC\})\). The LUTs of block \(LUTerY\tau\) generate the final values of the FSM outputs \(y_{n}\in Y\) and input memory functions. The block \(LUTerOH\) generates the SBF (21). As a result, one-hot group codes are created. The block \(LUTerY\tau\) includes the hidden state code register. This register is controlled by IMFs, together with signals \(Start\) and \(Clock\). Obviously, the equivalent FSMs \(U_{2}\) and \(U_{3}\) have the same amount of flip-flops in the RG. The outputs of the RG are variables from the set \(\tau=\tau_{G}\cup\tau_{S}\). The block \(LUTerOH\) is a code transformer. It turns maximum binary group codes into the corresponding one-hot group codes. This block is based on an SBF (21). To create the partition \(\Pi_{AC}\), we use the greedy algorithm proposed in [34]. The compatible states are found using condition (10). As follows from Equations (17) and (18), it is necessary to reserve one of LUT inputs for a corresponding one-hot group variable. Obviously, this can lead to the necessity of using more than a single basic LUT for implementing a circuit for a partial Boolean function. So, it is possible that more LUTs would be necessary on the first logic level than there are for the equivalent FSM \(U_{2}\). Figure 3: Architecture of MCSC-based Mealy FSM \(U_{3}\). Let, for each group, \(G^{k}\in\Pi_{AC}\), the SOP of any partial function, \(f^{k}_{i}\in D^{k}\cup\gamma^{k}\), depend on \(ML^{k}_{i}\) literals.