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, and you will see the block change from Pass Through to a CTLE:
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:
Open the source code of
serdes.CTLE
.Save a local copy of the source code in a directory.
Make the desired changes in the code.
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
.
Press Ok to save the changes. You will see the parameter automatically added to the canvas:
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.
Press Ok to save the changes. Again, you will see the parameter automatically added to the canvas.
Implement AMI Parameters
Connect the blocks MyCTLEParameter.CTLEMode
to the Mode input and MyCTLESignal.CTLEConfigSelect read
to the ConfigSelect input of the PassThrough block. Connect the ConfigSelect output of the PassThrough block to the MyCTLESignal.CTLEConfigSelect write
block.
For more information, see Managing AMI Parameters.
You can double-click on the blocks to confirm connectivity. For example double click on the block MyCTLESignal.CTLEConfigSelect read
to confirm connectivity of the Data Store Read:
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
PassThrough | Configuration | CTLE | SerDes Designer