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.mat
files to describe distortion or pulses.
- Files for channels need to go into the
/channels/
folder. (Both.s4p
and.mat
channel 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.py
script to read the simulation configuration function from the desired simulation file.
- Run the
statopt.py
script.
- 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.symbolRate
The system sampling rate [samples/second] general.signalingMode
The 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.modulation
Number of modulation levels (2: NRZ, 4: PAM4) general.samplesPerSymb
Time-domain resolution of the eye diagram general.yAxisLength
Voltage-domain resolution of the eye diagram general.numbSymb
Number of periods to display in the eye diagram general.contLevels
Number of contour levels in the eye diagram general.targetBER
Bit-error-rate level to perform eye measurements (Vertical/horizontal eye opening, COM, also used as target for adaption) general.plotting.channelResponse
Display channel response general.plotting.CTLEResponse
Display CTLE response general.plotting.pulseResponse
Display pulse response general.plotting.jitterSource
Display jitter distribution general.plotting.noiseSource
Display noise distribution general.plotting.distortionSource
Display linear distortion general.plotting.ISI
Display trace eye diagram (Careful: This can take a long time to display) general.plotting.PDFInitial
Display impairment-free eye diagram general.plotting.PDFCrossTalk
Display eye diagram after adding cross-talk general.plotting.PDFDistorted
Display eye diagram after adding linear distortion general.plotting.PDFJitter
Display eye diagram after adding jitter general.plotting.PDFNoise
Display eye diagram after adding noise general.plotting.PDFFinal
Display final eye diagram general.plotting.BER
Display BER contour levels superimposed over BER plot general.plotting.BER2
Display BER contour levels superimposed over eye diagram (final PDF) general.plotting.results
Display eye measurement results Transmitter Settings
Setting Knob Explanation adaption.adapt
Run adaption algorithm NOTE: Adaption is primarily tuned for standard signaling. adaption.totalParents
Number best candidates to keep from previous generation adaption.childrenPerParent
Number of new candidates to generate per parent adaption.totalMutations
Number of randomly generated candidates adaption.mode1Generations
Number of generations to run while applying coarse adjustment adaption.mode2Generations
Number of generations to run while applying fine adjustment adaption.knobs
Specify which knobs to optimize (must provide full path i.e.: 'transmitter.EQ.taps.pre1'
)Channel Settings
Setting Knob Explanation transmitter.signalAmplitude
Transmitter supply voltage (peak differential) [V] transmitter.includeSourceImpedance
Include 50ohm source impedance (halves transmit signal voltage). NOTE: This just scales the output; the simulation does not handle reflections. transmitter.tRise
Signal rise time [s] transmitter.TXBandwidth
Transmitter analog bandwidth [Hz] transmitter.preCursorCount
Number of ISI pre-cursors to consider in eye diagram generation transmitter.postCursorCount
Number of ISI post-cursors to consider in eye diagram generation transmitter.EQ.addEqualization
Apply FIR equalization transmitter.EQ.taps
Specify FIR equalization tap values transmitter.jitter.addJitter
Apply transmitter jitter transmitter.jitter.stdDeviation
Specify random jitter standard deviation [UI] transmitter.jitter.amplitude
Specify deterministic jitter amplitude [UI] transmitter.jitter.DCD
Specify duty-cycle distortion jitter [UI] transmitter.noise.addNoise
Apply transmitter noise transmitter.noise.stdDeviation
Specify random noise standard deviation [V] transmitter.noise.amplitude
Specify deterministic noise amplitude [V] transmitter.noise.frequency
Specify deterministic noise frequency [Hz] transmitter.distortion.addDistortion
Add transmitter linear distortion transmitter.distortion.fileName
File specifying 1-to-1 voltage mapping (structure containing "input" and "output" vectors of same length) Receiver Settings
Setting Knob Explanation channel.addChannel
Apply channel to link channel.addCrossTalk
Apply crosstalk channel.addNotch
Apply a notch to channel transfer function channel.notchFreq
Specify notch frequency [Hz] channel.notchAttenuation
Specify notch attenuation [dB] channel.modelCircuitTF
Convolve link response with an additional pulse response to model a circuit who's response is known channel.modelCircuitTFName
Specify additional pulse response file channel.overrideResponse
Override transmitter and channel response with a custom pulse response (can still apply receiver equalization) channel.overrideFileName
Specify custom pulse response file channel.approximate
Approximate cross-talk as a noise source to speed up simulation channel.makeAsynchronous
Assume aggressor channels are not synchronized with victim channel and thus impairment is applied to all sampling phases equally channel.fileNames
Specify channel files (includes THRU, NEXT and FEXT channels) channel.noise.addNoise
Apply thermal noise channel.noise.noiseDensity
Specify thermal noise density [V^2/Hz] Dependencies
Setting Knob Explanation receiver.signalAmplitude
Specify receiver supply voltage [V] (Y-limits of receiver plots) receiver.preAmp.addGain
Apply pre-amplification receiver.preAmp.gain
Specify pre-amplification gain receiver.CTLE.addEqualization
Apply continuous-time linear equalization receiver.CTLE.zeroFreq
Specify CTLE transfer function zero frequency [Hz] receiver.CTLE.zeroNumb
Specify number of zeros to apply to CTLE transfer function receiver.CTLE.pole1Freq
Specify primary CTLE transfer function pole frequency [Hz] receiver.CTLE.pole1Numb
Specify number of primary poles to apply to CTLE transfer function receiver.CTLE.pole2Freq
Specify secondary CTLE transfer function pole frequency [Hz] receiver.CTLE.pole2Numb
Specify number of secondary poles to apply to CTLE transfer function receiver.FFE.addEqualization
Apply FFE equalization receiver.FFE.taps
Specify FFE tap values receiver.DFE.addEqualization
Apply DFE equalization receiver.DFE.taps
Specify DFE tap values receiver.jitter.addJitter
Apply receiver jitter receiver.jitter.stdDeviation
Specify random jitter standard deviation [UI] receiver.jitter.amplitude
Specify deterministic jitter amplitude [UI] receiver.jitter.DCD
Specify duty-cycle distortion jitter [UI] receiver.noise.addNoise
Apply receiver noise receiver.noise.stdDeviation
Specify random noise standard deviation [V] receiver.noise.amplitude
Specify deterministic noise amplitude [V] receiver.noise.frequency
Specify deterministic noise frequency [Hz] receiver.distortion.addDistortion
Add receiver linear distortion receiver.distortion.fileName
File 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.txt
NOTE: 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.