Calculate SNDR and RLM with SerDes Simulink Model
This example shows how to calculate the signal-to-noise and distortion ratio (SNDR) and ratio of level-mismatch (RLM) at the transmitter package channel output with a SerDes Toolbox™ Simulink™ model. The model can be leveraged to create a PCIe7 IBIS-AMI model for use in the Serial Link Designer from Signal Integrity Toolbox™.
This example is part of a collection of three examples where the SNDR and RLM calculations are featured. See the Calculate SNDR and RLM with System Object Scripting example to learn how to generate waveforms and calculate SNDR and RLM with MATLAB® scripting. See the Calculate SNDR and RLM with IBIS-AMI Simulator example to learn how to post-process IBIS-AMI Serial Link Designer simulation results to calculate the SNDR and RLM.
SNDR and RLM are important metrics for PCIe6 and PCIe7 as well as some IEEE and CEI interface standards. The SNDR must be at least 34 dB and the RLM at least 0.95 for both PCIe6 and PCIe7. The metric calculations use a Multi-Pulse Fit Response (MPFR)-based methodology derived by extracting pulse responses from the transmitter output compliance pattern waveform. This approach reduces the impact of channel loss and duty cycle distortion from the metric calculation.
PCIe7 Transmitter Simulink Model
Open the PCIe7 transmitter Simulink model TransmitterPCIe7
attached with this example. The model consists of a block to inject symbol voltage ratio of level mismatch (RLM) impairments, a block to inject random noise for a more realistic SNDR measurement and a block which implements the FFE equalization tap weight presets. The model also includes a representative 8.5 dB transmit package channel model. The receiver subsystem is empty. To learn more about how the model was created, see Details about Simulink Model.
Simulating Tx Package Output Waveform
Run the Simulink model to generate the transmitter package output waveform.
% Define example model name. model = 'TransmitterPCIe7'; open_system(model); simout = sim(model);
Note that without the aid of receiver equalization, the simulation results of the transmitter package output show closed eye diagrams.
Extract Simulation Results
Retrieve the simulation symbol time, sample interval, and the waveform after the package channel model.
% Extract from the Simulink model workspace the simulation sample interval % and symbol time. mdlWks = get_param(model,'ModelWorkspace'); SymbolTime = mdlWks.getVariable('SymbolTime').Value; SampleInterval = mdlWks.getVariable('SampleInterval').Value; % Get waveform after the package channel BlockPathName = [model,'/Analog Channel']; rxInDataSet = find(simout.logsout,'BlockPath',BlockPathName); if numElements(rxInDataSet)==0 error('Could not find logged signal after Analog Channel. Please select signal line, right click and select ''Log Selected Signals'', before re-running simulation.') end wavePackageOutput = squeeze(rxInDataSet{1}.Values.Data);
Define Data Pattern
Define the data pattern to create the waveform using the Stimulus block. You must use the same data pattern as the input to the sndr
for the SNDR calculation. The lane value is set to 0
and is valid for integers 0
to 7
.
DataPattern = si.PCIeCompliancePattern(0);
Calculate SNDR and RLM
After creating the transmitter package output waveform and defining the data pattern, you can create a sndr
object and calculate the SNDR and RLM metrics according to the PCIe7 specification.
% Create SNDR object sndrObj = sndr('Wave',wavePackageOutput,... 'InputSampleInterval',SampleInterval,... 'DataPattern',DataPattern,... 'Standard','PCIe',... 'SymbolTime',SymbolTime); % Generate SNDR and RLM reports report(sndrObj)
For Standard=pcie SNDR = 34.0602 dB Pmax (Effective) = 271.499 mV SigmaNoise = 4.21426 mV SigmaError = 3.34383 mV RLM = 0.949506 V0 = -243.658 mV V1 = -81.1046 mV V2 = +77.1184 mV V3 = +243.658 mV
These results show that the system under test complies with the PCIe7 SNDR requirement of at least 34 dB, while the RLM metric is below the required 0.95 value.
Ideas for Further Exploration
Use the sndr plot methods, plotDataPattern, plotAveragingResults, plotWaveResampled, plotSigmaNoise, plotVLik, plotLPFR, plotMPFROddEven, or plotMPFR4 to better understand the metric computational process. For example, the following command illustrates the multiple fitted pulse response results:
plotMPFROddEven(sndrObj)
What impact does adding SJ to the system make to the averaging results plot and the VLik plot? Try the plotting methods
plotVlik(sndrObj)
andplotSigmaNoise(sndrObj)
.How does having a non-ideal Q0 Tx FFE setting impact the metrics? See the PCIe6 Transmitter/Receiver IBIS-AMI Model (SerDes Toolbox) example for details on how to update the FFE setting.
How much does the SNDR and RLM metrics change as the data pattern 'lane' parameter is changed from 0 through 7?
How does adding RJ and DJ jitter influence the metrics?
How does package loss and/or characteristic impedance and termination impedance impact the metrics?
What system parameters have the largest impact on the RLM metric beyond the bias voltage injected by the RLM block?
What factors impact the magnitude of the fit error?
How does increasing the number of waveform repetitions to more than 250, as called for by the spec, change the metric calculation? The compliance pattern is 8768 symbols long, so the number of symbols to simulate would be more than 2,192,000 symbols.
How does the SNDR and RLM metrics change due to samples per symbol changes and as resampling method changes from 'spline' to 'linear'?
Export IBIS-AMI Transmitter Model
To export a PCIe7 transmitter IBIS-AMI model from Simulink,
Open the SerDes IBIS-AMI Manager Export tab
Rename the Tx model name to "pcie7_tx"
Rename the IBIS file name to "pcie7_transmitter.ibs"
Click the Export button
After export is complete, you can use the Signal Integrity Link to create a Serial Link Designer project with the PCIe7 transmitter IBIS-AMI model.
Details about Simulink Model
To create the Simulink model, first design the floor plan of the SerDes system in the SerDes Designer app. Use two PassThrough and a FFE block in the transmitter. Use the Configuration tab in the app toolstrip to:
Set symbol time to 15.625e-12 for 128.0 GT/s
Set modulation to PAM4
Enable transmitter DCD, Rj, Dj, Sj and SjFrequency
Update the channel block to
Set channel loss to 8.5 dB
Exported the model to Simulink. Modify the Stimulus block by:
Updating the stimulus to run 50000 symbols
Updating the stimulus waveform creation method to use a symbol pattern and setting the symbol pattern to be "
si.PCIeCompliancePattern(0)'
". Here the0
argument is the compliance pattern lane value. Valid lane values include0
,1
,2
,3
,4
,5
,6
, and7
.
Log the signal line at the output of the channel block to use the waveform for SNDR analysis.
To learn how to modify the first pass-through block to inject RLM, see the Level Separation Mismatch Ratio (RLM) using IBIS-AMI (SerDes Toolbox) example. But in this example the equation used to map from the desired RLM value to the symbol 2 bias voltage is updated for the newer PCIe7 version of RLM.
To learn how to modify the second pass-through block to inject noise, see ADC IBIS-AMI Model Based on COM (SerDes Toolbox) example. But in this example the NoisePSD
value is set to 2e-6
, which was chosen so that the resulting SNDR was approximately 34 dB.
To learn how to modify the FFE block to facilitate the inclusion of the 11 different PCIe7 preset tap configurations, see the PCIe6 Transmitter/Receiver IBIS-AMI Model (SerDes Toolbox) example.