在并行转换器实现定制CTLE工具箱PassThrough Block
This example shows how to customize aPassThroughBlock 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, seeCustomizing Datapath Building Blocks.
Create SerDes System in SerDes Designer App
In MATLAB®, typeserdesDesigner
to launch theSerDes Designerapp. Place a PassThrough block after the analog model in the receiver. Change the name of the PassThrough block fromPT
toMyCTLE
.
Export the SerDes system to Simulink.
Modify PassThrough Block to Implement CTLE
This example builds a custom replica of theCTLEbloc 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 usingserdes.CTLE
系统对象。
Inside the Rx subsystem, look under mask of PassThrough blockMyCTLE
. Select the PassThrough block, pressCtrl+Uto open the Block Parameters dialog box of the MATLAB System, and change theSystem object namefromserdes.PassThrough
toserdes.CTLE
.
ClickOKto 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 parametersSymbolTimeandSampleInterval, 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, setSymbol time (s)toSymbolTime
andSample interval (s)toSampleInterval
. ClickOKto save the changes.
Add AMI Parameters to PassThrough Block
Open the SerDes IBIS-AMI Manager dialog box. Under theModel_Specific
parameters in theAMI-Rxtab, select theMyCTLEnode and add two new parameters,CTLEModeandCTLEConfigSelect.
To addCTLEModeparameter, click on theAdd Parameterbutton and set the variables:
Parameter nameto
CTLEMode
Current valueto
0
Descriptionto
CTLE Mode: 0 = off, 1 = fixed, 2 = adapt
Typeto
Integer
Formatto
Range
Typto
1
Minto
0
Maxto
2
.
Press Ok to save the changes. You will see the parameter automatically added to the canvas:
To addCTLEConfigSelectparameter, select theMyCTLEnode again, click on theAdd Parameterbutton and set the variables:
Parameter nameto
CTLEConfigSelect
Current valueto
0
Descriptionto
CTLE Config Select has a range from 0 to 8
Usageto
InOut
Typeto
Integer
Formatto
Range
Typto
0
Minto
0
Maxto 8.
Press Ok to save the changes. Again, you will see the parameter automatically added to the canvas.
Implement AMI Parameters
Connect the blocksMyCTLEParameter.CTLEMode
to theModeinput andMyCTLESignal.CTLEConfigSelect read
to theConfigSelectinput of the PassThrough block. Connect theConfigSelectoutput of the PassThrough block to theMyCTLESignal.CTLEConfigSelect write
block.
For more information, seeManaging AMI Parameters.
You can double-click on the blocks to confirm connectivity. For example double click on the blockMyCTLESignal.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 theMyCTLE
block, click theRefresh Initbutton. Since you used a system object, this connectivity is generated automatically. To verify this, click theShow Initbutton 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 theAMI-Rxtab, setCurrent valueofCTLEMode*parameter to1
to use fixed mode operation, and setCurrent valueofCTLEConfigSelect*parameter to4
. Re-run the simulation.
See Also
PassThrough|Configuration|CTLE|SerDes Designer