StatOpt: A Statistical Eye Analysis and Link Optimization Tool
Department of Electrical and Computer Engineering University of Toronto Contributors: |
Python Version of StatOpt:
StatOpt is a statistical eye analysis and link optimization tool for wireline communications, developed in both MATLAB and Python 3. The tool uses statistical methods to model various wireline effects and to estimate the link performance metrics such as the bit error rate and eye dimensions (eye's horizontal and vertical openings). The tool also produces various plots relating to link performance.
Download Python Version of StatOpt.
Short Tutorial Video (6 minutes) of the Python StatOpt Tool
Walkthrough Tutorial Video (23 minutes) of the Python StatOpt Tool
Detailed Features and Guide:
- Reading in Touchstone (
.s4p) files for channel data
- Simulating and characterizing the performance of different modulation schemes such as PAM-4, with different signaling (including 1+D and 1+0.5D)
- Introducing the impairment effects of cross-talk, jitter, noise, and distortion
- Plotting channel and equalizer behaviour curves
Operation
- Optimizing equalizers for a given system configuration using a genetic algorithm
Operation of the StatOpt tool is meant to be simple. The majority of user effort is in configuring the simulation to suit one's needs. The general flow for setting up and running a simulation is as follows.
- Upload desired Touchstone (
.s4p) files and/or.matfiles to describe distortion or pulses.
- Files for channels need to go into the
/channels/folder. (Both.s4pand.matchannel descriptions).
- All others (predefined pulses, distortion, etc.) are to be kept in the base directory, alongside this readme file.
- Configure simulation settings to match desired parameters. Check the example files for baseline configurations.
- Refer to desired files for channels
- Set desired output plots
- Adjust the amount of taps in equalizers
- Select the parameters to be adjusted in the adaption process, if enabled
- Adjust the
statopt.pyscript to read the simulation configuration function from the desired simulation file.
- Run the
statopt.pyscript.
- If the simulation is expected to take a long time, the user will need to confirm that they want the simulation to proceed.
- Wait for the simulation to complete.
- Enjoy the results!
Tip: To increase the speed of the simulation, reduce the number of impulse response pre- and post-cursors. Do note that this will reduce the accuracy of the final results.
Knob DefinitionsThere are many knobs that can have an effect on the simulation, here is a complete list with explanations:
General SettingsAdaption
Setting Knob Explanation general.symbolRateThe system sampling rate [samples/second] general.signalingModeThe modulation scheme ('standard': conventional baseband, '1+D' and '1+0.5D': partial signaling, 'clock': a clock signal) NOTE: Adaption is primarily tuned for standard signaling. general.modulationNumber of modulation levels (2: NRZ, 4: PAM4) general.samplesPerSymbTime-domain resolution of the eye diagram general.yAxisLengthVoltage-domain resolution of the eye diagram general.numbSymbNumber of periods to display in the eye diagram general.contLevelsNumber of contour levels in the eye diagram general.targetBERBit-error-rate level to perform eye measurements (Vertical/horizontal eye opening, COM, also used as target for adaption) general.plotting.channelResponseDisplay channel response general.plotting.CTLEResponseDisplay CTLE response general.plotting.pulseResponseDisplay pulse response general.plotting.jitterSourceDisplay jitter distribution general.plotting.noiseSourceDisplay noise distribution general.plotting.distortionSourceDisplay linear distortion general.plotting.ISIDisplay trace eye diagram (Careful: This can take a long time to display) general.plotting.PDFInitialDisplay impairment-free eye diagram general.plotting.PDFCrossTalkDisplay eye diagram after adding cross-talk general.plotting.PDFDistortedDisplay eye diagram after adding linear distortion general.plotting.PDFJitterDisplay eye diagram after adding jitter general.plotting.PDFNoiseDisplay eye diagram after adding noise general.plotting.PDFFinalDisplay final eye diagram general.plotting.BERDisplay BER contour levels superimposed over BER plot general.plotting.BER2Display BER contour levels superimposed over eye diagram (final PDF) general.plotting.resultsDisplay eye measurement results Transmitter Settings
Setting Knob Explanation adaption.adaptRun adaption algorithm NOTE: Adaption is primarily tuned for standard signaling. adaption.totalParentsNumber best candidates to keep from previous generation adaption.childrenPerParentNumber of new candidates to generate per parent adaption.totalMutationsNumber of randomly generated candidates adaption.mode1GenerationsNumber of generations to run while applying coarse adjustment adaption.mode2GenerationsNumber of generations to run while applying fine adjustment adaption.knobsSpecify which knobs to optimize (must provide full path i.e.: 'transmitter.EQ.taps.pre1')Channel Settings
Setting Knob Explanation transmitter.signalAmplitudeTransmitter supply voltage (peak differential) [V] transmitter.includeSourceImpedanceInclude 50ohm source impedance (halves transmit signal voltage). NOTE: This just scales the output; the simulation does not handle reflections. transmitter.tRiseSignal rise time [s] transmitter.TXBandwidthTransmitter analog bandwidth [Hz] transmitter.preCursorCountNumber of ISI pre-cursors to consider in eye diagram generation transmitter.postCursorCountNumber of ISI post-cursors to consider in eye diagram generation transmitter.EQ.addEqualizationApply FIR equalization transmitter.EQ.tapsSpecify FIR equalization tap values transmitter.jitter.addJitterApply transmitter jitter transmitter.jitter.stdDeviationSpecify random jitter standard deviation [UI] transmitter.jitter.amplitudeSpecify deterministic jitter amplitude [UI] transmitter.jitter.DCDSpecify duty-cycle distortion jitter [UI] transmitter.noise.addNoiseApply transmitter noise transmitter.noise.stdDeviationSpecify random noise standard deviation [V] transmitter.noise.amplitudeSpecify deterministic noise amplitude [V] transmitter.noise.frequencySpecify deterministic noise frequency [Hz] transmitter.distortion.addDistortionAdd transmitter linear distortion transmitter.distortion.fileNameFile specifying 1-to-1 voltage mapping (structure containing "input" and "output" vectors of same length) Receiver Settings
Setting Knob Explanation channel.addChannelApply channel to link channel.addCrossTalkApply crosstalk channel.addNotchApply a notch to channel transfer function channel.notchFreqSpecify notch frequency [Hz] channel.notchAttenuationSpecify notch attenuation [dB] channel.modelCircuitTFConvolve link response with an additional pulse response to model a circuit who's response is known channel.modelCircuitTFNameSpecify additional pulse response file channel.overrideResponseOverride transmitter and channel response with a custom pulse response (can still apply receiver equalization) channel.overrideFileNameSpecify custom pulse response file channel.approximateApproximate cross-talk as a noise source to speed up simulation channel.makeAsynchronousAssume aggressor channels are not synchronized with victim channel and thus impairment is applied to all sampling phases equally channel.fileNamesSpecify channel files (includes THRU, NEXT and FEXT channels) channel.noise.addNoiseApply thermal noise channel.noise.noiseDensitySpecify thermal noise density [V^2/Hz] Dependencies
Setting Knob Explanation receiver.signalAmplitudeSpecify receiver supply voltage [V] (Y-limits of receiver plots) receiver.preAmp.addGainApply pre-amplification receiver.preAmp.gainSpecify pre-amplification gain receiver.CTLE.addEqualizationApply continuous-time linear equalization receiver.CTLE.zeroFreqSpecify CTLE transfer function zero frequency [Hz] receiver.CTLE.zeroNumbSpecify number of zeros to apply to CTLE transfer function receiver.CTLE.pole1FreqSpecify primary CTLE transfer function pole frequency [Hz] receiver.CTLE.pole1NumbSpecify number of primary poles to apply to CTLE transfer function receiver.CTLE.pole2FreqSpecify secondary CTLE transfer function pole frequency [Hz] receiver.CTLE.pole2NumbSpecify number of secondary poles to apply to CTLE transfer function receiver.FFE.addEqualizationApply FFE equalization receiver.FFE.tapsSpecify FFE tap values receiver.DFE.addEqualizationApply DFE equalization receiver.DFE.tapsSpecify DFE tap values receiver.jitter.addJitterApply receiver jitter receiver.jitter.stdDeviationSpecify random jitter standard deviation [UI] receiver.jitter.amplitudeSpecify deterministic jitter amplitude [UI] receiver.jitter.DCDSpecify duty-cycle distortion jitter [UI] receiver.noise.addNoiseApply receiver noise receiver.noise.stdDeviationSpecify random noise standard deviation [V] receiver.noise.amplitudeSpecify deterministic noise amplitude [V] receiver.noise.frequencySpecify deterministic noise frequency [Hz] receiver.distortion.addDistortionAdd receiver linear distortion receiver.distortion.fileNameFile specifying 1-to-1 voltage mapping (structure containing "input" and "output" vectors of same length) In addition to running Python 3.10 or newer, the following libraries are needed to run this code:
These can all be automatically installed/verified to be the right versions using the following command in the project directory:
pip install -r requirements.txtNOTE: This may run on earlier versions of the packages and Python, but it has only been extensively tested on Python 3.10 with the package versions specified as the minimums in
Credit/Acknowledgementrequirements.txt.Originally written in MATLAB by Jeremy Cosson-Martin and Jhoan Salinas under the supervision of Prof. Ali Sheikholeslami. Porting to Python was done by Savo Bajic as a project for Ali Sheikholeslami's wireline course (ECE1392) at the University of Toronto, based on version 1.11 in MATLAB, although it has been updated since in parallel with the MATLAB version.
The Touchstone files used for examples were provided by Samtec as part of the IEEE 802.3ck 100 Gb/s per Lane Electrical Study Group. More information is available in the Touchstone folder readme.