Implement Custom CTLE in SerDes Toolbox PassThrough Block

This example shows how to customize a PassThrough Block in Simulink® to implement a CTLE System Object™ with user defined AMI parameters. You can use this example as a guide for modifying PassThrough blocks that leverage system objects. For more information on the purpose of the PassThrough block and an example of using other Simulink library blocks within them, see Customizing Datapath Building Blocks.

Create SerDes System in SerDes Designer App

In MATLAB®, type serdesDesigner to launch the SerDes Designer app. Place a PassThrough block after the analog model in the receiver. Change the name of the PassThrough block from PT to MyCTLE.

Export the SerDes system to Simulink.

Modify PassThrough Block to Implement CTLE

This example builds a custom replica of the CTLE bloc from SerDes Toolbox™. First modify the contents of PassThrough block to reference a new system object and then implement and connect its parameters. This addresses the time-domain (GetWave) function of the model. The Init code is then updated to mirror the functionality of time-domain (GetWave) in the statistical analysis. This example walks you through the whole process using serdes.CTLE System object.

Inside the Rx subsystem, look under mask of PassThrough block MyCTLE. Select the PassThrough block, press Ctrl+U to open the Block Parameters dialog box of the MATLAB System, and change the System object name from serdes.PassThrough to serdes.CTLE.

Click OK to save the changes.

Note: You can use your own custom System object as well. For example, if you wanted to create a custom CTLE with a change in the adaptation algorithm:

  1. Open the source code of serdes.CTLE.

  2. Save a local copy of the source code in a directory.

  3. Make the desired changes in the code.

  4. Then reference the customized code with the MATLAB System.

To properly link the CTLE to the system-wide parameters SymbolTime and SampleInterval, you need to set the CTLE to use these parameters as variables rather than hard-coded values. Otherwise incorrect or unexpected values may be included in the simulation and result in invalid data. Double click the PassThrough block that now points to the CTLE system object to open the Block parameters dialog window. In the Advanced tab, set Symbol time (s) to SymbolTime and Sample interval (s) to SampleInterval. Click OK to save the changes.

Add AMI Parameters to PassThrough Block

Open the SerDes IBIS-AMI Manager dialog box. Under the Model_Specific parameters in the AMI-Rx tab, select the MyCTLE node and add two new parameters, CTLEMode and CTLEConfigSelect.

To add CTLEMode parameter, click on the Add Parameter button and set the variables:

  • Parameter name to CTLEMode

  • Current value to 0

  • Description to CTLE Mode: 0 = off, 1 = fixed, 2 = adapt

  • Type to Integer

  • Format to Range

  • Typ to 1

  • Min to 0

  • Max to 2.

Save the changes.

To add CTLEConfigSelect parameter, select the MyCTLE node again, click on the Add Parameter button and set the variables:

  • Parameter name to CTLEConfigSelect

  • Current value to 0

  • Description to CTLE Config Select has a range from 0 to 8

  • Usage to InOut

  • Type to Integer

  • Format to Range

  • Typ to 0

  • Min to 0

  • Max to 8.

Save the changes and close the SerDes IBIS-AMI Manager dialog box.

Implement AMI Parameters

Look under the mask of the PassThrough Block. Add a Constant block from the Simulink > Sources library on the canvas. Double click the Constant block to open the Block Parameters dialog box and set the Constant value to MyCTLEParameter.CTLEMode. Connect the Constant block to the Mode input of the PassThrough block. For more information, see Managing AMI Parameters.

Add a Data Store Read block from the Simulink > Signal Routing library on the canvas. Double click the Data Store Read block to open the Block Parameters dialog box. In the Parameters tab, set Data store name to MyCTLESignal. In the Element Selection tab, expand MyCTLESignal, select CTLEConfigSelect, and press the Select >> button to add the selected element. Connect the Data Store Read block to the ConfigSelect input of the PassThrough block.

Add a Data Store Write block from the Simulink > Signal Routing library on the canvas. Double click the Data Store Write block to open the Block Parameters dialog box. In the Parameters tab, set Data store name to MyCTLESignal. In the Element Selection tab, expand MyCTLESignal, select CTLEConfigSelect, and press the Select >> button to add the selected element. Connect the Data Store Read block to the ConfigSelect input of the PassThrough block.

At this point, this is how the MyCTLE PassThrough block configuration should look. This completes setup for the time-domain (GetWave) simulation.

Verify Code for Statistical Analysis

Double click the Init subsystem inside the Rx block to open the Block Parameter dialog box. To connect the AMI parameters as connected within the MyCTLE block, click the Refresh Init button. Since you used a system object, this connectivity is generated automatically. To verify this, click the Show Init button to open the MATLAB code for Init subsystem. You should find code related to the CTLE AMI parameter connections in the Custom user code area surrounded by the %% Begin and % End statements.

Verify Operation of Custom CTLE

Run the simulation.

To evaluate the effect of the CTLE on output waveforms, open the SerDes IBIS-AMI manager dialog box. In the AMI-Rx tab, set Current value of CTLEMode* parameter to 1 to use fixed mode operation, and set Current value of CTLEConfigSelect* parameter to 4. Re-run the simulation.

See Also

| | |

Related Topics