ADC IBIS-AMI Model Based on COM with Genetic Algorithm Optimization
This example shows how to improve the performance of SerDes global optimization through the use of genetic algorithms and statistical analysis. The IEEE 802.3ck specification 100G ADC-based COM model serves as a base platform to showcase this optimization technique.
As SerDes data rates increase, the complexity of the equalization schemes used to recover the transmitted bits must also increase. The additional complexity results in many challenges. One of the most critical of them is finding an optimized global configuration of the equalization components while also arriving at that solution quickly. By default, SerDes Toolbox™ equalizer blocks with built-in adaptation (AGC, CTLE, DFECDR/CDR) optimize locally at each step of the data path, providing a reasonable and fast solution for most situations. Optimizing the entire Tx/Rx system equalization as a whole is referred to as Globally Adapt Receiver Components Using Pulse Response Metrics to Improve SerDes Performance and is more durable across different SerDes and channel combinations. As this global optimization approach leverages a brute force method to find an optimal solution, a penalty is incurred on the run time of the model. Depending on the solution space of the equalizer controls, configurations can approach the billions (a single CTLE can approach the thousands). This example focuses on increasing the performance of adaptation by using a balanced optimization solution based on a genetic algorithm (GA) to intelligently narrow down the solution space and hone in on an optimal SerDes configuration for a given channel.
Model Setup
The Simulink® model and supporting files attached to this example are based on the ADC IBIS-AMI Model Based on COM example. In this example, the Tx FFE and the two Rx CTLEs are optimized using the GA optimization. The Rx FFE and DFECDR are already fast and provide the optimal answer using original optimization. Even with a limited solution space of four FFE taps and two CTLEs, a brute force algorithm would need to loop through over 400 million combinations to find the optimal configuration. Optimization takes place in the statistical portion of the model referred to as Init and is centered around the processing of impulse responses making analysis faster than a time domain approach. The example then forwards the optimized configuration from statistical analysis to the time-domain portion of the model so that both benefit from the optimization.
Open the model attached with this example:
open("GAExample.slx")
The model is already customized to use the GA optimization.
Proxy Tx
The model assumes that the SerDes system under design is a paired Tx and Rx model (only run together) allowing for something called a Proxy Tx. This is where the Tx equalization is moved to the Rx so that the entire Tx — Channel — Rx system can be considered in one place. This is only possible because the LTI (linear time-invariant) assumption of statistical analysis. The time-domain analysis is unaffected. The end result is that the Rx Init optimizes and simulates both the Tx and Rx equalization then pass the optimized Tx and Rx configurations to the time-domain equalizers via Data Stores for use. The forwarding of the optimized Tx configuration leverages a Simulink-only technique called pseudo back-channel. To learn how to formalize this for compatibility with IBIS-AMI models, see Code Generation.
To add the Proxy Tx:
A PassThrough block named ProxyTx is added at beginning of the Rx datapath. Inside the block, MATLAB System blocks referencing the
serdes.FFE
andserdes.VGA
System Object™s are added. This allowes the Init code to add references for use in the Custom user code area after refreshing Init. In each MATLAB System block, Mode parameter is hardcoded to0
(off) because time-domain processing is still done in the Tx and not the Rx.InOut AMI parameters are added to the above PassThrough block for control of each equalizer (FFE: TapWeights, VGA: Gain).
The automatically added Data Store Write after each AMI parameter addition are not used in this example. They are deleted.
The Data Store Read blocks from the Proxy Tx are cut and pasted to the Tx versions of the FFE and VGA replacing the existing Constant block. This switch of control blocks mimics a back-channel flow where the Rx Init code controls the value of the Tx in Time Domain simulation. This technique is referred to as pseudo back-channel and only works in the Simulink model.
The Init code of the Tx is edited to add code that forces the Tx FFE and VGA to Off in the Custom user code area. This is done so that the Tx equalization is not double counted in the Init simulations.
Implement Genetic Algorithm
A genetic algorithm (GA) is an optimization and search technique based on the principles of genetics and natural selection. It generates solutions to problems by creating, evaluating, and evolving a population of candidate solutions. Key steps include initializing a population of solutions, selecting parents, performing crossover and mutation to produce offspring, and iterating this process over generations. The algorithm evolves solutions towards better fitness through successive generations, aiming to find the best solution.
The GA algorithm used in this example called gaSI
function. It supports code generation enabling deployment via IBIS-AMI models. The GA algorithm is used to control the configurations to be run using statistical simulation instead of a brute force sweep through all the configurations. The optimized configurations are forwarded to the time-domain portion of the model where the more accurate sample-by-sample simulation can run.
To implement a GA algorithm, the Rx Init Custom user code area is rewritten. A high-level outline of the updated code flow is:
Setup the simulation parameters such as max generations (limit of calls to the GA algorithm) and population size (amount of cases per generation).
Setup the solution space of the Tx FFE (3 pre-taps, 1 post-tap with
-0.2
to0.2
range) and Rx CTLEs (7
and21
configurations) to optimize.Call the GA algorithm to generate a case table of configurations to simulate (a generation).
Run each statistical simulation and generate a FoM (figure of merit) from the resulting equalized impulse response which is added to the case table.
Pass the case table back to the GA algorithm for a new set of cases to run.
Stop generating cases when the max generations limit is reached or the FoM stops improving.
Set and output final optimized values.
Inspect the prepopulated Custom user code area of the Rx Init code to dive deeper into details.
Other Simulation Modifications
The channel loss is increased to a more challenging 32
dB and crosstalk is left enabled to stress the optimization algorithm. Time-domain ignore bits for the Rx was increased to 14,000
UI to give the adaptation additional time to converge mainly due to the PAM4 threshold settle time.
Run Simulation
When running either the full model in Simulink or only the Init only portion with the External Init option, note that at the end of each generation, the best FoM and configuration are output to the diagnostic viewer so that you can track the optimization progress. By default, the model is configured for a max generation of 10 with a population size of 80 which results in around 800 statistical simulations being performed. This is much smaller than the 400 million in a brute force approach. The results show an open eye with an approximate eye height of 40mV for each PAM4 eye in the time domain analysis. Try altering the max generations and population size to weigh the trade-off between total simulation time and optimization quality.
Code Generation
You can generate an IBIS-AMI model for the Tx and Rx with the GA optimization built-in. As mentioned in the Proxy Tx section, the pseudo back-channel implementation only works in Simulink as configured in the included model. To adapt the model for the requirements of generating an IBIS-AMI model, the optimized Tx FFE tap values need to be forwarded to the Tx IBIS-AMI model using the back-channel technique. This requires you to create a text file with the tap values from the Rx Init code and then make the Tx time-domain model read and apply those values. To learn how to accomplish this, see the Design DDR5 IBIS-AMI Models to Support Back-Channel Link Training example. You can also simplify the model to remove control of the Tx FFE taps from the GA optimization loop while still retaining the benefit of GA adaptation for the CTLEs.
External Init
When writing complex custom codes for Init as is done in this example, it can be time consuming to wait for the Simulink model to compile and execute for each code change especially when you are only concerned with Init. You can use the External Init option in the Init function to speed the process. External Init allows the Init code to run just as it would in Simulink including plotting the results, but using only MATLAB®. For more information, see Design IBIS-AMI Models to Support Rx Decision Time.