Main Content

Customizing SerDes Toolbox Datapath Control Signals

This example shows how to customize the control signals in a SerDes system datapath by adding new custom AMI parameters and using MATLAB® function blocks. This allows you to customize existing control parameters without modifying the built-in blocks in the SerDes Toolbox™ library.

This example shows how to add a new AMI parameter to control the operation of the three transmitter taps used by the FFE block. The custom AMI parameter simultaneously sets all three taps to one of the ten values defined by the PCIe4 specification or allows you to enter three custom floating-point tap values. To know more about how to define a PCIe4 transmitter model, seePCIe4 Transmitter/Receiver IBIS-AMI Model

PCIe4 Transfer Model

The transmitter model in this example complies with the PCIe4 specification. The receiver is a simple pass-through model. A PCIe4 compliant transmitter uses a3-tap feed forward equalizer (FFE) with one pre-tap and one post-tap, and ten presets.

Open the modeladding_tx_ffe_params。The SerDes system Simulink® model consists of Configuration, Stimulus, Tx, Analog Channel and Rx blocks.

open_system('adding_tx_ffe_params.slx')

  • The Tx subsystem contains an FFE block to model the time-domain portion of the AMI model and an Init block to model the statistical portion.

  • The Analog Channel block has the PCIe4 parameter values forTarget frequency,Loss,Impedanceand Tx/Rx analog model parameters.

  • The Rx subsystem has a Pass-Through block and an Init block.

Add New AMI Parameter

Add a new AMI parameter to the transmitter which is available to both the Init and GetWave datapath blocks and functions. The parameter is also included in the Tx IBIS-AMI file.

Double-click the Configuration block to open the Block Parameters dialog box. Click theOpen SerDes IBIS-AMI Managerbutton. Go to theAMI-Txtab of the SerDeS IBIS-AMI Manager dialog box.

  • Select the FFE parameter, then clickAdd Parameter...to add a new FFE sub-parameter.

  • 设置Parameter name toConfigSelect

  • Keep theCurrent valueas0

  • In the Description, addPre/Main/Post tap configuration selector

  • Keep theUsageasIn

  • 设置TypetoInteger

  • 设置FormattoList

  • Under the列表格式的细节, setDefaultto0

  • SetList valuesto[-1 0 1 2 3 4 5 6 7 8 9]

  • SetList_Tip valuesto["User Defined" "P0" "P1" "P2" "P3" "P4" "P5" "P6" "P7" "P8" "P9"]

A new parameterConfigSelect* is added to theAMI-Txtab.

Modify Init

Modify the Initialize MATLAB function inside the Init block in the Tx subsystem to use the newly addedConfigSelect*parameter. TheConfigSelect* parameter controls the existing three transmitter taps. To accomplish this, add a switch statement that takes in the values ofConfigSelect* and automatically sets the values for all three Tx taps, ignoring the user defined values for each tap. If aConfigSelectvalue of-1is used, then the user-defined Tx tap values are passed through to the FFE datapath block unchanged.

Inside the Tx subsystem, double-click the Init block to open the Block Parameters dialog box and click theRefresh Initbutton to propagate the new AMI parameter to the Initialize sub-system.

TypeCtrl-Uto look under the mask for the Init block, then double-click on the initialize block to open the Initialize Function.

Double-click on the impulseEqualization MATLAB function block to open the function in MATLAB. This is an automatically generated function which provides the impulse response processing of the SerDes system block (IBIS AMI-Init). The%% BEGIN:and% END:lines denote the section where custom user code can be entered. Data in this section will not get over-written when Refresh Init is run:

%% BEGIN: Custom user code area (retained when 'Refresh Init' button is pressed)FFEParameter.ConfigSelect;% User added AMI parameter% END: Custom user code area (retained when 'Refresh Init' button is pressed)

To add the custom ConfigSelect control code, scroll down the Customer user code area, comment out theFFEParameter.ConfigSelectline, then enter the following code:

%% BEGIN: Custom user code area (retained when 'Refresh Init' button is pressed)%FFEParameter.ConfigSelect; % User added AMI parameterswitchFFEParameter.ConfigSelectcase-1% User defined tap weightsFFEInit.TapWeights = FFEParameter.TapWeights;case0% PCIe Configuration: P0FFEInit.TapWeights = [0.000 0.750 -0.250];case1% PCIe Configuration: P1FFEInit.TapWeights = [0.000 0.830 -0.167];case2% PCIe Configuration: P2FFEInit.TapWeights = [0.000 0.800 -0.200];case3% PCIe Configuration: P3FFEInit.TapWeights = [0.000 0.875 -0.125];case4% PCIe Configuration: P4FFEInit.TapWeights = [0.000 1.000 0.000];case5% PCIe Configuration: P5FFEInit.TapWeights = [-0.100 0.900 0.000];case6% PCIe Configuration: P6FFEInit.TapWeights = [-0.125 0.875 0.000];case7% PCIe Configuration: P7FFEInit.TapWeights = [-0.100 0.700 -0.200];case8% PCIe Configuration: P8FFEInit.TapWeights = [-0.125 0.750 -0.125];case9% PCIe Configuration: P9FFEInit.TapWeights = [-0.166 0.834 0.000];otherwiseFFEInit.TapWeights = FFEParameter.TapWeights;end% END: Custom user code area (retained when 'Refresh Init' button is pressed)

To test that the new FFE control parameter is working correctly, open the SerDes IBIS-AMI Manager dialog box from the Configuration block. In theAMI-Txtab, edit theConfigSelect* parameter to setCurrent valuetoP7。作为PCIe配置对应P7: Pre =-0.100, Main = 0.700 and Post = -0.200.

Run the simulation and observe the results of Init statistical analysis.Note:The Time Domain waveform will not be correct until you wire the Constant block for the new parameterConfigSelectin the canvas for the FFE. You will see how to do this in the next section.

Next, set theCurrent valueof theConfigSelect* parameter toUser Defined。This corresponds to user-defined tap weights: Pre = 0.000, Main = 1.000 and Post = 0.000.

Run the simulation and observe the results of Init statistical analysis.

Try different values ofConfigSelect* to verify proper operation. The statistical eye opens and closes based on the amount of equalization applied by the FFE. How much the eye changes, and the tap values that create the most open eye varies based on the loss defined in the Analog Channel block.

Modify GetWave

To modify GetWave, add a new MATLAB function that operates in the same manner as the Initialize function.

Inside the Tx subsystem, typeCtrl-Uto look under the mask of the FFE block.

  • You can see that a Constant block was automatically added by the IBIS-AMI manager to the canvas with theConstant valueset toFFEParameter.ConfigSelect

  • 添加一个MATLAB功能块的画布Simulink/User-Defined library.

  • Rename the MATLAB Function block toPCIe4FFEconfig

  • Double-click the MATLAB Function block and replace the template code with the following:

% PCIe4 tap configuration selector% Selects pre-defined Tx FFE tap weights based on PCIe4 specified% configurations.%% Inputs:% TapWeightsIn: User defined floating point tap weight values.% ConfigSelect: 0-9: PCIe4 defined configuration (P0-P9).% -1: User defined configuration (from TapWeightsIn).% Outputs:% TapWeightsOut: Array of tap weights to be used.%functionTapWeightsOut = PCIe4FFEconfig(TapWeightsIn, ConfigSelect)
switchConfigSelectcase-1% User defined tap weightsTapWeightsOut = TapWeightsIn;case0% PCIe Configuration: P0TapWeightsOut = [0.000 0.750 -0.250];case1% PCIe Configuration: P1TapWeightsOut = [0.000 0.833 -0.167];case2% PCIe Configuration: P2TapWeightsOut = [0.000 0.800 -0.200];case3% PCIe Configuration: P3TapWeightsOut = [0.000 0.875 -0.125];case4% PCIe Configuration: P4TapWeightsOut = [0.000 1.000 0.000];case5% PCIe Configuration: P5TapWeightsOut = [-0.100 0.900 0.000];case6% PCIe Configuration: P6TapWeightsOut = [-0.125 0.875 0.000];case7% PCIe Configuration: P7TapWeightsOut = [-0.100 0.700 -0.200];case8% PCIe Configuration: P8TapWeightsOut = [-0.125 0.750 -0.125];case9% PCIe Configuration: P9TapWeightsOut = [-0.166 0.834 0.000];otherwiseTapWeightsOut = TapWeightsIn;end

Re-wire the FFE sub-system so that the FFETapWeights and FFEConfigSelect constant blocks connect to the inputs of the newly defined PCIe4FFEconfig MATLAB function block. The TapWeightsOut signal from the PCIe4FFEconfig block connects to theTapWeightsport of the FFE block.

To test that the new FFE control parameter is working correctly, open the SerDes IBIS-AMI Manager dialog box from the Configuration block. In theAMI-Txtab, edit theConfigSelect* parameter to setCurrent valuetoP7。作为PCIe配置对应P7: Pre =-0.100, Main = 0.700 and Post = -0.200. Observe the output waveform.

Next, set theCurrent valueof theConfigSelect* parameter toUser Defined。This corresponds to user-defined tap weights: Pre = 0.000, Main = 1.000 and Post = 0.000. Observe how the output waveform changes.

Try different values ofConfigSelect* to verify proper operation. The time-domain eye opens and closes based on the amount of equalization applied by the FFE. How much the eye changes, and the tap values that create the most open eye varies based on the loss defined in the Analog Channel block.

Export the Tx IBIS-AMI Model

Verify that both Init and GetWave are behaving as expected, then generate the final IBIS-AMI compliant PCIe4 model executables, IBIS and AMI files.

Double-click the Configuration block to open the Block Parameters dialog box. Click theOpen SerDes IBIS-AMI Managerbutton, then select theExporttab:

  • Update theTx model nametopcie4_tx

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

  • Verify thatDual modelis selected asModel Typefor the Tx. This will create model executables that support both statistical (Init) and time domain (GetWave) analysis.

  • 设置Tx modelBits to ignoreparameter to3since there are three taps in the Tx FFE.

  • 设置Models to exporttoTx only

  • 设置IBIS file name (.ibs)topcie4_tx_serdes.ibs

  • Click theExportbutton to generate models in theTarget directory

测试工程师t Generated IBIS-AMI Model

The PCIe4 transmitter IBIS-AMI model is now complete and ready to be tested in any industry standard AMI model simulator.

References

PCI-SIG.

See Also

||

Related Topics

Baidu
map