Next Article in Journal
A Novel Model for Accurate Daily Urban Gas Load Prediction Using Genetic Algorithms
Next Article in Special Issue
Evolutionary Optimization for the Classification of Small Molecules Regulating the Circadian Rhythm Period: A Reliable Assessment
Previous Article in Journal
A Novel Connected-Components Algorithm for 2D Binarized Images
Previous Article in Special Issue
A Multi-Objective Bio-Inspired Optimization for Voice Disorders Detection: A Comparative Study
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Generation of Synthesisable Hardware Description Language Code of Multi-Sequence Detector Using Grammatical Evolution

by
Bilal Majeed
1,*,†,
Rajkumar Sarma
1,
Ayman Youssef
2,
Douglas Mota Dias
3 and
Conor Ryan
1,*
1
BDS Labs, Department of CSIS, University of Limerick, V94 T9PX Limerick, Ireland
2
Department of Computers and Systems, Electronics Research Institute, Cairo 12622, Egypt
3
Department of Computer Science & Applied Physics, Atlantic Technological University, H91 T8NW Galway, Ireland
*
Authors to whom correspondence should be addressed.
Current address: T2-029, Lero, Tierney Building, University of Limerick, V94 NYD3 Limerick, Ireland.
Algorithms 2025, 18(6), 345; https://doi.org/10.3390/a18060345
Submission received: 18 March 2025 / Revised: 9 May 2025 / Accepted: 13 May 2025 / Published: 5 June 2025

Abstract

:
Quickly designing digital circuits that are both correct and efficient poses significant challenges. Electronics, especially those incorporating sequential logic circuits, are complex to design and test. While Electronic Design Automation (EDA) tools aid designers, they do not fully automate the creation of synthesisable circuits that can be directly translated into hardware. This paper introduces a system that employs Grammatical Evolution (GE) to automatically generate synthesisable Hardware Description Language (HDL) code for the Finite State Machine (FSM) of a Multi-Sequence Detector (MSD). This MSD differs significantly from prior work as it can detect multiple sequences in contrast to the single-sequence detectors discussed in existing literature. Sequence Detectors (SDs) are essential in circuits that detect sequences of specific events to produce timely alerts. The proposed MSD applies to a real-time vending machine scenario, enabling customer selections upon successful payment. However, this technique can evolve any MSD, such as a traffic light control system or a robot navigation system. We examine two parent selection techniques, Tournament Selection (TS) and Lexicase Selection (LS), demonstrating that LS performs better than TS, although both techniques successfully produce synthesisable hardware solutions. Both hand-crafted “Gold” and evolved circuits are synthesised using Generic Process Design Kit (GPDK) technologies at 45 nm, 90 nm, and 180 nm scales, demonstrating their efficacy.

1. Introduction

Designing digital circuits to meet specific requirements is a challenging task that demands significant effort from designers. This process is often time-consuming, and achieving an optimal design is not always guaranteed. To aid designers, EDA tools are used to enhance efficiency and produce more optimised circuits [1]. Some EDA tools incorporate Machine Learning (ML) techniques [2] or other forms of artificial intelligence [3,4] to assist in circuit design. However, current tools do not typically employ Evolutionary Algorithms (EA) to generate various circuit design solutions.
EAs are search-based techniques inspired by Darwinian evolutionary principles. They apply crossover and mutation, each with a set probability, to evolve toward an optimal solution for the given problem, mimicking natural selection to gradually enhance solution quality. The concept of genetic search was introduced by Alan Turing in 1948 [5]. Since then, the field of EAs has grown extensively, with applications in areas such as symbolic regression [6] and circuit design [7]. Prominent EA methodologies include Genetic Algorithms (GAs) [8], Genetic Programming (GP) [9], GE [10], and Evolutionary Strategies (ES) [11].
Evolvable Hardware (EH) refers to using EAs to evolve electronic circuits or their components. EH can be categorised into intrinsic and extrinsic evolution. Intrinsic evolution involves using hardware, such as Field Programmable Gate Arrays (FPGAs), to evolve and test solutions directly on the hardware in real time [12]. In contrast, extrinsic evolution relies on simulation tools to evolve and test circuits solely in a computer environment [13].
FPGAs are used to prototype digital circuits, which are specified at design time using HDLs, such as Very High-Speed Integrated Circuit HDL (VHSIC HDL or VHDL), Verilog, and SystemVerilog (SV), to describe circuit behaviour at different levels of abstraction. These languages enable designers to define circuits at both the gate level, using Boolean equations, and at the behavioural level, which is closer to high-level programming and includes constructs like loops and conditionals. The synthesis process then translates these descriptions into a gate-level netlist, which serves as the blueprint for physical implementation.
Digital sequential circuits, which differ from digital combinational circuits (detailed in Section 2) in their ability to store and manage state information, are critical in complex digital systems. These circuits are modelled using FSMs, which help represent the data flow and state transitions based on inputs. FSMs can be classified into two main types: Mealy machines and Moore machines (detailed in Section 2). In this work, we have evolved the MSD as a Mealy machine (shown in Figure 1) due to its ability to be highly responsive.
To the authors’ knowledge, no such MSD has been evolved in the literature using the evolutionary technique used in this work. As discussed in Section 4.1, GE is utilised to evolve this MSD and generate automatic HDL solutions. GE, a variant of GP that creates programs or expressions in virtually any syntax, uses context-free Backus–Naur Form (BNF) grammars for genotype-to-phenotype mapping. BNF is a formal notation used to describe the syntax of programming languages and data structures. It consists of production rules that define how non-terminal symbols can be expanded into sequences of terminal symbols and other non-terminals. More detail is given in Section 4.1.
These grammars allow the specification of rules that guide the evolution process. GE has been highly successful in various applications, including symbolic regression [14], classification [15], and particularly in automatic circuit design, whether combinational [16] or sequential [17], making it an ideal choice for this study. The decision to use behavioural-level HDL code instead of gate-level code for evolving this MSD is based on the recommendation for complex circuits [18] and its ability to evolve complex designs from the abstract level. Behavioural-level code is more straightforward to interpret [19] yet more challenging to evolve [20] due to its complex structures, such as if–else conditions and for loops.
MSDs are specialised sequential circuits that detect specific binary sequences, making them crucial in applications where sequence detection is critical, such as avionics and control systems. GE’s use in evolving these circuits allows for the automatic generation of HDL solutions, particularly at the behavioural level. Due to its complex structures, HDL code is easier to interpret but more challenging to evolve.
This study demonstrates the practical application of this approach through a case study involving a vending machine, which requires effective state management for tasks like product selection and payment processing. While the specific application in this paper is that of vending machines, the technique can be applied to any MSD, such as those commonly found in traffic light control systems [21], elevator control systems [22], robot navigation systems [23], and TCP/IP communication protocols [24].
By evolving the HDL code for a Mealy FSM-based Gold MSD, which acts as a benchmark circuit, the research compares different parent selection techniques and verifies the synthesisability of the evolved designs. A Mealy machine is a type of FSM where the output depends on both the current state and the current input (detail in Section 2). This work contributes to the field by exploring well-established methods for automatic circuit design in the context of evolving complex sequential circuits, such as MSD, using behavioural-level HDL.
The main contributions of this work are summarised as follows:
  • We propose a GE-based approach to evolve SV code for solution circuits representing the FSM of a single-input, multi-output MSD, mapped to a real-life vending machine.
  • We provide a theoretical analysis showing that prior work focuses only on single-input, single-output, single-sequence detectors, and no existing work addresses the evolution of FSMs of this complexity.
  • We conduct extensive experiments demonstrating that GE combined with LS and TS can effectively generate solution circuits for such real-world problems. However, LS performs better than TS in terms of time and computational resources.
  • Although GE, LS, and TS are well-established techniques, the novelty of this work is reflected by putting them all together to evolve the solution circuits of real-life complex FSMs.
  • We show that the evolved solution circuits are synthesisable, and their synthesis reports outperform those of manually designed circuits.
The organisation of this paper is as follows: Section 2 gives a detailed background on all the technical aspects used. Section 3 provides a literature survey on the evolution of digital circuits. Section 4 introduces GE and details the parent selection techniques employed in this study. Section 5 describes the process of generating training and test datasets necessary for the proposed work. Section 6 presents the experiments and results. Section 7 shows one of the perfectly evolved FSMs and compares it with a human-made FSM. Section 8 shows and compares the synthesis of the Gold and evolved solutions, highlighting the performance differences between human-designed and machine-generated solutions. Finally, Section 9 concludes the paper and discusses future directions in this field of research.

2. Background

HDLs are programming languages that describe digital circuits at the gate or behavioural (algorithmic) level. In gate-level descriptions, the circuit’s architecture is defined using Boolean equations. In contrast, at the behavioural level, circuits are described using a high-level language similar to C, which includes constructs such as loops and if–else conditionals. Since we are working on the evolution of an FSM, no loops are used in this work, only conditionals, as the loops have no use here. Describing a circuit at the behavioural level significantly reduces the programmer’s effort. The most widely used HDL standards are VHDL [25] and Verilog HDL [26]. SV [27], employed in this work to design and evolve sequential circuits, is an extension of Verilog HDL that enhances verification capabilities, earning it the designation of Hardware Verification Language (HVL) and an HDL.
Once a circuit’s design is complete and its logical correctness verified through simulation, the next phase is logic synthesis. This process converts the HDL code into a netlist, which defines the circuit at the gate level using Boolean equations or registers. The netlist acts as a blueprint for constructing the circuit’s logical structure. Tools like Cadence Genus [28] are used to optimise the synthesised design to meet specific criteria, including area, power consumption, system delay, and overall performance, based on predefined specifications such as operating temperature and transistor sizes targeting particular fabrication technologies.
However, even if a circuit passes simulation, physically constructing the chip might not be possible. This can occur if the netlist cannot be generated, often due to combining synthesisable and non-synthesisable constructs. For instance, loops in hardware must have known boundaries at compile time, even though they do not need them at simulation time. When loops have variable or non-static bounds, they cannot be synthesised. If we take the example of a for loop, the code will not be synthesised if the value of N is not known in for (i = 0; i < N; i = i + 1) at the synthesis time.
Digital circuits are broadly classified into two types: combinational circuits and sequential circuits. Combinational circuits produce outputs solely based on the current inputs, without memory of past inputs. In contrast, sequential circuits include memory elements that store information about the system’s current state, making the output dependent on both the current state and the current input. Examples of basic sequential circuits include the JK Flip-Flop and the Up–Down Counter. Sequential circuits can be effectively modelled using FSMs. Because the output of a sequential circuit depends on its current state, FSMs are powerful tools for representing the data flow in terms of state transitions based on the inputs and the system’s current state [29].
There are two primary types of FSMs: Mealy machines and Moore machines. In both types, the next state is determined by the system’s current state and the circuit input. However, the critical difference lies in how the output is generated. In a Mealy machine, the output depends on the current state and input. In contrast, in a Moore machine, the output depends only on the current state. In this work, we are evolving the circuit based on Mealy FSM shown in Figure 1. We use Mealy machines because they respond quickly and typically require one state fewer than Moore machines, saving both time and hardware resources. However, Mealy machines can propagate transient input glitches—short, unintended signal fluctuations in a digital circuit—directly to the output if present. This is a trade-off we accept to achieve a high-speed and efficient system.
SDs vary in complexity depending on their size and features. As the name suggests, SDs detect specific binary sequences, such as ‘110011’, and produce the desired output upon successful detection. They play crucial roles in real-time critical systems, such as avionics, where detecting a series of events in the correct order is essential. These systems must be highly responsive, meticulously designed, and thoroughly tested under all possible conditions to ensure they do not fail to generate necessary alarms.
This work proposes evolving behavioural-level HDL code using GE for a single-input, multi-output MSD. MSD is crucial in designing complex systems that require multiple states and transitions based on varying inputs. They are used in various applications where state management is critical, such as digital systems, embedded systems, and communication protocols. Speaking of their real-world applications, MSDs are fundamental in designing control systems for machinery, robotics, and other automated processes. Their ability to manage multiple states and transitions makes them suitable for real-time systems where efficient state management is crucial.
We apply this work to a real-life vending machine scenario, which provides a concrete example of how MSDs can be applied in real-world systems. Vending machines involve state management for product selection, payment processing, and item dispensing, making them an ideal test case for MSD designs. Moreover, the vending machine example highlights the complexity involved in real-world applications. It shows how MSDs can handle various states and transitions required to process inputs and provide outputs, demonstrating the practical value of evolving synthesisable HDL codes for such systems.
The Mealy FSM for the Gold MSD, representing a human-designed target circuit, is shown in Figure 1. “Gold” refers to the benchmark circuit the evolutionary system aims to achieve. This MSD can identify two distinct sequences, process a single 1-bit input, and produce two 1-bit outputs each clock cycle. The system starts at state S0 after a reset or upon waking from its idle state. The customer can choose between water and a carbonated drink. If the customer selects water (binary input ‘0’), the machine transitions to state S1 (labelled ‘W’). Conversely, if the carbonated drink is selected (binary input ‘1’), the system moves to state S2 (labelled ‘F’). After this selection, the system waits for payment. If the payment is incomplete within a specified time, the product is not dispensed, and the system resets to S0. We are assuming that the water costs EUR 1, while the carbonated drink costs EUR 1.50, with the system accepting only EUR 0.50 (binary input ‘0’) and EUR 1 (binary input ‘1’) coins.
In state S1, if the system receives EUR 1, it returns to S0, and the first output (leftmost) turns ‘1’, indicating full payment and dispensing the water. However, if only EUR 0.50 is received, the system transitions to S3, keeping both outputs at ‘0’ to indicate that additional payment is required. If another EUR 0.50 is received at S3, the system returns to S0, setting the first output to ‘1’ to confirm full payment. If EUR 1 is received at S3, the system resets to S0 but also sets the rightmost output to ‘1’, indicating that EUR 0.50 must be returned to the customer. For S2, the system transitions through states S4 and S5, eventually returning to S0 if three consecutive EUR 0.50 coins are inserted. If a EUR 1 coin is inserted at any point, the system bypasses certain states and returns to S0, providing appropriate outputs for payment processing and correct change. Note that in any given transaction, the maximum return possible is EUR 0.50.
As discussed above and shown in Figure 1, from any stage, there are two possible transitions: one dependent on input ‘1’ and the other on input ‘0’. If, at any stage, the system does not receive any input—neither ‘1’ nor ‘0’—it remains in the same state and outputs ‘0’ for both product delivery and return change. An example of such a transition in the SV code of the human-designed FSM is shown in Figure 2 (full code given in Supplementary Material (SM), https://github.com/bmmajeed/MSD_VendingMachine (accessed on 2 June 2025), where the section’s condition over the code responsible for this behaviour is highlighted in blue. These transitions are not explicitly shown in Figure 1 to prevent the diagram from becoming overly complex. However, in Section 7, it will be shown how these transitions affect the system’s output, as the assignments within this else block are subject to evolution. Although the structure of the FSM is hardcoded, the system retains full flexibility to evolve all the assignments in the code.

3. Related Work

The origins of EH can be traced back to 1985 when Fourman et al. used GA to create compact symbolic circuit layouts [30], although the term “EH” was not used then. Subsequent studies, such as those by Cohoon et al. [31] and Kling et al. [32], employed GAs to optimally place components on circuit boards. In 1992, Koza [9] pioneered the use of GP to develop complete circuits at the gate level. This involved a decomposition method where an 11-to-1 multiplexer was evolved using two 6-to-1 multiplexers, which evolved from 3-to-1 multiplexers. The term “EH” was first introduced by [33] in 1993, marking a significant step towards the practical implementation of the “Darwin Machine” [34], where combinational circuits were evolved.
Considerable research has been conducted on the evolution of combinational circuits using various methods, including ES [35], Cartesian Genetic Programming (CGP) [36], and GE [16,37,38]. While significant work has been conducted on the evolution of FSMs or Deterministic Finite Automata (DFAs) [39,40,41,42], there has been less research on evolving sequential circuits, explicitly from the perspective of FSMs [43,44,45,46]. Notable examples include [47] and [17], where single-input, single-output SDs were evolved.
Ali et al. presented the first automatic solution for gate-level SD evolution using GA in 2004 [48]. They evolved a 4-bit SD (‘1010’) and a 6-bit SD (‘011011’) through a multi-stage evolutionary process, which was resource-intensive and did not directly produce the final solutions. The 6-bit SD combined two 3-bit SDs (‘011’). The same circuits were re-evolved using GA, achieving more optimised solutions with reduced computational cost [49].
In 2007, Yao et al. evolved a 3-bit SD (‘110’) using an incremental, evolutionary approach based on GA [50]. This approach involved developing basic module circuits via a greedy search to construct more extensive, complex circuits. However, the approach needed to be expanded in scope, targeting specific modules and thus limiting the search space, preventing the generation of generalised solution circuits. In 2009, Xiong et al. evolved an overlapping 3-bit SD capable of detecting sequences like ‘101’ and ‘100’, utilizing intrinsic evolution on an FPGA board [51]. They later demonstrated this system’s real-life application in a cardiovascular system [52], evolving the same SD using intrinsic and extrinsic evolution methods based on GA, showcasing the system on an FPGA board. Both approaches were computationally expensive for a small 3-bit SD.
In 2011, Soleimani et al. [47] revisited the evolution of the circuits initially evolved by Ali et al. [48] and Popa et al. [49] using a GA. They claimed to have used fewer gates than the earlier work by Ali et al., although they did not compare their results with Popa’s work.
Tao et al. in 2012 evolved a 4-bit SD using GA and GP [53]. This incremental evolution process involved evolving basic circuits as modules before developing complex circuits from these modules. Using three evolutionary stages for a relatively simple 4-bit SD underscored the high computational cost.
Previous research has primarily focused on the gate-level evolution of SDs using GA and GP. The first work on behavioural-level SD evolution was presented in [17], where 3, 4, 5, and 6-bit SDs were evolved using GE. This work successfully evolved behavioural-level HDL codes from the perspective of FSMs, with the 3, 4, and 5-bit SDs being evolved in a single evolutionary stage. However, due to its complexity, the 6-bit SD required a second evolutionary phase incorporating grammar encapsulation. In this phase, the grammar is provided with the best individual achieved so far, allowing the system to evolve further from that point (detail in the [17]).
Building on this, we presented an improved performance in [44], where the same circuits were evolved using LS and a minimal set of test cases for training. This approach improved the performance of all circuits and enabled the evolution of the 6-bit SD in a single stage.
However, the studies above have focused exclusively on developing SDs for single-sequence detection; research has yet to explore the evolution of SDs capable of detecting multiple sequences. Additionally, while extensive research has been conducted on designing FSMs for vending machines [54,55,56,57], the evolutionary development of a vending machine-like FSM has not been investigated.
The evolutionary development of a vending machine-like FSM is a significant contribution and demonstrates the potential for automating the design of complex, real-world systems. This research demonstrates the capability of automating and optimising state management in digital systems by evolving FSMs for scenarios such as vending machines involving multiple states and decision points. This approach bridges theoretical methods with practical applications and paves the way for more efficient and innovative designs in various automated systems and consumer devices.

4. Evolutionary Computation Technique and Parent Selection Methods

4.1. Grammatical Evolution

GE [10] is a variation of GP that uses GAs to evolve variable-length binary strings, known as genotypes. These genotypes are mapped to programs or structures, referred to as phenotypes, in any language defined by a BNF grammar. This capability allows GE to evolve constructs in various programming languages.
BNF is a notation used to describe context-free grammars. Figure 3 illustrates the GE mapping process in detail. BNF grammars consist of four key components:
1.
Production Rules (P): These define how a non-terminal symbol can be replaced with a combination of other symbols (terminals or non-terminals), guiding the generation of valid strings in the language defined by the grammar.
2.
Terminals (T): These are the items that can appear in the final program and, in context-free grammars such as those used in this work, only on the Right-Hand Side (RHS) of a production rule and cannot be further expanded. Examples include symbols like ‘!’ and ‘&’ in the given grammar.
3.
Non-Terminals (N): These are intermediate elements that are mapped by the production rules into members of the set T; these elements can appear on both the Left-Hand Side (LHS) and RHS of production rules and can be expanded into other non-terminals or terminals. For instance, < var > is a non-terminal in the example.
4.
Start Symbol (S): This is a special non-terminal from which the derivation begins. It appears in the first production rule and is typically the leftmost non-terminal, such as < expr > in the first production rule shown in Figure 3.
The genotype, a binary string, is divided into codons and then converted into decimal integers. In the example shown in Figure 3, 8-bit codons of the genotype are used for this conversion. The first integer obtained is 40. The mapping process begins with the S from the first production rule (A). Given two possible RHS options in this rule, the selection is made using the modulus operation: the integer 40 modulo 2 equals 0, thus selecting the first option.
Next, the selected option contains a non-terminal, expanding the leftmost non-terminal. The second integer, 118, determines the selection within the non-terminal < var > , which has two options according to the third production rule (C). The operation 118 modulo 2 equals 0, so the first option, the variable ‘x’, is chosen. The subsequent non-terminal < op > has three options according to the second production rule (B). Using the third integer, 124, the selection is made by calculating 124 modulo 3, resulting in 1, thus choosing the second terminal, representing an OR operation. Finally, for the last non-terminal < var > , the integer 137 modulo 2 results in 1, selecting the variable ‘y’. The resulting expression, shown in Figure 3, is an OR operation between the inputs ‘x’ and ‘y’. This example is adapted from [17], where a more detailed explanation can be found.

4.2. Tournament vs. Lexicase Parent Selection

The parent selection method plays a critical role in the evolutionary process. In TS [58], a tournament is conducted among n individuals. The one with the best overall performance across all training cases, i.e., the highest aggregated fitness value, is selected. In this study, the value of n is set to 2 for all experiments to save computational time and cost. While this smaller tournament size increases the chances of low-fitness candidates being selected as parents and high-fitness candidates being missed [58], this effect is mitigated in our case due to the significant population sizes used. Larger populations increase diversity and the likelihood of high-fitness candidates being retained, ensuring robust evolutionary progress despite lower selection pressure.
In contrast, LS [59] does not rely on an aggregated fitness value. Instead, it selects specialists who excel at particular training cases. The process begins by considering the entire population, with individuals filtered out iteratively based on their performance on random training cases. The individual who performs best on the selected training case is chosen as a parent. One is randomly selected if two or more individuals perform equally well on a training case. LS has demonstrated exceptional problem-solving abilities in various fields, including regression [60] and evolutionary robotics [61]. Notably, it has shown outstanding results in the evolution of both combinational [20,37,38] and sequential [44] digital circuits in recent years.

5. Dataset Generation

The choice of training dataset is crucial in developing sequential circuits. The dataset can be random, exhaustive (where the system is initialised to a specific state and evaluated against all possible inputs), or selectively chosen based on the designer’s preferences. The size or length of each training case within the dataset also plays a significant role.
In the FSM mapped to a vending machine, the number of training or test cases is limited, with each case having a specific length (the details are given below). The dataset shown in Figure 4, as shown below, includes all required training cases. In addition to having all the necessary training cases, it also represents the complete set of possible test cases for this FSM, as there are no additional scenarios applicable to this FSM. If the number of train and test cases is changed from those used in this work, it will increase the search space tremendously, and the trade-off would be a drastic decrease in success rate under a given setting of hyperparameters, which is not a useful trade-off. Since the training and test cases are the same, in Figure 4 they are indicated as TC. This contrasts with the more extensive test datasets used for testing other evolved SDs, such as those in [44,48]. If the train and test cases are kept different from each other and we have an unbalanced dataset, we can use a cluster-based approach, such as a hamming distance-based approach, to balance the dataset.
The TCs are presented in two formats for ease of explanation, as illustrated in Figure 4. On the left, the TCs are displayed input-wise, from ‘0_000’ to ‘1_111’, for clarity and ease of understanding. There are five example TCs shown in this figure, and they are selected as of mixed complexity to demonstrate the FSM’s ability to handle both simple and extended input-output sequences involving varying payment paths and change-return scenarios. Take the example of the TC-2 ‘0_01?_0010_0010’. The higher order four bits (in this TC, ‘0_01?’) represent inputs in product selection and payment status. The most significant bit indicates whether the customer selects water (‘0’) or a carbonated drink (‘1’). The following three input bits immediately after the underscore (‘_’) represent what payment has been made for the selected product. As mentioned above, the water costs EUR 1, while a carbonated drink costs EUR 1.50. Therefore, these four bits indicate that the customer selected water, indicated by input ‘0’, and then paid EUR 0.50 and EUR 1, indicated by ‘0’ and ‘1’, respectively. At this point, the payment is completed, and now the customer needs to be served with water and a return of EUR 0.50. In this scenario, the fourth bit in the input sequence of ‘0_01?’ is taken as a don’t care bit, shown as ‘?’, and is neglected since the third input bit completes the payment. ‘?’ indicates that the bit can be a ‘0’, ‘1’, or ‘x’ (no input at all) in this clock cycle. The same happens in TC-5, where the fourth bit in the input sequence is also neglected, but it does not always happen. It can be seen in TC-3 and TC-4 that after the fizzy drink (‘1’) is selected at the first bit of the input sequence, the payment is not completed by the end of the third bit in the input sequence, so the fourth bit is adding the value to the payment required to get the product delivered. Please refer to Figure 1 to understand this step in more detail.
The next two 4-bit chunks (‘0010_0010’ in TC-2), from left to right, in the training and test vectors, also separated by an underscore (‘_’), represent the system’s outputs: first confirming payment and the other returning any necessary change. The outputs are determined by combining the inputs and the system’s state, as depicted in Figure 1 and discussed in Section 2. For input sequence TC-2 ‘0_01?’, the first output sequence, ‘0010’, with ‘1’ at the third bit from left to right, reflects that the drink is served in the third cycle when the payment of EUR 1.50 is completed. This is because the consumer consumed the first two cycles, selecting the product and adding coins. Hence, the output is ‘0’ in those two cycles. Since the payment of EUR 1.50 is more than the price of water, which is EUR 1, the ‘1’ at the third bit from left to right in the following output sequence ‘0010’ tells that in the third cycle, the customer has been paid with a change of EUR 0.50 along with the product.
The vending machine can only ever issue EUR 0.50 change. In this instance, EUR 0.50 was issued, and it happened in the same cycle as the drink being delivered. The change will always be issued in the same cycle as the delivered drink in the proposed system. Similarly, if there is no change, the final four bits will always be all zeroes. Since in the discussed TC here, the fourth bit in the input sequence is a don’t-care bit, the outputs stay the same for the TCs with input sequences of ‘0_010’, ‘0_011’, or ‘0_01x’.
Note that we assume that the customer can only use EUR 0.50 and EUR 1 coins and that the vending machine will accept a specific amount of these coins in each cycle. Other coins are ignored.
On the right side of the dataset shown in Figure 4, each 12-bit TC from the left side is broken into four 3-bit vectors. Each vector has three bits, separated by ‘_’, where the first bit indicates the input, and the remaining two bits represent the relevant outputs of the system for that input.
For example, the four input bits ‘0_011’ from TC-2 on the left side are reflected in the leftmost bit of the four distributed vectors on the right side. Similarly, the four bits ‘0010’ shown in the middle of TC-2 on the left side of Figure 4 are represented in the middle bit of the vectors on the right side of the figure. Finally, the four bits ‘0010’ from the rightmost part of TC-2 on the left side are reflected in the rightmost bit of the distributed vectors on the right side. These three sections of the distributed vectors of TC-2 are enclosed in ovals and are properly labelled as shown on the right side of Figure 4 for a better understanding.
In this defined way, the TCs are distributed and fed into the system during each cycle, determining the system’s fitness value against each TC. There are 16 12-bit TCs on the left side, which, when distributed according to the system’s requirements, result in 64 3-bit vectors on the right side, which are fed into the system in each cycle. Thus, the maximum fitness value is 64. The maximum fitness value for an individual is only achieved if the individual correctly resolves all the TCs.
The pseudocode to generate the train/test dataset for a complex FSM, such as the one presented here, is shown in Algorithm 1. The process begins by initialising the FSM configuration, such as the vending machine logic discussed earlier. The input encoding is defined such that the first bit represents the product selection (with ‘0’ for water and ‘1’ for a fizzy drink), while the next three bits represent the payment sequence, where ‘0’ and ‘1’ correspond to EUR 0.50 and EUR 1 coins, respectively, and ‘?’ denotes a don’t-care condition. The output encoding is similarly defined, where the first four bits represent the delivery signal across clock cycles, and the next four bits represent the issuance of a return change if applicable. An empty dataset list is then initialised, and for each valid product and payment scenario, an input sequence is generated. The FSM transitions are simulated cycle-by-cycle to compute the corresponding delivery and return change outputs based on the system’s logic and state evolution. Each TC is formatted by concatenating the input sequence, delivery output, and return change output into a 12-bit vector and is subsequently added to the dataset.
Algorithm 1 Generate Training Dataset for FSM Evolution.
1:
function  GenerateDataset
2:
    Initialise FSM configuration             // e.g., vending machine logic
3:
    Define input encoding:
4:
        1st bit: product selection                 // 0 = water, 1 = fizzy drink
5:
        Next 3 bits: payment sequence     // 0 = €0.50, 1 = €1, ? = don’t care
6:
    Define output encoding:
7:
        4 bits: delivery signal per cycle
8:
        4 bits: return change signal per cycle
9:
    Initialise empty dataset list D
10:
  for all valid product and payment scenarios do
11:
        Generate input sequence I                                 // 4 bits
12:
        Simulate FSM state transitions for each cycle
13:
        Compute outputs:
14:
            Product delivery signal based on when payment completes
15:
            Return change signal if overpayment occurs
16:
        Format test case: T C = I · O d e l i v e r y · O c h a n g e
17:
        Add T C to dataset D
18:
    end for
19:
    Initialise empty evaluation list V
20:
    for all  T C in D do
21:
        Split T C (12 bits) into four 3-bit vectors:
22:
        for  i = 1 to 4 do
23:
            v i ( i n p u t [ i ] , d e l i v e r y [ i ] , c h a n g e [ i ] )
24:
           Add v i to V
25:
        end for
26:
    end for
27:
    return V                // 3-bit vectors for GE fitness evaluation
28:
end function
In the distribution step tailored for the system’s evaluation, each 12-bit TC is further split into four smaller vectors, each consisting of three bits. Each 3-bit vector comprises a single input bit and two associated output bits, corresponding to the delivery and return change signals for that particular cycle. These distributed vectors are then collectively used for fitness evaluation during the evolutionary process. The correct resolution of all vectors is essential for an individual to achieve the maximum fitness score. This structured approach ensures that all possible TCs relevant to the FSM are covered comprehensively, facilitating effective learning and circuit evolution within the GE framework.
While the dataset size is deliberately constrained to ensure complete coverage with minimal redundancy, the test complexity arises from the sequencing of state-specific inputs and strict timing constraints enforced by the FSM structure. Future work may explore extensional models, such as those proposed by Rodríguez et al. [62], to formally assess and adapt test complexity in broader, adaptive scenarios.

6. Experiments and Results

6.1. Experimental Setup, Tools, and Evolutionary Parameters

All experiments for this work were conducted using a setup that integrates Icarus Verilog (a Verilog/SV simulator) with Grammatical Algorithms in Python for Evolution (GRAPE) [63], a Python-based implementation of GE. The solutions evolved in GRAPE and were evaluated for each generation using Icarus Verilog to calculate the fitness value. The experiments were performed on a Dell OptiPlex 5070 (sourced from Dell Technologies Customer Solution Center, Limerick, Ireland) desktop computer with a 1 TB HDD, 256 GB SSD, a single 16 GB RAM module, and a 64-bit quad-core 9th-generation i7 processor with a 12 MB cache. The processor’s standard operating frequency is 3.0 GHz, which can boost up to 4.7 GHz in turbo mode. The system uses the operating system Ubuntu 22.04.4 LTS.
The hyperparameters used in this work are detailed in Table 1. All experiments initially used a population of 1000 and ran for 30 generations. However, these parameters were increased for some experiments, with results presented according to the respective population size and maximum number of generations in Table 2. The experimental setup is designed to run 12 runs in parallel on 12 threads of the processor.
The grammar used in this study is shown in Figure 5. This work focuses on evolving the HDL code for a 6-state MSD, which is more complex than the previously evolved FSM for a 6-bit SD discussed in [44]. The increased complexity arises from the MSD’s ability to track two sequences. We have evolved not only the system’s next state and the values of two respective outputs—confirmation of payment and refund amount—but also the current state, input variables, and the values for input variables, which were not addressed in the previous work. This grammar facilitates the generation of the HDL module, which is simulated using Icarus Verilog.
The first production rule connects the < p a r a m e t e r s > to < s e q u e n t i a l > , where < p a r a m e t e r s > defines hardcoded state parameters by assigning them 3-bit values. The < s e q u e n t i a l > block contains the entire always block that implements the FSM. Within this always block, if the system is not undergoing a reset, the  < s t a t e s _ b l o c k > selects the appropriate if–else if statement according to the system’s current state (which is also evolved) and then enters < c o n d i t i o n a l > . The  < c o n d i t i o n a l > block further selects the respective if–else if condition based on the evolved input variable and its evolved value, assigning the evolved next state and evolved outputs to the system. If the system is in a reset state, < l a s t _ e l s e > is chosen within the always block, assigning hardcoded values to the next state and outputs, as specified in the grammar. The last three non-terminals only have terminals on the RHS, which are used throughout to evolve the current state, next state, input variable and its value, and the value of the outputs.
In this work, the primary evaluation metric used during the evolutionary process is the fitness score. The fitness score measures how accurately an evolved individual solves the target FSM problem by comparing its outputs against the expected outputs for a predefined set of TCs.
A total of 16 TCs divided into 64 3-bit vectors (as shown in Section 5) are used, where each case represents a specific input sequence and the corresponding expected output behaviour. For each 3-bit vector that the evolved individual resolves correctly, it is awarded a score of ‘1’. If the output for a vector does not match the expected behaviour, a score of ‘0’ is assigned for that vector. The overall fitness score is computed by summing the individual scores across all 16 12-bit TCs or all 64 3-bit vectors. Therefore, the maximum achievable fitness score for an individual is ‘64’, indicating perfect performance on all TCs.
The overall fitness score F for an individual is calculated by summing the scores across all 64 3-bit vectors and is defined as:
F = i = 1 N s i
where the following are used:
  • N = 64 is the total number of 3-bit vectors;
  • s i = 1 if the individual’s output for vector i matches the expected output;
  • s i = 0 otherwise.

6.2. Experiments and Results Using Tournament Selection

In the first set of experiments, using TS as the parent selection method, the initial experiment was conducted with a population size of 1000 over 30 generations. The system took 59 min and 36 s to successfully evolve only two solutions across thirty runs, as reported in Table 2. Somewhat arbitrarily, we set a target of 25/30 successful runs; if a setup produces fewer than that, we consider the setup inadequate. In Table 2, blue text indicates the training and test success rate on unsuccessful runs, while green text indicates the training and test success rate greater than 25. No further experiments were run once we managed a success rate greater or equal to 25.
For this first experiment, the mean of the maximum fitness graph (all graphs for these experiments are provided in the SM, showing the mean maximum fitness scores of evolved circuits over 30 runs across the maximum number of generations) revealed consistently increasing error bars over the generations (as seen in the subsequent experiment shown in Figure 6a). Noting the significant variability in solutions indicated by the large error bars, the number of generations increased to 100, achieving a success rate of 6/30 and taking the execution time of 177 min and 42 s, almost three times the previous experiment. The resulting graph continued to show large error bars, as illustrated in Figure 6a. The number of generations was then further increased to 500, taking an execution time of 870 min and 23 s and resulting in a success rate of 20/30. Although the results did not improve fivefold with the increased number of generations, the error bars remained substantial.
The number of generations was further increased to 1000, resulting in a success rate of 23/30, taking execution time of 1732 min and 53 s. The error bars on the graph were significantly reduced. We experimented with swapping these values to explore whether a larger population size with fewer generations might yield better results. The population size was set to 5000, and the number of generations was reduced to 100 (thus keeping the total number of individuals the same). With these settings, we achieved the same success rate of 20/30, with an execution time of 872 min and 45 s. However, the error bars indicated considerable variability in the solutions, with no clear trend toward saturation.
We then kept the population size at 5000 and increased the number of generations to 500. This configuration took execution time of 4348 min and 15 s and led to a perfect success rate of 30/30, with the system reaching this rate around 350 generations, as shown in Figure 6b.
Since the dataset used for training is the only one available for the test success rate, the entire dataset was used for training and testing. The respective success rate of the evolved solutions on the test dataset is indicated in the same column in Table 2, showing perfect accuracy for all evolved solutions.

6.3. Experiments and Results Using Lexicase Selection

All settings were kept consistent with the TS method, and the first experiment was conducted with a population size of 1000 across 30 generations, repeated over 30 runs. This resulted in a training and test success rate of 09/30, taking an execution time of 57 min 42 s, as shown in Table 2. Since this is not an acceptable success rate, we increased the number of generations to 100. This adjustment led to a success rate of 17/30, with an execution time of 178 min and 41 s, which is approximately three times higher than the TS method under the same generation setting, as seen in Table 2. Despite this improvement, the graph still displayed large error bars and a lack of saturation, leading to a further increase in the number of generations to 500. This change resulted in a success rate of 29/30, taking an execution time of 867 min and 56 s, again significantly outperforming the TS method under identical hyperparameter settings. No further experiments were conducted because this success rate was nearly perfect. The resulting graph showed the mean of the maximum fitness value approaching saturation, with consistently narrowing error bars.
It can be seen that in evolving FSMs, where multiple diverse and sometimes conflicting TCs must be satisfied, LS outperforms TS by preserving individuals that solve specific difficult cases. Unlike TS, which favours generalist individuals with good average performance and risks losing useful specialists early, LS evaluates performance case-by-case, maintaining a richer diversity of FSM behaviours. This diversity is crucial for complex FSM evolution, where different transitions and outputs may be optimised at different stages. As a result, LS enables better exploration and often leads to higher-quality FSM solutions.
Incorporating both LS and TS, the proposed method is highly scalable to larger and more complex FSMs. However, scaling may require greater computational and evolutionary resources. To adapt this methodology for larger FSMs, modifications to the grammar, training dataset, and testbench would be necessary. For example, expanding the current FSM to support more than two products would require a complete restructuring of the dataset and FSM, alongside corresponding updates to the grammar and testbench. Future work will focus on scaling this methodology to enable the evolution of more complex and larger FSMs.

7. Evolved Solution FSM

7.1. Code and Transition Analysis

FSM of one of the perfectly evolved solution circuits in SV is shown in Figure 7. This FSM is taken from the solution circuits generated using LS, and the experiment has a top success rate of 29/30. In this evolved FSM, all state transitions and their conditions are automatically generated through the evolutionary process discussed earlier. The FSM structure includes six states, named S0 to S5, aligning with the human-designed FSM presented in Section 2. Notably, the evolved solution exhibits a broader set of transitions, showcasing the creative and exploratory nature of the GE.
The FSM shows transitions in both black and red colours. The black transitions are the ones in use that occur during execution based on the testbench inputs. The red transitions exist in the code but are never triggered during real operation. These extra transitions show how the evolved system can explore a wider range of possible behaviours and add flexibility to the design.
In this structure, transitions originating from state S0 based on x1, indicated in dark pink within the transition labels, are not functionally utilised, as x1 is not active during S0 according to the testbench configuration. These transitions are marked in red in the FSM diagram to indicate that they remain inactive in this context. Similarly, transitions from states S1 through S5 based on x0, represented in blue within the transition labels, are also non-operative in actual execution, as x0 is only defined during the initial cycle in S0. The colour scheme used for input bits in the transition labels is consistent with the human-designed FSM in Figure 1, aiding in visual continuity and interpretability.
Some transitions are labelled with combined conditions such as ‘(0/x)’ or ‘(1/x)’. These originate from broader else blocks in the evolved code, as opposed to the more precise else if chains used in the human-designed solution. While this approach may appear less constrained, it highlights the flexibility of the evolved FSM to accommodate various input combinations without compromising functionality.
An interesting aspect of the evolved FSM is the presence of repeated or overlapping state conditions. For instance, as shown in Figure 8, state S0 is defined in two separate blocks, both beginning with state == S0. Given the sequential nature of the code, only the first such block is ever executed during runtime, while the second block (highlighted in red) remains extraneous. This is reflected in the FSM diagram in Figure 7, where transitions linked to the second block are highlighted in red. These extra structures, although inactive, are byproducts of the evolutionary search process and illustrate the system’s openness to exploring alternative representations.
Additionally, certain conditional checks, such as x1 == 1, appear in S0, despite x1 being undefined during that state. It can be seen in Figure 8 that the conditional statement based on x1 == 1 in the first block based on S0 will never execute, yet is highlighted in red. The remaining part of this block, which will be able to execute, is highlighted in green. Likewise, some input checks like x1 == 0 occur multiple times within the same state, as can be seen in the transitions from S5, where two transitions are based on the same input and output labels. However, one is valid and the other is not. These repetitions and overlaps are not errors but rather emergent outcomes of the grammar-based evolutionary system, which emphasises functionality and completeness over stylistic minimalism. They underscore the potential of GE to generate circuits that are not only correct but also adaptable and structurally diverse.
Thus, while the evolved FSM performs correctly on all evaluated TCs, its code also reflects the flexibility and exploratory nature of the evolutionary process, resulting in additional transitions and structures that, although not activated under current testbench constraints, demonstrate the system’s capacity to adapt and generalise beyond strictly defined scenarios.

7.2. Test Case Mapping onto the Evolved FSM

After the FSM is evolved, its functionality is validated by mapping the six TCs (five of which were defined earlier in Section 5 and shown in Figure 4, the dataset generation process), onto the evolved state machine. These TCs represent various user interactions with the vending machine, covering all valid input-output behaviours. Each TC is shown in a unique colour on the FSM diagram in Figure 9 to clearly highlight the path it follows through the states.
The mapping uses the following colour scheme for the six TCs:
  • Azure for TC-1;
  • Orange for TC-2;
  • Maroon for TC-3;
  • Purple for TC-4;
  • Citrine yellow for TC-5;
  • Parrot green for TC-6 (an additional test case not shown in the original dataset figure).
Each coloured path corresponds to a valid sequence of transitions based on the inputs defined in the respective test case. For example, in TC-2, the system begins in state S0, detects a water selection x0 = 0, and proceeds to state S1. From there, it transitions through additional states depending on the payments made using x1, until the total payment matches the product cost.
The same logic applies to the fizzy drink selection path, such as in TC-4, which begins with x0 = 1 in S0 and continues through states like S3, S1, and S2, depending on the combination and order of EUR 0.50 and EUR 1 coins. It finally ends at S3 with the delivery of the product and a return change of EUR 0.50. In each TC, the state transitions and output responses follow the correct timing and behaviour, as expected from the FSM.
The additional TC, TC-6, is shown in parrot green in Figure 9 and follows the input and output pattern ‘1_01x_0010_0000’. This TC is specifically included to highlight the use of state S5, which is not involved in the first five TCs. By showing a path that passes through S5, the evolved FSM demonstrates its coverage of all relevant states and confirms its flexibility in handling less common but still valid scenarios. The transition labels in this figure also follow the same colour coding as used in the dataset generation figure (Figure 4).
Even though the evolved FSM shown in Figure 7 includes some transitions that are not used during execution, these do not affect the system’s operation. The testbench restricts the inputs per cycle, so only the correct transitions are activated. The evolved FSM, therefore, completes all TCs correctly and achieves the maximum fitness score of 64, meaning it delivers the right outputs for all 64 input vectors derived from the dataset.

8. Logic Synthesis

After successfully generating HDL codes for MSDs using both TS and LS, the evolved solutions (successful candidates from each run) were synthesised and compared with the synthesis of the Gold Circuit. For this, 29 and 30 solution circuits, which are the best of the run from each of LS and TS, respectively, where the best success rates were achieved, were taken towards the synthesis, as shown in Table 2. The synthesis process employed Complementary Metal–Oxide–Semiconductor (CMOS) GPDK technologies at 45 nm, 90 nm, and 180 nm nodes, using the Cadence Genus synthesis tool at a clock frequency of 100 MHz. The reset signal was configured to the ideal network in the constraints file. For all three GPDK technologies, synthesis was performed under both Fast Corner (FC) and Slow Corner (SC) conditions. FC represents the most optimal operational environment for the circuit, based on specific temperature and supply voltage settings, while SC denotes the least favourable conditions. The temperature and voltage values used in these designs are detailed in Table 3.
Table 4 presents a comparison of synthesis reports between the Gold MSD and the MSDs evolved using TS and LS, focusing on area (measured in the number of cells) and Power Delay Product (PDP). The PDP, calculated as the product of power and delay, is a crucial metric in evaluating IC design performance, given the inherent trade-offs between power consumption and delay. The unit of PDP is milliwatt-picoseconds (mWps). The comparisons in Table 4 are organised by the relevant GPDK technology, highlighted in three different shades of maroon; the lighter the shade, the smaller the GPDK technology. For instance, the synthesis reports of the Gold Circuit under FC and SC conditions using 45 nm technology are compared against those of the evolved circuits using the same technology under TS and LS. This method is similarly applied to 90 nm and 180 nm technologies.
For each technology, the Gold Circuit’s metrics under FC and SC conditions are compared with the best (minimum), mean/average (AVG), median, and worst (maximum) values among the 29 perfect solution circuits evolved through LS and the 30 solution circuits evolved through TS. The table also includes the standard deviation (STD) among all values. At least one synthesised solution circuit for each technology generated through the proposed system has performed either better than the Gold Circuit, highlighted in green, or equal to the Gold Circuit, highlighted in blue. It can be seen that only one value out of 24 values is highlighted in blue, and the rest are shown in green, which means that evolution has produced a better result than the Gold Circuit under almost every circumstance.
Moreover, to show if there is a statistically significant difference between the synthesis reports of gold and evolved circuits, p-values extracted from the statistical hypothesis test named one-sample t-test are also given, where the Gold Circuits are compared with evolved circuits. Since the p-value if less than or equal to 0.05 indicates that there is a significant difference between the Gold Circuit and the group of circuits evolved under the specific technology, it is shown in bold and orange colour that for 20 out of 24 values of area and PDP values taken from evolved circuits, the null hypothesis can be rejected. There is a significant difference compared with the values of the Gold Circuit. There are only four values where the null hypothesis cannot be dismissed, and we have to note that there is no significant difference between the Gold Circuit’s values and the mean values taken from the group of 30 or 29 circuits for a specific technology. Given this, we can safely say that most of the circuits are significantly different and better than the Gold Circuit, and we can generate better solutions automatically through evolutionary ML, which is the primary goal of this work.
Solutions evolved through LS achieve a higher success rate compared with TS. The performance of the synthesised designs from LS also surpasses those from TS, since three out of four values with a p-value greater than 0.05 belong to TS. This leads the authors to recommend LS as the preferable parent selection technique for evolving complex sequential circuits.
A two-sample t-test is run between the synthesis reports of the groups of circuits evolved through LS and TS, and the extracted p-values are shown in Table 5. The values less than 0.05 show a significant difference between the two groups, shown in bold and red, while the rest are in bold and green. So, it can be seen that although LS performed much better than TS in terms of evolutionary success rate, the circuits evolved through both are pretty much similar according to the synthesis reports, yet acceptable.

9. Conclusions and Future Work

This work introduces the evolution of synthesisable HDL codes for a single-input, multi-output MSD using GE and two parent selection methods: TS and LS. Although these parent selection methods and GE are well-established techniques, they are combined here to evolve the FSM of a real-life MSD, which is complex and hard to evolve and speaks to the novelty of the presented system. The evolved MSD is applied to a practical vending machine scenario, covering the entire process from product selection through payment to delivery. Using the evolved MSD designs in a vending machine scenario, the study validates the effectiveness of the evolutionary methods in generating practical, real-world solutions. It also shows the potential for these methods in other complex systems requiring similar state management capabilities, such as robotics.
The results demonstrate that LS significantly outperforms TS in evolving a sequential Mealy machine in terms of success rate and computational efficiency. The Gold standard and evolved circuits are synthesised to validate the practical application using GPDK at 45 nm, 90 nm, and 180 nm. These syntheses confirm that the circuits evolved to represent a significant step forward in automated chip design and manufacturing. Notably, at least one evolved circuit outperforms the Gold Circuit using either TS or LS. This study is the first to evolve synthesisable HDL codes for MSDs.
Future work will focus on evolving more complex circuits, such as multi-input and multi-output MSDs. In addition, another future direction will consider exploring the systematic hyperparameter tuning techniques to optimise evolutionary ML approaches, such as GE, which will likely improve overall system performance. We will also investigate using some other implementations of GE than GRAPE, such as Grammatical Algorithms in C++ for Evolution (GRACE), where the LS can be compared with the results of the approach used here.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/a18060345/s1, Data_Set_Paper: Figure showing dataset generation used for training the model; Lexicase_Selection_Experiment_1: Mean of average fitness across generations for first experiment using Lexicase parent selection; Lexicase_Selection_Experiment_2: Mean of average fitness across generations for second experiment using Lexicase parent selection; Lexicase_Selection_Experiment_3: Mean of average fitness across generations for third experiment using Lexicase parent selection; Tournament_Selection_Experiment_1: Mean of average fitness across generations for first experiment using Tournament parent selection; Tournament_Selection_Experiment_2: Mean of average fitness across generations for second experiment using Tournament parent selection; Tournament_Selection_Experiment_3: Mean of average fitness across generations for third experiment using Tournament parent selection; Tournament_Selection_Experiment_4: Mean of average fitness across generations for fourth experiment using Tournament parent selection; Tournament_Selection_Experiment_5: Mean of average fitness across generations for fifth experiment using Tournament parent selection; Tournament_Selection_Experiment_6: Mean of average fitness across generations for sixth experiment using Tournament parent selection; Grammar.txt: BNF Grammar used for evolution; Human_Designed_Module.sv: SV code of human-designed module in SV file format; Human_Designed_Module.txt: SV code of human-designed module in text file format; Evolved_Solution.sv: SV code of machine-designed module in SV file format; Evolved_Solution.txt: SV code of machine-designed module in text file format; Dataset.txt: 12-bit 16 train and test vectors used for training and test purposes.

Author Contributions

Conceptualisation, B.M., R.S., A.Y., D.M.D. and C.R.; methodology, B.M., A.Y., R.S. and C.R.; formal analysis, B.M., R.S. and C.R.; data curation, B.M.; writing—original draft preparation, B.M.; writing—review and editing, R.S., A.Y., D.M.D. and C.R.; visualization, B.M., R.S. and C.R.; supervision, R.S., A.Y., D.M.D. and C.R.; project administration, D.M.D., R.S. and C.R.; funding acquisition, C.R. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Research Ireland (Science Foundation Ireland (SFI) before) grant 16/IA/4605.

Data Availability Statement

The dataset used in this work can be accessed at Supplementary Materials.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
GEGrammatical Evolution
HDLHardware Description Language
FSMFinite State Machine
MSDMulti-Sequence Detector
SDSequence Detector
TSTournament Selection
LSLexicase Selection
GPDKGeneric Process Design Kit
EDAElectronic Design Automation
MLMachine Learning
EAEvolutionary Algorithm
GAGenetic Algorithm
GPGenetic Programming
ESEvolutionary Strategies
EHEvolvable Hardware
FPGAField Programmable Gate Arrays
VHDLVery High-Speed Integrated Circuit HDL
SVSystemVerilog
HVLHardware Verification Language
BNFBackus–Naur Form
CGPCartesian Genetic Programming
DFADeterministic Finite Automata
PProduction Rules
TTerminals
NNon-Terminals
SStart Symbol
RHSRight-Hand Side
LHSLeft-Hand Side
GRAPEGrammatical Algorithms in Python for Evolution
NNNot Needed
SMSupplementary Material
CMOSComplementary Metal–Oxide–Semiconductor
FCFast Corner
SCSlow Corner
PDPPower Delay Product
mWpsmilliwatt-picosecond
AVGAverage
STDStandard Deviation

References

  1. Farrahi, A.; Hathaway, D.; Wang, M.; Sarrafzadeh, M. Quality of EDA CAD tools: Definitions, metrics and directions. In Proceedings of the IEEE 2000 First International Symposium on Quality Electronic Design (Cat. No. PR00525), San Jose, CA, USA, 20–22 March 2000; pp. 395–405. [Google Scholar]
  2. Solido. Solido Design Solutions. 2005. Available online: https://eda.sw.siemens.com/en-US/ic/solido/ (accessed on 1 November 2022).
  3. Eagle. Eagle by Autodesk. 1988. Available online: https://www.autodesk.com/products/eagle/overview (accessed on 1 November 2022).
  4. Kicad. KiCad Electronic Design Automation. 1992. Available online: https://www.kicad.org/ (accessed on 1 November 2022).
  5. Ince, D.C. Mechanical Intelligence (Collected Works of A. M. Turing); North-Holland Publishing Co.: Amsterdam, The Netherlands, 1992. [Google Scholar]
  6. Zelinka, I.; Oplatkova, Z.; Nolle, L. Analytic programming–Symbolic regression by means of arbitrary evolutionary algorithms. Int. J. Simul. Syst. Sci. Technol. 2005, 6, 44–56. [Google Scholar]
  7. Nicosia, G.; Rinaudo, S.; Sciacca, E. An evolutionary algorithm-based approach to robust analog circuit design using constrained multi-objective optimization. In Research and Development in Intelligent Systems XXIV; Springer: London, UK, 2007; pp. 7–20. [Google Scholar]
  8. Mirjalili, S. Genetic Algorithm. In Evolutionary Algorithms and Neural Networks: Theory and Applications; Springer International Publishing: Cham, Switzerland, 2019; pp. 43–55. [Google Scholar]
  9. Koza, J.R. Genetic Programming: On the Programming of Computers by Means of Natural Selection; MIT Press: Cambridge, MA, USA, 1992. [Google Scholar]
  10. Ryan, C.; Collins, J.J.; Neill, M.O. Grammatical evolution: Evolving programs for an arbitrary language. In Proceedings of the European Conference on Genetic Programming, Paris, France, 14–15 April 1998; Springer: Berlin/Heidelberg, Germany, 1998; pp. 83–96. [Google Scholar]
  11. Rudolph, G. Evolutionary Strategies. In Handbook of Natural Computing; Springer: Berlin/Heidelberg, Germany, 2012; pp. 673–698. [Google Scholar]
  12. Zhang, Y.; Smith, S.; Tyrrell, A. Digital circuit design using intrinsic evolvable hardware. In Proceedings of the 2004 NASA/DoD Conference on Evolvable Hardware, Seattle, WA, USA, 26 June 2004; pp. 55–62. [Google Scholar]
  13. Kalganova, T. An Extrinsic Function-Level Evolvable Hardware Approach. In Proceedings of the Genetic Programming, Edinburgh, UK, 15–16 April 2000; Poli, R., Banzhaf, W., Langdon, W.B., Miller, J., Nordin, P., Fogarty, T.C., Eds.; Springer: Berlin/Heidelberg, Germany, 2000; pp. 60–75. [Google Scholar]
  14. Ali, M.; Kshirsagar, M.; Naredo, E.; Ryan, C. Towards Automatic Grammatical Evolution for Real-world Symbolic Regression. In Proceedings of the 13th International Joint Conference on Computational Intelligence, Virtual, 25–27 October 2021; Volume 1: ECTA, INSTICC, pp. 68–78. [Google Scholar]
  15. Murphy, A.; Murphy, G.; Amaral, J.; Mota Dias, D.; Naredo, E.; Ryan, C. Towards Incorporating Human Knowledge in Fuzzy Pattern Tree Evolution. In Proceedings of the European Conference on Genetic Programming (Part of EvoStar), Virtual Event, 7–9 April 2021; Springer: Cham, Switzerland, 2021; pp. 66–81. [Google Scholar]
  16. Youssef, A.; Majeed, B.; Ryan, C. Optimizing combinational logic circuits using Grammatical Evolution. In Proceedings of the IEEE 2021 3rd Novel Intelligent and Leading Emerging Sciences Conference (NILES), Giza, Egypt, 23–25 October 2021; pp. 87–92. [Google Scholar]
  17. Majeed, B.; Ryan, C.; McEllin, J.; Youssef, A.; Dias, D.; Murphy, A.; Carvalho, S. Evolving Behavioural Level Sequence Detectors in SystemVerilog Using Grammatical Evolution. In Proceedings of the 15th International Conference on Agents and Artificial Intelligence, Setúbal, Portugal, 22–24 February 2023; Volume 3, pp. 475–483. [Google Scholar]
  18. Mealy, B.; Tappero, F. Free Range VHDL; Free Range Factory (2013); eBook: Seattle, Washington, DC, USA, 2018. [Google Scholar]
  19. Chu, P.P. Xilinx Spartan-3 Specific Memory. In FPGA Prototyping by Verilog Examples; John Wiley and Sons, Ltd.: Hoboken, NJ, USA, 2008; Chapter 12; pp. 297–308. [Google Scholar]
  20. Ryan, C.; Tetteh, M.K.; Dias, D.M. Behavioural Modelling of Digital Circuits in System Verilog using Grammatical Evolution. In Proceedings of the 12th International Joint Conference on Computational Intelligence, Budapest, Hungary, 2–4 November 2020; SciTePress: Setúbal, Portugal, 2020; pp. 28–39. [Google Scholar]
  21. Bak, W.; Czerniak, J.; Tokarski, T. Intelligent traffic light control system based on multi-agent systems. Int. J. Comput. Sci. Issues (IJCSI) 2011, 8, 109–115. [Google Scholar]
  22. Yue, S.; Smith, R.K. Applying Context State Machines to Smart Elevators: Design, Implementation and Evaluation. In Proceedings of the 2021 IEEE Symposium Series on Computational Intelligence (SSCI), Orlando, FL, USA, 5–7 December 2021; pp. 1–9. [Google Scholar] [CrossRef]
  23. Siciliano, B.; Khatib, O. Springer Handbook of Robotics; Springer: Berlin/Heidelberg, Germany, 2016; pp. 579–619. [Google Scholar]
  24. Stevens, W.R. TCP/IP Illustrated, Volume 1: The Protocols; Addison-Wesley: Reading, MA, USA, 1994. [Google Scholar]
  25. Navabi, Z. VHDL: Modular Design and Synthesis of Cores and Systems; McGraw-Hill: New York, NY, USA, 2007. [Google Scholar]
  26. Ciletti, M.D. Advanced Digital Design with the Verilog HDL, 2nd ed.; Prentice Hall Press: Denver, CO, USA, 2010. [Google Scholar]
  27. Spear, C. SystemVerilog for Verification, Second Edition: A Guide to Learning the Testbench Language Features, 2nd ed.; Springer: New York, NY, USA, 2008. [Google Scholar]
  28. Cadence. Cadence Design Systems. 1998. Available online: https://www.cadence.com/ (accessed on 1 April 2022).
  29. Morris, M.; Ciletti, M.D. Digital Design; Pearson Prentice Hall: Hoboken, NJ, USA, 2007. [Google Scholar]
  30. Fourman, M.P. Compaction of Symbolic Layout Using Genetic Algorithms. In Proceedings of the 1st International Conference on Genetic Algorithms, Pittsburgh, PA, USA, 24–26 July 1985; Lawrence Erlbaum Associates, Inc.: Mahwah, NJ, USA, 1985; pp. 141–153. [Google Scholar]
  31. Cohoon, J.P.; Paris, W.D. Genetic Placement. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 1987, 6, 956–964. [Google Scholar] [CrossRef]
  32. Kling, R.; Banerjee, P. ESp: Placement by simulated evolution. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 1989, 8, 245–256. [Google Scholar] [CrossRef]
  33. Higuchi, T.; Niwa, T.; Tanaka, T.; Iba, H.; de Garis, H.; Furuya, T. Evolving Hardware with Genetic Learning: A First Step towards Building a Darwin Machine. In Proceedings of the From Animals to Animats 2: Proceedings of the Second International Conference on Simulation of Adaptive Behavior, Honolulu, HI, USA, 9 August 1993; pp. 417–424. [Google Scholar]
  34. Calvin, W.H. The brain as a Darwin Machine. Nature 1987, 330, 33–34. [Google Scholar] [CrossRef] [PubMed]
  35. Stomeo, E.; Kalganova, T.; Lambert, C. Generalized disjunction decomposition for evolvable hardware. IEEE Trans. Syst. Man Cybern. B Cybern. 2006, 36, 1024–1043. [Google Scholar] [CrossRef] [PubMed]
  36. Vasicek, Z.; Sekanina, L. Hardware Accelerators for Cartesian Genetic Programming. In Proceedings of the Genetic Programming, Naples, Italy, 26–28 March 2008; Springer: Berlin/Heidelberg, Germany, 2008; pp. 230–241. [Google Scholar]
  37. Tetteh, M.; Dias, D.M.; Ryan, C. Grammatical Evolution of Complex Digital Circuits in SystemVerilog. SN Comput. Sci. 2022, 3, 188. [Google Scholar] [CrossRef] [PubMed]
  38. Tetteh, M.K.; Mota Dias, D.; Ryan, C. Evolution of Complex Combinational Logic Circuits Using Grammatical Evolution with SystemVerilog. In Proceedings of the Genetic Programming, Virtual Event, 7–9 April 2021; Hu, T., Lourenço, N., Medvet, E., Eds.; Springer: Cham, Switzerland, 2021; pp. 146–161. [Google Scholar]
  39. Ashlock, D.; Wittrock, A.; Wen, T.J. Training finite state machines to improve PCR primer design. In Proceedings of the 2002 Congress on Evolutionary Computation. CEC’02 (Cat. No.02TH8600), Honolulu, HI, USA, 12–17 May 2002; Volume 1, pp. 13–18. [Google Scholar] [CrossRef]
  40. Klimowicz, A.; Salauyou, V. State Merging and Splitting Strategies for Finite State Machines Implemented in FPGA. Appl. Sci. 2022, 12, 8134. [Google Scholar] [CrossRef]
  41. Pinto Ferraz Fabbri, S.; Delamaro, M.; Maldonado, J.; Masiero, P. Mutation analysis testing for finite state machines. In Proceedings of the 1994 IEEE International Symposium on Software Reliability Engineering, Monterey, CA, USA, 6–9 November 1994; pp. 220–229. [Google Scholar] [CrossRef]
  42. Villa, T.; Kam, T.; Brayton, R.K.; Sangiovanni-Vincentelli, A.L. Synthesis of Finite State Machines: Logic Optimization; Springer Science & Business Media: Berlin/Heidelberg, Germany, 1997. [Google Scholar]
  43. Hemmi, H.; Mizoguchi, J.; Shimohara, K. Development and evolution of hardware behaviors. In Proceedings of the Towards Evolvable Hardware (TEH), Lausanne, Switzerland, 2–3 October 1995; Sanchez, E., Tomassini, M., Eds.; Springer: Berlin/Heidelberg, Germany, 1996; pp. 250–265. [Google Scholar]
  44. Majeed, B.; Carvalho, S.; Dias, D.M.; Youssef, A.; Murphy, A.; Ryan, C. Performance Upgrade of Sequence Detector Evolution Using Grammatical Evolution and Lexicase Parent Selection Method. In Proceedings of the Complex Computational Ecosystems, Baku, Azerbaijan, 25–27 April 2023; Collet, P., Gardashova, L., El Zant, S., Abdulkarimova, U., Eds.; Springer: Cham, Switzerland, 2023; pp. 90–103. [Google Scholar]
  45. Mizoguchi, J.; Hemmi, H.; Shimohara, K. Production genetic algorithms for automated hardware design through an evolutionary process. In Proceedings of the First IEEE Conference on Evolutionary Computation, IEEE World Congress on Computational Intelligence, Orlando, FL, USA, 27–29 June 1994; Volume 2, pp. 661–664. [Google Scholar]
  46. Shanthi, A.; Singaram, L.; Parthasarathi, R. Evolution of asynchronous sequential circuits. In Proceedings of the 2005 NASA/DoD Conference on Evolvable Hardware (EH’05), Washington, DC, USA, 29 June–1 July 2005; pp. 93–96. [Google Scholar]
  47. Soleimani, P.; Sabbaghi-Nadooshan, R.; Mirzakuchaki, S.; Bagheri, M. Using Genetic Algorithm in the Evolutionary Design of Sequential Logic Circuits. arXiv 2011, arXiv:1110.1038. [Google Scholar] [CrossRef]
  48. Ali, B.; Almaini, A.E.A.; Kalganova, T. Evolutionary Algorithms and Theirs Use in the Design of Sequential Logic Circuits. Genet. Program. Evolvable Mach. 2004, 5, 11–29. [Google Scholar] [CrossRef]
  49. Popa, R.; Aiordăchioaie, D.; Sîrbu, G. Evolvable Hardware in Xilinx Spartan-3 FPGA. In Proceedings of the 2005 WSEAS International Conference on Dynamical Systems and Control (ICDSC), Venice, Italy, 2–4 November 2005; pp. 66–71. [Google Scholar]
  50. Yao, R.; Wang, Y.r.; Yu, S.l.; Gao, G.j. Research on the Online Evaluation Approach for the Digital Evolvable Hardware. In Proceedings of the Evolvable Systems: From Biology to Hardware (ESFBH), Wuhan, China, 21–23 September 2007; Springer: Berlin/Heidelberg, Germany, 2007; pp. 57–66. [Google Scholar]
  51. Xiong, F.; Rafla, N.I. On-chip intrinsic evolution methodology for sequential logic circuit design. In Proceedings of the 2009 52nd IEEE International Midwest Symposium on Circuits and Systems, Cancun, Mexico, 2–5 August 2009; pp. 200–203. [Google Scholar]
  52. Xiong, F.; Tanik, J.; Tanik, M. An Evolutionary Circuit Model for Cardiovascular System: An FPGA Approach. Int. J. Comput. Inf. Technol. Eng. 2011, 5, 41–53. [Google Scholar]
  53. Tao, Y.; Cao, J.; Zhang, Y.; Lin, J.; Li, M. Using module-level Evolvable Hardware approach in design of sequential logic circuits. In Proceedings of the 2012 IEEE Congress on Evolutionary Computation (CEC), Brisbane, QLD, Australia, 10–15 June 2012; pp. 1–8. [Google Scholar]
  54. Kumar, K. Design of vending machine through implementation of visual automata simulator and finite state machine. Int. J. Res. Circuits, Devices Syst. 2021, 2, 60–64. [Google Scholar]
  55. Kurniawan, O.; Ismaya, F.; Gata, W.; Septia Nugraha, F.; Lasmana Putra, J. Application of the Finite State Automata Concept in Applications Fruit Vending Machine Simulation. J. Mantik 2022, 6, 1467–1474. [Google Scholar]
  56. Shivanand, N.; L Rathod, M.; Chetan, S. FPGA based Vending Machine For Logical Gates. In Proceedings of the 2023 3rd International Conference on Smart Data Intelligence (ICSMDI), Trichy, India, 30–31 March 2023; pp. 282–293. [Google Scholar] [CrossRef]
  57. Sindhu, G.; Thanusha, K.; Ganesh, G.V.; Reddy, K.; Pujitha, M. Design of Vending Machine Using Visual Automata Simulator And Finite State Machine. In Proceedings of the 2023 International Conference on Communication, Circuits, and Systems (IC3S), Bhubaneswar, India, 26–28 May 2023; pp. 1–7. [Google Scholar] [CrossRef]
  58. Miller, B.L.; Goldberg, D.E. Genetic Algorithms, Tournament Selection, and the Effects of Noise. Complex Syst. 1995, 9, 193–212. [Google Scholar]
  59. Spector, L. Assessment of Problem Modality by Differential Performance of Lexicase Selection in Genetic Programming: A Preliminary Report. In Proceedings of the 14th Annual Conference Companion on Genetic and Evolutionary Computation (GECCO ’12), Philadelphia, PA, USA, 7–11 July 2012; pp. 401–408. [Google Scholar]
  60. Orzechowski, P.; La Cava, W.; Moore, J.H. Where Are We Now? A Large Benchmark Study of Recent Symbolic Regression Methods. In Proceedings of the Genetic and Evolutionary Computation Conference. Association for Computing Machinery, Kyoto, Japan, 15–19 July 2018; pp. 1183–1190. [Google Scholar]
  61. La Cava, W.; Moore, J. Behavioral search drivers and the role of elitism in soft robotics. In Proceedings of the ALIFE 2018: The 2018 Conference on Artificial Life, Tokyo, Japan, 23–27 July 2018; pp. 206–213. [Google Scholar]
  62. Rodríguez, I.; Rubio, D.; Rubio, F. Complexity of adaptive testing in scenarios defined extensionally. Front. Comput. Sci. 2023, 17, 173206. [Google Scholar] [CrossRef]
  63. de Lima, A.; Carvalho, S.; Dias, D.M.; Naredo, E.; Sullivan, J.P.; Ryan, C. GRAPE: Grammatical Algorithms in Python for Evolution. Signals 2022, 3, 642–663. [Google Scholar] [CrossRef]
Figure 1. Mealy FSM of the single-input double-output Gold MSD.
Figure 1. Mealy FSM of the single-input double-output Gold MSD.
Algorithms 18 00345 g001
Figure 2. Code snippet taken from human-made circuit of proposed FSM with the state’s default assignments highlighted in blue colour.
Figure 2. Code snippet taken from human-made circuit of proposed FSM with the state’s default assignments highlighted in blue colour.
Algorithms 18 00345 g002
Figure 3. Genotype to phenotype mapping in GE.
Figure 3. Genotype to phenotype mapping in GE.
Algorithms 18 00345 g003
Figure 4. Training and test dataset design: The left side shows the 12-bit training or test case representation, which has inputs along with respective outputs in ascending order based on input values, while the right side shows the representation of each 12-bit case into four 3-bit vectors to show how they are fed into the system to compute the overall fitness using the SV testbench. TC stands for training or test case since the training cases are the only cases that can be used as test cases.
Figure 4. Training and test dataset design: The left side shows the 12-bit training or test case representation, which has inputs along with respective outputs in ascending order based on input values, while the right side shows the representation of each 12-bit case into four 3-bit vectors to show how they are fed into the system to compute the overall fitness using the SV testbench. TC stands for training or test case since the training cases are the only cases that can be used as test cases.
Algorithms 18 00345 g004
Figure 5. BNF grammar with full structure of the HDL code for FSM to evolve the current state, input variables and their values, outputs’ values, and the next state of the MSD.
Figure 5. BNF grammar with full structure of the HDL code for FSM to evolve the current state, input variables and their values, outputs’ values, and the next state of the MSD.
Algorithms 18 00345 g005
Figure 6. Error bar graphs representing the mean of the maximum fitness values of the individuals across experiments run with the mentioned population size and number of generations using TS.
Figure 6. Error bar graphs representing the mean of the maximum fitness values of the individuals across experiments run with the mentioned population size and number of generations using TS.
Algorithms 18 00345 g006
Figure 7. FSM of one of the perfectly evolved solution circuits. (Black arrows showing the active transitions, while the red arrows show extraneous transitions).
Figure 7. FSM of one of the perfectly evolved solution circuits. (Black arrows showing the active transitions, while the red arrows show extraneous transitions).
Algorithms 18 00345 g007
Figure 8. Code snippet taken from one of the perfectly evolved solution circuits using LS.
Figure 8. Code snippet taken from one of the perfectly evolved solution circuits using LS.
Algorithms 18 00345 g008
Figure 9. Mapping of TCs onto evolved FSM.
Figure 9. Mapping of TCs onto evolved FSM.
Algorithms 18 00345 g009
Table 1. Hyperparameters used for experiments.
Table 1. Hyperparameters used for experiments.
HyperparameterValue
No. of Runs30
Population Size1000
No. of Gens.30
InitialisationSensible
Mutation Prob.0.01
Crossover Prob.0.9
ElitismYes
Training Cases64
Test Cases64
Table 2. Success rate and execution time of evolved SDs according to the LS and TS method with respective population size and number of generations. (NN stands for “Not Needed” and is used where a success rate of 25/30 or more is achieved and needs no more experiments. These success rates mark the successful runs and are highlighted in green. Unsuccessful runs are shown in blue).
Table 2. Success rate and execution time of evolved SDs according to the LS and TS method with respective population size and number of generations. (NN stands for “Not Needed” and is used where a success rate of 25/30 or more is achieved and needs no more experiments. These success rates mark the successful runs and are highlighted in green. Unsuccessful runs are shown in blue).
Parameter
Values
Training and Test
Results Using LS
Training and Test
Results Using TS
Population
Size
Number of
Generations
Success
Rate
Execution
Time
Success
Rate
Execution
Time
10003009/3057 min 42 s02/3059 min 36 s
10017/30178 min 41 s06/30177 min 42 s
50029/30867 min 56 s20/30870 min 23 s
1000NNNN23/301732 min 53 s
5000100NNNN20/30872 min 45 s
500NNNN30/304348 min 15 s
Table 3. Nominal temperature and supply voltage for logic synthesis of relevant technologies.
Table 3. Nominal temperature and supply voltage for logic synthesis of relevant technologies.
Parameters45 nm90 nm180 nm
FCSCFCSCFCSC
Temperature (°C)012501250125
Voltage (V)1.321.081.10.91.981.62
Table 4. A comparison of synthesis reports generated using GPDK 45 nm, 90 nm, and 180 nm on FC and SC in terms of the best (minimum), average, standard deviation, median, worst (maximum), and statistical hypothesis test’s p-values of area (measured in the unit of number of cells) and PDP (measured in the unit of milliwatt-picoseconds) between the Gold and evolved circuits using TS and LS.
Table 4. A comparison of synthesis reports generated using GPDK 45 nm, 90 nm, and 180 nm on FC and SC in terms of the best (minimum), average, standard deviation, median, worst (maximum), and statistical hypothesis test’s p-values of area (measured in the unit of number of cells) and PDP (measured in the unit of milliwatt-picoseconds) between the Gold and evolved circuits using TS and LS.
Gold
Circuit
Parameter45 nm90 nm180 nm
FCSCFCSCFCSC
Area19262020 1717
PDP115.780.5664.5179.2 356.5 483.1
45 nmParameterEvolved Through TS
FCSC
BestMeanSTDMed.Worstp-valueBestMeanSTDMed.Worstp-value
Area18 24.66 4.84 25 37 5.26e-0721 29.3 4.78 30 40 7.2e-04
PDP106.1126.911.08125.85157.465.44e-0672.0888.079.2687.64110.61.21e-04
ParameterEvolved Through LS
FCSC
BestMeanSTDMed.Worstp-valueBestMeanSTDMed.Worstp-value
Area1225.934.5226335.47e-091931.034.5231381.86e-06
PDP110.8135.6214.81131.96160.786.92e-0866.694.9513.4793.6117.153.57e-06
90 nmParameterEvolved Through TS
FCSC
BestMeanSTDMed.Worstp-valueBestMeanSTDMed.Worstp-value
Area1724.44.0324.5331.69e-061724.44.0824.5332.07e-06
PDP58.364.474.1463.3877.670.9672.2179.755.7978.3296.810.607
ParameterEvolved Through LS
FCSC
BestMeanSTDMed.Worstp-valueBestMeanSTDMed.Worstp-value
Area1325.554.2925331.46e-071325.524.1925331.02e-07
PDP57.267.47.4064.7581.480.04770.5483.429.5680.04101.580.025
180 nmParameterEvolved Through TS
FCSC
BestMeanSTDMed.Worstp-valueBestMeanSTDMed.Worstp-value
Area1723.53.8623.5314.14e-101623.73.9224312.93e-10
PDP317.9365.624.49360.77440.10.05404.8471.640.57471.9596.420.13
ParameterEvolved Through LS
FCSC
BestMeanSTDMed.Worstp-valueBestMeanSTDMed.Worstp-value
Area1224.454.2824333.98e-101624.13.7824327.52e-11
PDP319.6377.2141.84369.2454.780.013418.5503.159.34483.47614.370.08
Table 5. T-test results run on the groups of solution circuits evolved through LS and TS under the relevant GPDK technologies.
Table 5. T-test results run on the groups of solution circuits evolved through LS and TS under the relevant GPDK technologies.
Parameter45 nm90 nm180 nm
FCSCFCSCFCSC
AreaPDPAreaPDPAreaPDPAreaPDPAreaPDPAreaPDP
p-value0.3040.0140.1570.0270.2930.0770.3040.0820.3760.2020.6890.022
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.

Share and Cite

MDPI and ACS Style

Majeed, B.; Sarma, R.; Youssef, A.; Dias, D.M.; Ryan, C. Automatic Generation of Synthesisable Hardware Description Language Code of Multi-Sequence Detector Using Grammatical Evolution. Algorithms 2025, 18, 345. https://doi.org/10.3390/a18060345

AMA Style

Majeed B, Sarma R, Youssef A, Dias DM, Ryan C. Automatic Generation of Synthesisable Hardware Description Language Code of Multi-Sequence Detector Using Grammatical Evolution. Algorithms. 2025; 18(6):345. https://doi.org/10.3390/a18060345

Chicago/Turabian Style

Majeed, Bilal, Rajkumar Sarma, Ayman Youssef, Douglas Mota Dias, and Conor Ryan. 2025. "Automatic Generation of Synthesisable Hardware Description Language Code of Multi-Sequence Detector Using Grammatical Evolution" Algorithms 18, no. 6: 345. https://doi.org/10.3390/a18060345

APA Style

Majeed, B., Sarma, R., Youssef, A., Dias, D. M., & Ryan, C. (2025). Automatic Generation of Synthesisable Hardware Description Language Code of Multi-Sequence Detector Using Grammatical Evolution. Algorithms, 18(6), 345. https://doi.org/10.3390/a18060345

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