Globally Adapt Receiver Components Using Pulse Response Metrics to Improve SerDes Performance
This example shows how to perform optimization of a set of receiver components as a system using functionoptPulseMetric
to calculate metrics such as eye height, width and channel operating margin (COM) estimate from a pulse response at a target bit error rate (BER) to evaluate the optimal performance of a particular configuration. The adaptation is performed as statistical analysis (Init), then the optimized result is passed to time-domain (GetWave).
Initialize SerDes System with Multiple CTLEs and DFECDR
This example uses the SerDes Designer modelrx_ctle_adapt_dfe_train
as a starting point. Type the following command in the MATLAB® command window to open the model:
>> serdesDesigner('rx_ctle_adapt_dfe_train.mat')
This project contains a receiver section with two CTLE blocks followed by a DFECDR block. In their default configuration, these blocks optimize individually. The goal of this example is to optimize the blocks as a system.
For theCTLE_LowFreq
block, thePeaking frequency (GHz)is set to[10 11 12 13 14 15 16]
,DC gain (dB)is set to[0 0 0 0 0 0 0]
, and thePeaking gain (dB)is set to0
. All other parameters are kept at their default values.
For theCTLE_HighFreq
block, theSpecificationis set toDC Gain and AC Gain
,Peaking frequency (GHz)is set to14
,DC gain (dB)is set to0
, and theAC gain (dB)is set to[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
. All other parameters are kept at their default values.
For the DFECDR block, theInitial tap weights (V)is set to[0 0 0 0 0 0 0 0 0 0]
. All other parameters are kept at their default values.
Export the SerDes system to a Simulink® model.
Add Code to Optimize CTLEs and DFECDR as System
Double click the Init subsystem inside the Rx block and click on theShow Initbutton. You can place code in theCustom user code areafrom the following steps and save the model. The code is broken down below in several subsections for easy comprehension.
Note:To complete the example, you can also reference the attached file'rx_init_custom_user_code.m'
and place in theCustom user code areainside the Init subsystem. For more information about Init subsystem, seeStatistical Analysis in SerDes Systems.
Initialize Receiver Parameters
The first section of theCustom user code areachecks if both CTLEs are in adapt mode and instantiating variables to hold temporary values and the best configuration metrics.
%% BEGIN: Custom user code area (retained when 'Refresh Init' button is pressed)% If both CTLEs are in Adapt mode, use global adaptationifCTLE_LowFreqParameter.Mode == 2 && CTLE_HighFreqParameter.Mode == 2 CTLE_LowFreqInitBestConfig = 0; CTLE_HighFreqInitBestConfig = 0; bestMetric = 0; SPB = SymbolTime/SampleInterval;
Sweep CTLE Parameters
The example code sets the CTLE.Mode parameter fromadapt
tofixed
to allow algorithmic control of the values for each block. In this case the values are directly swept and the blocks are called to process the impulse response.
CTLE_LowFreqInit.Mode = 1; CTLE_HighFreqInit.Mode = 1;forCTLE_LowFreqInitSweep = 0:1:6forCTLE_HighFreqInitSweep = 0:1:15% Set current sweep configs on each CTLECTLE_LowFreqInit.ConfigSelect = CTLE_LowFreqInitSweep; CTLE_HighFreqInit.ConfigSelect = CTLE_HighFreqInitSweep;% Call CTLEs and DFE[sweepImpulse, ~] = CTLE_LowFreqInit(LocalImpulse); [sweepImpulse, ~] = CTLE_HighFreqInit(sweepImpulse); [sweepImpulse, ~, ~, ~, ~] = DFECDRInit(sweepImpulse);
Convert Impulse Response to Pulse Response and Evaluate with optPulseMetric
Convert the impulse response to a pulse response for evaluation by the functionoptPulseMetric
. A pulse response lends itself to metrics-based evaluation more readily than an impulse response. TheoptPulseMetric
function is used to optimize the SerDes system as a whole. Many metrics are reported by this function and you can use an algorithm to evaluate multiple receiver components together as a system.
Note:The functionoptPulseMetric
is designed to analyze a single response, not a matrix of responses, so you can usesweepPulse(:,1)
to trim the main response from an impulse matrix or pulse matrix.
% Convert impulse after DFE to pulse then calculate eye metricssweepPulse = impulse2pulse(sweepImpulse,SPB,SampleInterval); eyeMetric = optPulseMetric(sweepPulse(:,1),SPB,SampleInterval,1e-6);% Select eye metric to evaluate resultssweepMetric = eyeMetric.maxMeanEyeHeight;% sweepMetric = eyeMetric.maxEyeHeight;% sweepMetric = eyeMetric.maxCOM;% sweepMetric = eyeMetric.centerMeanEyeHeight;% sweepMetric = eyeMetric.centerEyeHeight;% sweepMetric = eyeMetric.centerCOM;
Evaluate optPulseMetric Results
Save the CTLE configurations based on comparison to previous results. The final best configurations are saved on the blocks for a final statistical (Init) analysis and then passed to time-domain (GetWave) simulation.
% If current sweep metric is better than previous, save the CTLE configsifsweepMetric > bestMetric bestMetric = sweepMetric; CTLE_LowFreqInitBestConfig = CTLE_LowFreqInitSweep; CTLE_HighFreqInitBestConfig = CTLE_HighFreqInitSweep;endendend% Set CTLEs to best configs from sweepCTLE_LowFreqInit.ConfigSelect = CTLE_LowFreqInitBestConfig; CTLE_HighFreqInit.ConfigSelect = CTLE_HighFreqInitBestConfig;end% END: Custom user code area (retained when 'Refresh Init' button is pressed)
Run SerDes System
Run the SerDes system and observe the optimizing behavior. You can try changing which metric is evaluated to perform different optimizations.