Main Content

serdes.Stimulus

Set a pseudorandom binary sequence (PRBS) pattern and number of symbols to simulate in SerDes model

Since R2021b

Description

The serdes.Stimulus System object™ defines how to create the waveform and the number of symbols to simulate in a SerDes Toolbox™ model. You can directly specify a PAMn symbol pattern or define a binary to PAMn mapping scheme.

To create a multi-level pseudorandom binary sequence or custom data pattern:

  1. Create the serdes.Stimulus 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

example

stimulus = serdes.Stimulus returns a Stimulus object that outputs multi-level pseudorandom binary sequence or custom data pattern.

stimulus = serdes.Stimulus(Name=Value) sets properties using one or more name-value arguments. Unspecified properties have default values.

Example: stimulus = serdes.Stimulus(Modulation=4,Delay=10e-12) returns a Stimulus object that uses a four-level pulse amplitude modulation (PAM4) modulation scheme and has a delay of 10e-12 seconds.

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.

Main

Waveform creation method, specified as one of these values.

  • 'Random Symbols' — Randomly generate symbols directly from a uniform distribution.

  • 'Symbol Pattern' — Directly define the symbol pattern as an integer from 0 to (Number of modulation levels – 1).

  • 'Serial PRBS' — Define a binary sequence and map to a higher order modulation symbol. The mapping sequence depends on the modulation scheme defined in the Configuration block.

  • 'Binary Pattern' — Directly define the binary pattern and map to a higher order modulation symbol. The mapping sequence depends on the modulation scheme defined in the Configuration block.

  • 'Symbol Voltage Pattern' — Directly define the voltages of a symbol spaced pattern.

  • 'Sampled Voltage' — Directly define a sample interval spaced waveform.

  • 'Parallel PRBS' — Utilize multiple PRBS streams to form PAM4, PAM8 , PAM16, and PAM32 symbols. You can define up to 5 PRBS streams for PAM32. NRZ modulation scheme uses a single PRBS stream. Other modulation schemes use the random symbols waveform creation method.

  • 'PRBS' — Generate a pseudorandom binary sequence (PRBS) based on the Seed. Same as 'Parallel PRBS'.

  • 'PAMn' — Generate a pulse amplitude modulated (PAM) signal based on the PAMn Seed. Same as 'Random Symbols'.

  • 'Data Pattern' — Specify a data pattern to modulate. Same as 'Sampled Voltage'.

Note

'PRBS'. 'PAMn', and 'Data Pattern' options are being deprecated. Use 'Parallel PRBS',

'Random Symbols', and 'Sampled Voltage' instead, respectively.

Tunable: No

Data Types: char

Modulation value that specifies the modulation scheme, the number of logic levels in the encoded signal, specified as an integer in the range of [2,32].

Note

According to IBIS BIRD (Buffer Issue Resolution Document) 213, IBIS-AMI models support any level of signaling from PAM2 (NRZ) to upwards, collectively known as PAMn. If your EDA tool supports it, you can export IBIS-AMI models supporting modulation schemes NRZ, PAM3, PAM4, PAM8, PAM16, or PAM32.

Note

This property is not enabled if Specification is set to 'Symbol Voltage Pattern', 'Sampled Voltage', or

'Data Pattern'.

Tunable: No

Data Types: double

Delay the stimulus waveform by modulo symbol time to slightly shift the eye diagram or recovered clock phase.

Tunable: No

Data Types: double

PRBS order, specified as a numeric scalar or a numeric vector of positive integers less than 100. Specify Order as a numeric vector when the value of Modulation is greater than 2. For higher order modulation, the first Order entry defines a PRBS stream for the least significant bit (LSB) and the last Order entry defines a PRBS stream for the most significant bit (MSB).

Tunable: No

Dependencies

To enable this property, set Specification to 'Serial PRBS', 'Parallel PRBS', or 'PRBS'.

Data Types: double

PRBS seed, specified as a cell array of cell array of binary vectors. The length of each binary vector is the same length as the corresponding Order.

Tunable: No

Dependencies

To enable this property, set Specification to 'Serial PRBS', 'Parallel PRBS', or 'PRBS'.

Data Types: cell

Map the binary data stream(s) to symbol voltages, specified as a vector. The length of MapToVoltage needs to be the same as the number of logic levels defined by the Modulation property. The LSB PRBS stream, p1, and the MSB PRBS stream, pn, index MapToVoltage as follows: Index = p1 + 2^1*p2 + 2^2*p3 + ... + 2^(n-1)*pn.

Tunable: No

Dependencies

To enable this property, set Specification to 'Random Symbols', 'Parallel PRBS', or 'PRBS'.

Data Types: double

Data pattern of symbol voltages spaced at symbol time interval, specified as a numeric vector. This property is continually cycled through.

Tunable: No

Dependencies

To enable this property, set Specification to 'Symbol Voltage Pattern'.

Data Types: double

Custom pattern of symbol voltages spaced at symbol time interval, specified as a numeric vector of zero based indices in the range of [0, Number of modulation levels -1].

Tunable: No

Dependencies

To enable this property, set Specification to 'Symbol Pattern'.

Data Types: double

Custom pattern of 1s and 0s spaced at the symbol interval, specified as a numeric or logical vector.

Tunable: No

Dependencies

To enable this property, set Specification to 'Binary Pattern'.

Data Types: double

Custom voltage pattern of sample interval spaced voltages, specified as a numeric vector.

Tunable: No

Dependencies

To enable this property, set Specification to 'Sampled Voltage'.

Data Types: double

Seed for the PAMn pattern generator, specified as a nonnegative number between 2 and 2^31 - 1.

Tunable: No

Dependencies

To enable this property, set Specification to 'Random Symbols'.

Data Types: double

Jitter

Deterministic jitter, or uncorrelated bounded uniform jitter, specified as a nonnegative number. The value of Dj indicates half of the peak to peak variation of the deterministic jitter.

Tunable: No

Data Types: double

Deterministic jitter unit, specified as 'Seconds' for seconds or 'UI' for unit interval.

Tunable: No

Data Types: char

Random jitter, specified as a nonnegative number. Random jitter is defined as the standard deviation of the white Gaussian Phase noise process.

Tunable: No

Data Types: double

Random jitter unit, specified as 'Seconds' for seconds or 'UI' for unit interval.

Tunable: No

Data Types: char

Duty cycle distortion, specified as a nonnegative number. The value of DCD indicates half of the peak-to-peak DCD, where DCD is defined as half of the difference in symbol duration between one symbol and the next.

Tunable: No

Data Types: double

DCD unit, specified as 'Seconds' for seconds or 'UI' for unit interval.

Tunable: No

Data Types: char

Sinusoidal or periodic jitter, specified as a number. The value of Sj indicates half of the peak to peak amplitude of sinusoidal or periodic jitter.

Tunable: No

Data Types: double

Sinusoidal or periodic jitter unit, specified as 'Seconds' for seconds or 'UI' for unit interval.

Data Types: char

Sinusoidal or periodic jitter frequency, specified as a nonnegative numeric scalar in Hz.

Tunable: No

Data Types: double

Random seed for the Dj and Rj jitter steams, specified as a nonnegative number.

Tunable: No

Data Types: double

Advanced

To enable jitter output, set OutputJitter to 1. By default, this property is set to 0.

Tunable: No

Data Types: logical

To revers the PRBS sequence in time, set ReversePRBS to 1. This reverses the tap positions in the characteristic polynomial. By default, this property is set to 0.

Tunable: No

Dependencies

To enable this property, set Specification to 'Serial PRBS', 'Parallel PRBS', or 'PRBS'.

Data Types: logical

To invert the PRBS sequence in voltage, set InvertPRBS to 1. This flips the values of 0s and 1s. By default, this property is set to 0.

Tunable: No

Dependencies

To enable this property, set Specification to 'Serial PRBS', 'Parallel PRBS', or 'PRBS'.

Data Types: logical

Define how to map the binary payload to a symbol voltage.

Note

If you set BinaryToPAMnMapping to 'Uniform', you must define the properties PayloadLength and MessageLength.

Tunable: No

Dependencies

To enable this property, set Specification to 'Serial PRBS', 'Parallel PRBS', or 'PRBS'.

Data Types: double

Length of the binary payload, specified as a positive integer less than 50.

Tunable: No

Dependencies

To enable this property, set Specification to 'Serial PRBS', 'Parallel PRBS', or 'PRBS' and set BinaryToPAMnMapping to 'Uniform'.

Data Types: double

Length of the symbol message, specified as a positive integer less than or equal to PayloadLength

Tunable: No

Dependencies

To enable this property, set BinaryToPAMnMapping to 'Uniform'.

Data Types: double

Time of a single symbol duration, specified as a real positive scalar.

Tunable: No

Data Types: double

Uniform time step of the output waveform, specified as a positive real scalar.

Tunable: No

Data Types: double

Usage

Description

example

val = stimulus

Output Arguments

expand all

A single output sample of the PRBS each time stimulus is called. Equivalent to calling step(stimulus).

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

stepRun System object algorithm
cloneCreate duplicate System object
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 the serdes.Stimulus object to generate a pseudorandom binary sequence (PRBS) and also modulate custom samples.

First, define the parameters of the sequences. Use a symbol time of 80 ps with 8 samples per symbol. Send 15 symbols, and use 0.1 as the deterministic jitter.

SymbolTime = 80e-12;
SamplesPerSymbol = 8;
NumberOfSymbols = 15;
Dj = 0.1;

Calculate the sample interval.

dt = SymbolTime/SamplesPerSymbol;

Create a default Stimulus object that generates a PRBS and uses a NRZ modulation scheme.

stimulus1 = serdes.Stimulus(...
    'SampleInterval',dt,...
    'SymbolTime',SymbolTime,...
    'Dj',Dj);

Create a Stimulus object that generates a PRBS with an order of 8.

stimulus2 = serdes.Stimulus(...
    'SampleInterval',dt,...
    'SymbolTime',SymbolTime,...
    'Delay',dt*4,...
    'Specification','PRBS',...
    'Order',8,...
    'Seed',{[0 1 0 0 0 0 0 0]},...
    'Dj',Dj);

Create a Stimulus object that generates a PRBS and uses a PAM4 modulation scheme.

stimulus3 = serdes.Stimulus(...
'Specification','Parallel PRBS',...
'SampleInterval',dt,...
'SymbolTime',SymbolTime,...
'Modulation',4,...
'Delay',dt*4,...
'Order',[6 8],...
'MapToVoltage',2*[-1/2, 1/6, -1/6, 1/2],...
'Dj',Dj);

Create a Stimulus object that modulates a custom data pattern.

stimulus4 = serdes.Stimulus(...
    'SampleInterval',dt,...
    'SymbolTime',SymbolTime,...
    'Specification','Data Pattern',...
    'DataPattern',(-2:2)/2,...
    'Dj',Dj);

Create a Stimulus object that modulates a sampled voltage.

stimulus5 = serdes.Stimulus(...
    'SampleInterval',dt,...
    'SymbolTime',SymbolTime,...
    'Specification','Sampled Voltage',...
    'SampledVoltage',[-1.5:0.25:1.5,1.25:-0.25:-1.25]);

Initialize the variables for plotting, where N is the number of samples, waveOut contains all of the samples, and t is the vector with the time associated with each sample.

N = SamplesPerSymbol*NumberOfSymbols;
waveOut = zeros(N,5);
t = (0:N-1)*dt;

Then, use the step of each Stimulus object to sample the generated signals.

for ii = 1:N
    waveOut(ii,1) = step(stimulus1);
    waveOut(ii,2) = step(stimulus2);
    waveOut(ii,3) = step(stimulus3);
    waveOut(ii,4) = step(stimulus4);
    waveOut(ii,5) = step(stimulus5);
end

Finally, plot waveOut with a legend and labels on the axes.

figure
plot(t,waveOut)
xlabel('time [s]')
ylabel('V')
grid on
legend('Default Stimulus','PRBS 8 Stimulus','PAM4 Stimulus',...
    'Custom Stimulus','Sampled Voltage')

Tips

  • If the PRBS waveform specification definition is incomplete, then extended defaults will be applied. For instance, if Modulation is 4 but Seed is incomplete or incorrect, a valid Seed value will be found and used.

  • The PAMn waveform specification creates pulse amplitude modulation (PAM) signals for 2 to 16 levels. This random integer generator selects 16 bits from a PRBS31 data stream to form an integer between 0 and 2^16-1. This integer is then linearly mapped to the range of [0.501, N + 0.499] which is then rounded to an integer in the range of 1 to N, where N is the desired number of PAM levels. This uniform integer then selects the appropriate symbol voltage from the MapToVoltage property.

  • The injected jitter is accumulated as follows:

    DJ: jitter = 2*Dj*(rand(1)-0.5);

    Rj: jitter = Rj*randn(1);

    DCD: jitter = DCD/2*(-1.0)^N, where N is the symbol index

    Sj: jitter = pSj*sin(N*T*2*pi*SjFrequency), where N is the symbol index, T is the symbol time.

    Jitter is injected in the symbol to waveform conversion and therefore jitter cannot be injected when the Specification is 'Sampled Voltage'.

Version History

Introduced in R2021b