Wiki

This version (29 Nov 2022 17:24) was approved by Andrei Dragomir.The Previously approved version (19 Apr 2022 10:50) is available.Diff

Xilinx FPGAs Transceivers Wizard

The 7 Series and Ultrascale FPGAs Transceivers Wizard can be used to configure the transceivers inside the util_adxcvr core. In general in all reference designs the gigabit transceivers are configured to the highest supported line rate of the device. If the user wants to use their system with a different line rate, she needs to reconfigure the transceivers. This can be done by software, which does the reconfiguration through the DRP interface of the transceivers. Due the complexity of the transceivers, it can happen that the user needs to do addition settings in HDL using the Wizard. The following wiki provides a short guide on how to use the wizard to generate a transceiver configuration for a JESD204B interface.

To learn more about the 7 Series FPGAs transceivers and the Wizard, please read the UG476 and PG168. To learn more about the Ultrascale and Ultrascale+ FPGAs transceivers and the Wizard, please read the UG476, UG576, UG578 and PG168.

Required features by the JESD204B

The following features are required for a JESD204B interface:

  • QPLL and CPLL for clock generation
  • 8B/10B encoding and decoding
  • TX and RX buffer to solve rate and phase differences between XCLK (PMA parallel clock) and USRCLK (device clock)
  • RX Equalization and CDR
  • RX Byte and Word alignment
  • Tx configurable driver
  • Polarity control

There are 2 flows for generating transceivers using the wizard

The first one is using the GT wizard manually as explained below: Using_the_GUI_of_the_Wizard, and a second one that uses a script to generate one or more configurations: Using_the_generator_script. Please keep in mind that the script is capable of generating only configurations where the TX ad RX lane rates are even. For more customization, you can use the script to generate the configurations, then edit them manually as u please.

If you used the script method, there is another script that parses the generated configurations and generates a list containing only the parameters that are different from the default, the ones that you will have to change/add in your system_bd.tcl: Parsing_script. This script does not work at the moment for the configurations that are not generated by the script.

Using the GUI of the Wizard

7 Series FPGAs Transceiver Wizard

To start the wizard in the Vivado, a project should be loaded with a 7 Series FPGA which has gigabit transceivers. In the Project Manager select IP catalog and search after the keyword wizard, then select the 7 Series FPGAs Transceivers Wizard IP.

You can define a custom name for your component and leave it on default. The tools should recognize your transceiver type automatically, if not, you may have to double check if you have the right FPGA device selected for your project. You also need to select Include Shared Logic in core at the Shared Logic section in order to have both COMMON and CHANNEL instances in the generated code.

 7 Series FPGAs Transceiver Wizard

Line Rate and RefClk Selection

First, you need to select JESD204 as targeted protocol and specify your line rate and reference clock. A valid reference clock depends on your line rate. Make sure that you're using a valid reference clock form the drop-down list. Also you should set the used PLLs for TX and RX. If your line rate is equal for both directions, you can use the same PLL. Be aware that each PLL's VCO has a different frequency range where the circuit can function correctly. If your targeted line rate is too high or too low, you may be restricted to use just one of the two PLLs. All other settings can be left on their default value in this tab.

 Line Rate and RefClk Selection

Encoding and Clocking

If you selected JESD204 to be the used protocol, you don't have to change anything here. The JESD204B interface is using 8B/10B encoding/decoding, and the internal data width will be 40 bits. In all the reference designs the DRP frequency is connected to the system clock (100 MHz). In the Synchronization and Clocking section, both TX and RX should have an enabled buffer. The PLLREFCLK is used as the source for TXOUTCLK and RXOUTCLK.

 Encoding and clocking

Other tabs

The setting from the tabs PCIe, SATA, PRBS and CB and CC Sequence can be left to their default values.

Generated files

Location of the COMMON instance: <project_name>/<project_name>.gen/sources_1/ip/<component_name>/<component_name>_common.v Location of the CHANNEL instance: <project_name>/<project_name>.gen/sources_1/ip/<component_name>/<component_name>_gt.v

[~] less daq2_zc706.gen/sources_1/ip/gtwizard_0/gtwizard_0_common.v
[~] less daq2_zc706.gen/sources_1/ip/gtwizard_0/gtwizard_0_gt.v

This instances should be compared with the COMMON and CHANNEL instances used in util_adxcvr_cm.v and util_adxcvr_ch.v.

Ultrascale and Ultrascale+ FPGAs Transceiver Wizard

The overall workflow with the Ultrascale FPGAs Transceiver Wizard is similar to the 7 Series one, it just has a different GUI. To open up the wizard in the Project Manager select IP Catalog and search after the keyword wizard, then select the Ultrascale FPGAs Transceivers Wizard. You can define a custom name for your component and leave it on default. The tools should recognize your transceiver type automatically, if not, you may have to double check if you have the right FPGA device selected for your project. To apply the general JESD204B setting, select the GTH-JESD204 preset. In the first tab, called Basic you can find all the necessary settings. Select the targeted line rate, PLL and reference clock. The tool will tell you what PLL and reference clock can be used with a specific line rate. Note that the current version of the util_adxcvr core does not support QPLL Fractional-N option.

 Ultrascale FPGAs Transcevier Wizard Basic Tab

To have both COMMON and CHANNEL instances inside the generated core, in the Structural Options tab the Include transceiver COMMON in the Core option must be selected.

 Ultrascale FPGAs Transcevier Wizard Structural Options Tab

Generated files

To find the actual instance attributes, two different files should be examined. A generic one, which contains the actual software macro instance, and a wrapper, which instanciates the previous file and sets the required attributes.

Location of the COMMON instance: <project_name>/<project_name>.gen/sources_1/ip/<component_name>/synth/gtwizard_ultrascale_v1_7_gthe4_common.v

Location of the COMMON wrapper: <project_name>/<project_name>.gen/sources_1/ip/<component_name>/synth/<component_name>_gthe4_common_wrapper.v

Location of the CHANNEL instance: <project_name>/<project_name>.gen/sources_1/ip/<component_name>/synth/gtwizard_ultrascale_v1_7_gthe4_channel.v

Location of the CHANNEL instance: <project_name>/<project_name>.gen/sources_1/ip/<component_name>/synth/<component_name>_gthe4_channel_wrapper.v

[~] less daq2_zcu102.gen/sources_1/ip/gth_jesd204/synth/gtwizard_ultrascale_v1_7_gthe4_common.v
[~] less daq2_zcu102.gen/sources_1/ip/gth_jesd204/synth/gth_jesd204_gthe4_common_wrapper.v
[~] less daq2_zcu102.gen/sources_1/ip/gth_jesd204/synth/gtwizard_ultrascale_v1_7_gthe4_channel.v
[~] less daq2_zcu102.gen/sources_1/ip/gth_jesd204/synth/gth_jesd204_gthe4_channel_wrapper.v
The example above is for the project DAQ2 with ZCU102 and with a component name of gth_jesd204.

This generated attributes values should be compared with the values used with the COMMON and CHANNEL instances in util_adxcvr_cm.v and util_adxcvr_ch.v.

Using the generator script

If you are using Windows, please use the ad_gth_generator command followed by the parsing script call, since the get_diff_params only works for linux systems

Open the TCL console inside your Vivado project. Source gtwizard_generator.tcl

 source ../../scripts/gtwizard_generator.tcl 

Here you have 2 options

ad_gth_generator

This function only generates the IPs, but you can edit them using GT wizard afterwards. After sourcing the script, you can just run the following command ad_gth_generator with the desired parameters.

 ad_gth_generator { 9.8304 } QPLL1  { 245.76 } 

The first parameter represents the lane rate that will be set to both RX and TX. The second one can be CPLL, QPLL, QPLL0, QPLL1, depending on the transceiver of the board. The third one is the reference clock. If left empty, then it will be filled with all the viable values for the lane rate given. This feature does not work at the moment for GTXE2 transceivers.

 ad_gth_generator {9.8304} QPLL0 {} 

Both the first and the third parameters are actually lists, so you can use that to generate multiple configurations. Keep in mind that the script will generate IPs with all the combinations between the lane rate and reference clock.

 ad_gth_generator {9.8304 4.9152} QPLL0 {245.76 122.88} false 

This call makes 4 instances of transceivers. Now you can double click on the <ip_name>.xci from the sources window to further customize the IP, including configurations where RX and TX have different rates. After you are all set, run the Parsing_script to get the list of parameters that need to be changed into the project.

get_diff_params

This function generates the IP and calls the parsing script.

This method works only with configurations where TX and RX have the same lane rate

Call the get_diff_params method with the desired parameters.

 get_diff_params 15.4 QPLL0 385 

The first parameter represents the lane rate that will be set to both RX and TX. The second one can be CPLL, QPLL0, QPLL1. The third one is the reference clock. If left empty, then it will be filled with all the viable values for the lane rate given.

 get_diff_params {9.8304} QPLL0 {} false 

The fourth parameter is optional. If you set it to false, the script will remove from the project and delete from disk the generated IPs after the list of parameters is done, so you don't have to do that manually.

Both the first and the third parameters are actually lists, so you can use that to generate multiple configurations. Keep in mind that the script will generate IPs with all the combinations between the lane rate and reference clock.

 get_diff_params {9.8304 4.9152} QPLL0 {245.76 122.88} false 

This call makes 4 instances of transceivers, and also deletes them after generating the list because of the 4th parameter is set to false.

Parsing script

If you used the get_diff_params method from the script to generate the IP, there is no need to call it again.

If you used the ad_gth_generator method from the script, you will have to call the parsing script from the shell, as explained below.

If you edited the IP in any way after generating it, make sure to generate output products for the transceiver before going forward.

Navigate to <project_name>.gen/sources_1/ip in the terminal. From there, call the gtwiz_parser.pl script, specifying the GT type as in the example.

 ../../../../../scripts/gtwiz_parser.pl GTHE4

If you run the script wile having multiple configurations, it will include the unique parameters for each IP, plus the gt_global list that contains the common parameters within generated configurations that are different from the default values. Now, you should find the files at <project_name>.gen/sources_1/ip Make sure to overwrite the list from system_bd with the one in <GT_Type>_cfng.txt.

Please note that if you used the GUI method to instantiate the wizard, the paring script will not work

Output products

Output products can be found at this location: <project_name>.gen/sources_1/ip

Most of the output files make sense in the context of parsing multiple configurations at once. If this is not the case, and you just used it to generate a single configuration, then the only file you need is <GT_Type>_cfng.txt.

If you had multiple configurations, all the output files should give you some valuable information.

GT_Type_cfng.txt

This file contains 2 lists. The first one is a list of parameters that are unique for the desired configuration/configurations, different from the default values, and these parameters should be written into the system_bd file for your project. The next list called “gt_global” is a list of parameters that are common between the multiple generated configurations. These are also only the ones different from the default ones. This list should be empty if you have only one configuration generated.

GT_Type_var_dist.txt

Here you will find a list with the distribution of each DRP attribute in relation to the lane rates of your instances.

 $VAR1 = 'RX_CLK25_DIV';
$VAR2 = {
          '8' => [
                   'GTHE4_QPLL0_9_8304_196'
                 ],
          '10' => [
                    'GTHE4_QPLL0_9_8304_245'
                  ]
        };
$VAR3 = 'QPLL0_FBDIV';
$VAR4 = {
          '50' => [
                    'GTHE4_QPLL0_9_8304_196'
                  ],
          '40' => [
                    'GTHE4_QPLL0_9_8304_245'
                  ]
        };
$VAR5 = 'TX_CLK25_DIV';
$VAR6 = {
          '8' => [
                   'GTHE4_QPLL0_9_8304_196'
                 ],
          '10' => [
                    'GTHE4_QPLL0_9_8304_245'
                  ]
        };

GT_Type_vco_dist.txt

Here you will find a list with the distribution of each DRP attribute in relation to the VCO frequency of your instances. If this list is empty, that means that the attributes are the same for the used VCOs (Probably all the instances have the same VCO) This should look similar to “GT_Type_var_dist.txt”

table_common.csv

This is a table containing 3 columns: The first one is the name of the parameter. The second one is the default value for that parameter, and it is that value found in the util_adxcvr file. The third column is called gt_global, and it contains the value that all the configurations have in common, but is different from the default. If there is an empty cell in this column, it means that there is used the default value.

table_unique.csv

This table contains the unique parameters for each individual configurations. The values found here are the ones that differ among your generated configurations.

If you encounter errors using the script, please make sure that you have the <project_name>.gen/sources_1/ip and <project_name>.srcs/sources_1/ip folders clear from other previous gtwizard IP instances. Also, the script uses git to update the default util_adxcvr files, and it will probably not work if you are in detached HEAD state, or any state that could generate git conflicts with it.
resources/fpga/docs/xgt_wizard.txt · Last modified: 29 Nov 2022 17:24 by Andrei Dragomir