Main Content

Design IBIS-AMI Models to Support Clock Forwarding

This example shows how to create Rx AMI models that support clock forwarding as defined in the IBIS Buffer Issue Resolution Document (BIRD) 204 by modifying the library blocks in SerDes Toolbox™. This example will use a DDR5 write transfer (Controller to SDRAM) to demonstrate the setup.

Background

IBIS BIRD 204, DQ_DQS GetWave Flow for Clock Forwarding Modeling, adds the ability pass in an external clock signal, either as a waveform or clock-times, to a data IBIS-AMI receiver GetWave model, using the clock_times pointer defined by the IBIS specification. A new AMI Reserved Parameter, Rx_Use_Clock_Input, is used to enable this functionality. Note that while BIRD 204 has been accepted by the IBIS committee, it is not yet part of the released IBIS specification.

The figure below shows a typical DDR5 coupled channel simulation setup using clock-forwarding. The clock times or waveform generated by DQS0 is passed to DQ[7:0] using the DQ DLL’s clock_times pointer. The DQ DLL then operates on these clock times as desired (for example triggering DFE taps, modelling the DQS delay tree or centering the DQ on the DQS waveform) and then passes out the same or modified clock_times as usual. This same process is repeated for DQS1 and DQ[8:15].

This example provides an introduction to clock-forwarding in SerDes Toolbox and show how to use various Simulink® tools and MATLAB® functions to generate and test an IBIS-AMI executable that supports clock-forwarding. It does not provide a specific clock-forwarding algorithm.

Rx IBIS-AMI Model Setup in Simulink

To begin, load the clock forwarding Simulink model and review the model setup. Start by typing the following command:

>> open_system('clock_forward.slx')

This will bring up the following SerDes system:

Review Simulink Model Setup

In addition to the normal SerDes Configuration, Stimulus, Tx, Analog Channel and Rx blocks, this Simulink SerDes system adds a new Strobe Clock Times Generator block. The setup of each of these blocks will be reviewed below.

Configuration Block

  • Symbol Time is set to 200.0 ps (5.0Gbps)

  • Target BER is set to 1e-16.

  • Signaling is set to Single-ended.

  • Samples per Symbol and Modulation are kept at default values, which are 16 and NRZ (nonreturn to zero), respectively.

Stimulus Block

  • The Stimulus block is set to default values.

Tx Block

The Tx block uses a single FFE with 5 taps. Since this example is focused on the Rx model, the Tx block will be untouched.

Analog Channel Block

  • Channel loss is set to 5 dB, which is typical of DDR channels.

  • Single-ended impedance is set to 40 ohms.

  • Target Frequency is set to 2.5 GHz, which is the Nyquist frequency for 5.0 GHz

  • The Tx Analog model is set up so that Voltage is 1.1 V, Rise time is 10 ps, R (output resistance) is 50 ohms, and C (capacitance) is 0.65pF.

  • The Rx Analog model is set up so that R (input resistance) is 40 ohms and C (capacitance) is 0.65pF.

Rx Block

The single Rx block is a pass-through block that consists of a DFE System Object, a CDR MATLAB function block and a Clock Times block. The DFE block is set up for four DFE taps by including four Initial tap weights set to 0. The Minimum tap value is set to [-0.2 -0.075 -0.06 -0.045] V, and the Maximum tap value is set to [0.05 0.075 0.06 0.045] V.

Per BIRD 204 the clock times received by a clock-forwarding data receiver are used directly, therefore there no clock recovery is required. In place of the CDR, a MATLAB function block named forwardCDR is used to pass the clock times to the DFE, which signals when to apply the DFE taps. In addition, this block passes the clock times, unchanged, to the IBIS-AMI clock_times block to generate the normal clock times for use by the EDA tool. The MATLAB function block can be copy-pasted from this example into your own Simulink model.

The Clock Times block is a SerDes Toolbox library block which formats the clock-times generated by the DFECDR, CDR or forwardCDR block for output to the EDA tool. This library block is available from the Simulink Library Browser.

The DFE block is a custom SerDes Toolbox system object. It can be added to your own Simulink model by adding a MATLAB System block and then pointing it to the DFE.m file included in this example.

Strobe Clock Times Generator Sub-System (New)

The Strobe Clock Times Generator Block either reads a named clock stimulus pattern stored in the Model Workspace or reads in an array of clock times named clockTicks which is also stored in the Model Workspace. The mask for this sub-system is used to select which input to use and to set the name of the external clock stimulus pattern.

The new Strobe Clock Times Generator Block is not yet included in the SerDes Toolbox library. You can add this subsystem to a new Simulink model by copy-pasting it from this example. Pasting this block into a new SerDes Toolbox model will also add the required Rx_Use_Clock_Input parameters and ForwardClockOffset Simulink signal to the Model Workspace.

Run the Simulink Model

The Simulink model is ready to run. In order to make the effects of the clock location more visible, the first DFE tap has been set to -0.1V and the DFE mode is set to Fixed. Press the run button to launch the simulation.

As the simulation runs, the Time Domain eye diagram gets constantly updated:

After the simulation is complete, the Init Statistical and Time Domain Analysis Results plot becomes available:

Note that since clock-forwarding only affects the Time Domain results, the Statistical results does not reflect the effects of clock-forwarding.

How to visualize results

To verify proper operation of clock-forwarding, plotting the resulting waveforms and/or clock-ticks can be very helpful. Several signals have data logging turned on to enable the use of the Data Inspector for plotting waveforms. To turn on additional data logging, right-click on any signal and select Log Selected Signals.

Plotting clock and data waveforms

After running a simulation open the Data Inspector by clicking on the -icon in the Simulink Simulation tab. In the Data Inspector check the boxes for Stimulus:1 (the incoming stimulus waveform, Red in the figure below) and for rxOut (the Rx data out waveform, blue in the figure below). You should see that rising and falling edges of the external-clock waveform (Red) correspond with the peaks of the data waveform (Blue). If they do not line up as expected, the offset can be adjusted by using the clock offset (see Setting the clock offset).

Plotting clock-ticks in and out

After running a simulation, in the Data Inspector check the boxes for Forward Clock Times:1 (the external clock-times from the Clock Times Generator block) and clockTime (the clock-times being passed out of the Rx model). When “Times” is selected as the external clock times, these two signals are expected to be identical.

Changing the data pattern

The Rx Data pattern is set using the Stimulus block of the SerDes system as usual. A PRBS pattern can be selected, or a named stimulus pattern that lives in the model workspace can be used. The current stimulus pattern is named SiSoftLinkStimulus_dq.

Changing the clock pattern

Two clock patterns are included in this Simulink model:

  • SiSoftLinkStimulus_ck: This is a periodic clock pattern generated by SiSoft Quantum SI™ (QSI)

  • SiSoftLinkStimulus_dqs: This is a DQS pattern with an 8-bit DDR burst followed by a 4-bit static low.

To change this pattern, specify the desired pattern by name in the Strobe Clock Times Generator mask.

To create a new pattern, see Creating a new clock pattern.

Switching between an external waveform and clock ticks

Switching between using an external waveform to generate clock times to using an external clock ticks array directly is accomplished by changing the value of the parameter Rx_Use_Clock_Input from the Strobe Clock Times Generator mask. There are 3 options for External Clock Input:

  • None: No clock-times will be input-to or output-from the Rx AMI model.

  • Times: Use the external clock times given in the Model Workspace parameter clockTicks.

  • Waves: Use the external clock waveform from the Waveform Name in the mask.

Creating a new clock waveform

Generating a new clock or strobe waveform for use in the Stimulus block inside the Strobe Clock Times Generator is accomplished using SiSoft Quantum SI and the MATLAB support package SiSoft Link™.

Here is an overview of the required steps. For detailed information on using SiSoft Link, see SerDes Toolbox Interface for SiSoft Quantum Channel Designer and QSI Software. For more information on QSI, see www.sisoft.com. Note that if you have previously run SiSoft Link on this Simulink model you can begin with step 3.

  1. Start by using the SerDes IBIS-AMI Manager to export the Tx and Rx models. Make sure that the IBIS file, AMI files and DLL files boxes are checked.

  2. Use SiSoft Link to Create a new QSI project.

  3. In the new QSI project, double-click on the Tx designator then press the IO Stimulus button in the Designator Element Properties dialog.

  4. In the Stimuli dialog, press the New button to open the Stimulus Editor and create the desired clock pattern.

  5. When you are done creating a new stimulus, make sure the new named stimulus pattern is selected in Designator Element Properties.

  6. Use the Simulation Parameters dialog to set the desired Samples Per Bit, Record Start and Record Bits values to capture the desired number of samples. Note: Number of samples = Samples Per Bit * Record Bits

  7. Run the QSI simulation to generate the new Stimulus pattern.

  8. In SiSoft Link, using the Import from QSI section, select the proper simulation, make sure the Update stimulus pattern box is checked, and press Import.

  9. Back in Simulink, the new stimulus pattern will automatically be set in the top-level Stimulus block. Change this pattern back to either PRBS or SiSoftLinkStimulus_dq as was previously set.

  10. In the Stimulus block inside the Strobe Clock Times Generator, select the newly created stimulus SiSoftLinkStimulus.

Note: The SiSoftLinkStimulus pattern is over-written each time this process is performed. To save a named stimulus pattern, open the Model Explorer, browse to the Model Workspace and rename SiSoftLinkStimulus to a new name. This re-named parameter is saved along with the rest of the Simulink model.

Creating new clock ticks

Generating new clock ticks for use inside the Strobe Clock Times Generator is accomplished using SiSoft Quantum SI and the MATLAB support package SiSoft Link.

Here is an overview of the required steps. For detailed information on using SiSoft Link, see SerDes Toolbox Interface for SiSoft Quantum Channel Designer and QSI Software. For more information on QSI, see www.sisoft.com. Note that if you have previously run SiSoft Link on this Simulink model you can begin with step 3.

  1. Start by using the SerDes IBIS-AMI Manager to export the Tx and Rx models. Make sure that the IBIS file, AMI files and DLL files boxes are checked.

  2. Use SiSoft Link to Create a new QSI project.

  3. In the new QSI project open the Simulation Parameters dialog and set the parameter Output Clock Ticks to Yes.

  4. Run the desired QSI simulation.

  5. From the MATLAB command line, type the following to import the clock times out of your QSI project and format them for use in Simulink:

%% Read the QSI generated clock_ticks from a file
filename = '<path_to_qsi_project>/<project_name>/interfaces/<interface_name>/pre_sims/<sheet_name>/default.ssm/qcd/<designator>_ttte.td.<designator>_z.clock_ticks.csv';
csv = readmatrix(filename,'Range','A7');

%% Format input
count = csv(:,1);
clock = csv(:,2);

%% Output clock_ticks for Simulink
clockTicks = [count, clock];

Note: If you wish to save multiple clockTicks arrays, or switch between arrays, you need to update the clockTicks parameter name in the clockTimesGen MATLAB function block inside the Strobe Clock Times Generator sub-system.

Setting the clock offset

The Input AMI parameter ForwardClockOffset has been added to the DFEandCDR block. This parameter is of type Integer, with a Default of 0 and a Range of 0 to 64. In the DFEandCDR block, this parameter controls a Delay block which is used to delay the incoming clock times by up to 64 samples. Using the SerDes IBIS-AMI Manager you can use this delay to adjust the location of the external clock with respect to the data waveform as desired.

For example, here is the time domain eye diagram with ForwardClockOffset set to 5:

Note how the DFE taps are being applied in the center of the eye instead of at the edges of the eye. With the delay set to 14, the DFE taps are being applied at the ideal location at the edge of the eye:

Note: Delay values less that 0 will have no effect on the resulting waveform.

Changing the current value of Rx_Use_Clock_Input

The operation of the clock forwarding is controlled by the reserved AMI parameter Use_AMI_Clock_PDF. Changing the current value of this parameter is not supported by the SerDes IBIS-AMI Manager, so all updates to the current value are done from the Strobe Clock Times Generator mask using the Select External Clock Input radio buttons.

Note: If the IBIS-AMI Manager is already open, you may need to close and re-open for the changes to be visible.

Generate Rx IBIS-AMI Model

The final part of this example takes the customized Simulink model and generates IBIS-AMI compliant model executables, IBIS and AMI files for the clock forwarding receiver.

Open the Block Parameter dialog box for the Configuration block and click on the Open SerDes IBIS-AMI Manager button.

Required Keywords

The IBIS-AMI Reserved input parameter Rx_Use_Clock_Input is required for codegen to work properly. If this parameter is not present in your model, while the model may codegen the clock-forwarding properties will not be enabled.

Export Models

On the Export tab in the SerDes IBIS/AMI manager dialog box.

  • Update the Rx model name to clock_forward_rx.

  • Note that the Tx and Rx corner percentageis set to 10. This will scale the min/max analog model corner values by +/-10%.

  • Verify that Dual model is selected for the Rx AMI Model Settings. This will create a model executable that support both statistical (Init) and time domain (GetWave) analysis.

  • Set the Rx model Bits to ignore value to 10 to allow enough time for the external clock waveform to settle during time domain simulations.

  • Set Models to export to Rx only since we are only generating a Rx model.

  • Set the IBIS file name to be clock_forwarding_rx.ibs

  • Press the Export button to generate models in the Target directory.

Review AMI file

The resulting Rx AMI file will look like a normal Rx AMI file with two exceptions. First, the AMI_Version is set to 7.1. The second is the inclusion of the reserved parameter Rx_Use_Clock_Input. Since both of these changes are from an unreleased version of the IBIS Specification, either one will cause this AMI file to fail the IBIS AMI Checker (which is currently on version 7.0.1). If this causes any problems in your EDA tool you may want to skip the running of the AMI Checker.

Model Limitations

This clock forwarding AMI model requires an EDA tool that supports BIRD 204.

Test Generated IBIS-AMI Models

The clock forwarding receiver IBIS-AMI model is now complete and ready to be tested in any industry standard AMI model simulator that supports BIRD 204.

References