Main Content

eyeDiagramSI

Create eye diagram from time-domain data

Since R2024a

Description

The eyeDiagramSI System object™ creates an eye diagram object by accumulating a 2-D histogram from time-domain eye diagram data. The object makes it easier to create large data sets and perform metric calculations.

To create the eye diagram object:

  1. Create the eyeDiagramSI object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

eye = eyeDiagramSI returns an eye diagram object that accumulates an eye diagram as 2-D histograms.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Nominal center amplitude for each eye opening in the eye diagram, specified as a vector.

Note

if you do not define the SymbolThresholds property, the object automatically calculates the symbol thresholds based on the Modulation property.

Tunable: Yes

Data Types: double

Elapsed time between adjacent samples in the input data, specified as a scalar in seconds.

Tunable: Yes

Data Types: double

Time span of one symbol, specified as a scalar in seconds.

Tunable: Yes

Data Types: double

Edge detection threshold for waveform clock signals, specified as a scalar.

Tunable: Yes

Data Types: double

Number of symbol levels in the eye diagram, specified as a scalar.

Note

If you do not define the Modulation property or it is set to 0, the object automatically sets it to ( number of eyes defined by the SymbolThresholds property+1).

Data Types: double

Method to sample waveform clock signals, specified as one of these:

  • Auto — Detect the clock input argument to automatically set the SampleOn property.

    If the clock signal is monotonically increasing, the System object considers it a time-based clock signal and sets SampleOn to Times.

    If the clock signal is non-monotonically increasing, the System object considers it a waveform and sets SampleOn to Rising.

  • Rising — Sample the data waveform at the rising edge of the clock waveform.

  • Falling — Sample the data waveform at the falling edge of the clock waveform.

  • Both — Sample the data waveform at both rising and falling edges of the clock waveform.

  • Times — Sample the data waveform at the time values specified by the clock signal.

Data Types: char

Method used by recovered clock to capture data, specified as one of these:

  • Auto — Detect the clock input argument to automatically set the ClockMode property.

    If you provide a clock signal, set ClockMode to Clocked. Otherwise, set ClockMode to Ideal.

  • Clocked — Capture data using the clock input.

  • Ideal — Capture data and clock using an ideal reference clock source.

  • Convolved — Capture data and clock PDF in the ideal mode and convolve them to present an eye diagram and clock pdf that look as though they were captured in the clocked mode.

For more information, see Clock Modes (Signal Integrity Toolbox).

Data Types: char

Algorithm used for clock phase detector (CDR). For more information, see Phase Detectors: Baud-Rate Type-A Versus Bang-Bang.

The phase detector algorithm used by the eyeDiagramSI System object are not full CDRs. They choose the best static phase to match the entire input data all at once, rather than adapting the phase to the data over time.

Data Types: char

Delay in seconds between the clock edge and the timing origin.

Note

Phase offset delay must be causal.

Data Types: double

Unit for phase offset delay, specified as Seconds, Samples, or UI.

Data Types: char

The width of the eye diagram in symbols, specified as a scalar.

Data Types: double

Number of time bins in the eye diagram, specified as a scalar.

Data Types: double

Number of amplitude bins in the eye diagram, specified as a scalar.

Data Types: double

Minimum and maximum eye amplitudes contained in the eye diagram, specified as a two-element vector.

Data Types: double

Eye diagram stack calculated for each symbol in the data, specified as a vector. The System object automatically sets this property from the data that you read in.

Tunable: Yes

Data Types: double

2D eye histogram spanning 1 or more UIs, specified as a vector, with time on the x-axis and amplitude on the y-axis. The System object automatically sets this property from the data that you read in.

Tunable: Yes

Data Types: double

Histogram of clock edge times relative to the timing origin, specified as a vector. This property is automatically set from the data that you read in.

Tunable: Yes

Data Types: double

Usage

Description

eye = eyeDiagramSI(data) creates an eye diagram object eye from time-domain waveform data.

example

eye = eyeDiagramSI(data,clock,thresholds) creates an eye diagram object eye from time-domain waveform data, clock, and time-varying thresholds.

Input Arguments

expand all

Uniformly sampled waveform data, specified as a vector. The System object uses this data to create an eye diagram object.

Sampling clock signal for input data, specified as a vector. The System object centers the windows for the eye pattern on the clock edges or clock times depending on the SampleOn property.

Symbol threshold(s) to use to separate symbols, specified as a vector or a matrix. The System object uses this value to separate symbols when building the eye diagram. If you provide this information, it increases the robustness of PAMn metrics. By default, its values is set to the value of the SymbolThresholds property.

Output Arguments

expand all

Eye diagram, created as an eye diagram object. The object is as an accumulation of 2-D histograms from the eye diagram data.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

eyeLevels (Mixed-Signal Blockset)Measure symbol level statistics from eye diagram
eyeAmplitude (Mixed-Signal Blockset)Measure eye amplitude
eyeCrossing (Mixed-Signal Blockset)Measure eye crossing points
eyeCenter (Mixed-Signal Blockset)Measure eye center point
risetime (Mixed-Signal Blockset)Measure rise time from eye diagram
falltime (Mixed-Signal Blockset)Measure fall time from eye diagram
eyeHeight (Mixed-Signal Blockset)Measure vertical eye opening
eyeWidth (Mixed-Signal Blockset)Measure horizontal eye opening
eyeArea (Mixed-Signal Blockset)Measure eye area
vec (Mixed-Signal Blockset)Measure vertical eye closure
com (Mixed-Signal Blockset)Measure channel operating margin
eyeLinearity (Mixed-Signal Blockset)Measure eye linearity
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

This example shows how to use eyeDiagramSI System object™ to measure properties of a sampled data signal originating from laboratory data and check eye opening compliance against an eye mask.

Save the waveform data in a Standard File Format, or a format for which a reader is available on the File Exchange.

Use readmatrix to read cells from the file into a matrix, starting at cell A5 to skip the metadata.

waveforms = readmatrix("pam5_waveforms.csv", "Range", "A5");

Our example data file contains multiple signals as different columns. Extract the third column as the signal to analyze.

pam5Wave = waveforms(:, 3);

Enter the waveform's characteristics if they weren't included with the file.

symbolTime = 66.67e-12;
samplesPerSymbol = 32;
modulation = 5;

Create an eyeDiagramSI System object.

eyeDiagram = eyeDiagramSI;
eyeDiagram.SymbolTime = symbolTime;
eyeDiagram.SampleInterval = symbolTime / samplesPerSymbol;
eyeDiagram.Modulation = modulation;

Feed the data into the eyeDiagramSI System object.

eyeDiagram(pam5Wave);

Visualize the resulting eye diagram.

plot(eyeDiagram);

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Amplitude contains an object of type image.

Plot time-axis bathtub curves for each eye opening. Eyes are ordered from lowest center amplitude to highest.

bathtub(eyeDiagram, "Time")
    Time

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Symbol Error Rate contains 4 objects of type line. These objects represent Eye 1, y = -0.23796, Eye 2, y = -0.080451, Eye 3, y = 0.053432, Eye 4, y = 0.22275.

Define a rectangular eyeMask object that is 0.2 Unit Intervals (UI) wide and 0.02 amplitude units tall. You can create an eyeMask directly using X and Y coordinate vectors to define vertices of the mask shape, or use the eyeMaskRectangle function with a width and height.

% mask = eyeMask([-0.1, -0.1, 0.1, 0.1], [-0.01, 0.01, 0.01, -0.01]);
mask = eyeMaskRectangle(0.2, 0.02);

Position the mask center 0.1 UI right of the timing origin.

mask.Position = [0.1, 0];

Measure the margin between the mask and the eye openings.

margins = margin(mask, eyeDiagram, "Plot", "on")

Figure contains an axes object. The axes object with xlabel UI, ylabel Amplitude contains 12 objects of type image, polygon, line, text. These objects represent Mask, Height Margin, Width Margin.

margins = 4×2

    0.0049    0.0210
   -0.0075   -0.0630
    0.0177    0.0553
    0.0079    0.0473

The second eye from the bottom of the diagram is not compliant with the mask; it has negative values for its minimum width and height margins.

This example show show to measure the signal properties of a sampled data signal such as eye height, eye width, and more using the eyeDiagramSI System object™.

Create a PAM3 signal using the serdes.Stimulus System object. The signal has a symbol time of 100e-12 and 16 samples per symbol that contains 1000 symbols of data.

symbols = 1000;
samplesPerSymbol = 16;
symbolTime = 100e-12;
sampleInterval = symbolTime / samplesPerSymbol;
modulation = 3;

stimulusGenerator = serdes.Stimulus;
stimulusGenerator.Modulation = modulation;
stimulusGenerator.SampleInterval = sampleInterval;
stimulusGenerator.SymbolTime = symbolTime;

Create a channel model with 2 dB loss using the serdes.ChannelLoss System object.

channelModel = serdes.ChannelLoss;
channelModel.dt = sampleInterval;
channelModel.Loss = 2;

Run the stimulus waveform through the channel model.

out = zeros(samplesPerSymbol * symbols, 1);
for i = 1:samplesPerSymbol * symbols
    out(i) = channelModel(stimulusGenerator());
end

Trim the beginning of the channel output to remove the influence of initial conditions.

outTrim = out(2001:end);

Create an eyeDiagramSI System object that has the same property values as the stimulus above.

eyeDiagram = eyeDiagramSI;
eyeDiagram.SampleInterval = sampleInterval;
eyeDiagram.SymbolTime = symbolTime;
eyeDiagram.Modulation = modulation;

Feed the channel output data into the eyeDiagramSI system object.

eyeDiagram(outTrim);

Visualize the resulting eye diagram plot.

plot(eyeDiagram);

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Amplitude contains an object of type image.

Measure the best eye height for each eye opening. Results are presented for each eye opening from the lowest to highest eye center amplitude.

[bestHeight, timeAtBestHeight] = eyeHeight(eyeDiagram)
bestHeight = 2×1

    0.1787
    0.1853

timeAtBestHeight = 2×1
10-11 ×

    0.7087
    0.6299

Measure the eye width at the symbol threshold levels for each eye opening.

width = eyeWidth(eyeDiagram, eyeDiagram.SymbolThresholds)
width = 2×1
10-10 ×

    0.3535
    0.3141

Measure the mean symbol levels at the center of the eye diagram (t = 0) and overlay the result on the eye diagram plot.

levels = eyeLevels(eyeDiagram, 0, "Plot", "on")

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Amplitude contains 4 objects of type image, line. These objects represent -0.40599, 0.0027781, 0.41278.

levels = 3×1

   -0.4060
    0.0028
    0.4128

Version History

Introduced in R2024a

See Also

(Mixed-Signal Blockset) | (Mixed-Signal Blockset) | (Mixed-Signal Blockset)