pluto_hdl_adi/projects/dac_fmc_ebz/common/config.tcl

172 lines
5.5 KiB
Tcl
Raw Normal View History

###############################################################################
## Copyright (C) 2019-2023 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################
# Select the device and mode you want the project synthesise for, by setting the
# ADI_DAC_DEVICE and ADI_DAC_MODE environment variables:
#
# make ADI_DAC_DEVICE=AD9172 ADI_DAC_MODE=04
dac_fmc_ebz: Add initial ZCU102 and ZC706 carrier support Add a generic project for the AD91xx-FMC-EBZ DAC boards connected to the ZCU102 and ZC706 carrier boards. The project is called dac_fmc_ebz as the intention is to support all DAC FMC evaluation boards with this project since they are sufficiently similar to be supported by the same design. This project will successively extended to add support for more boards. The desired DAC device and JESD operation mode must be selected from the following file: ./common/config.tcl This design can support the following FMC boards which are all pin compatible: * AD9135-FMC-EBZ * AD9136-FMC-EBZ * AD9144-FMC-EBZ * AD9152-FMC-EBZ * AD9154-FMC-EBZ * AD916x-FMC-EBZ * AD9171-FMC-EBZ * AD9172-FMC-EBZ * AD9173-FMC-EBZ Note that the AD9152-FMC-EBZ only uses the first 4 lanes, whereas all other boards use 8 lanes. This project assumes that the transceiver reference clock and SYSREF are provided via the clock distribution chip that is found on the ADxxxx-FMC-EBZ board. In terms of pin connections between the FPGA and the FMC board the AD9172-FMC-EBZ is very similar to the AD9144-FMC-EBZ. The main differences are: * The DAC txen signals are connected to different pins * The polarity of the spi_en signal is active low instead of active high * The maximum lane rate is up to 15.4 Gpbs To accommodate this 5 txctrl signals as well as the spi_en signal are connected to GPIOs. Software can decide how to use them depending on which FMC board is connected. Note that each carrier has a maximum supported lane rate. Modes of the AD9172 (and similar) that exceed the carrier specific limit can not be used on that carrier. The limits are as following: * ZC706: 10.3125 Gbps * ZCU102: 15.4 Gbps (max AD9172 lanerate) * SPI and GPIOs to PMOD header support Connect a SPI interface and some GPIOs to the PL PMOD headers on the zcu102 and zc706 carriers. This is can be used to control additional external hardware like a clock chip or an analog front-end. This is especially useful on FMC boards that do not feature a clock generator chip. The pin out is: PMOD 1: SPI clock PMOD 2: SPI chipselect PMOD 3: SPI MOSI PMOD 4: SPI MISO PMOD 7: GPIO 0 PMOD 8: GPIO 1 PMOD 9: GPIO 2 PMOD 10: GPIO 3 The GPIOs are mapped at offset 48-51 of the EMIO GPIOs.
2018-06-15 11:50:34 +00:00
# Default:
set device AD9172
set mode 04
if [info exists ::env(ADI_DAC_DEVICE)] {
set device $::env(ADI_DAC_DEVICE)
} else {
set env(ADI_DAC_DEVICE) $device
}
if [info exists ::env(ADI_DAC_MODE)] {
set mode $::env(ADI_DAC_MODE)
} else {
set env(ADI_DAC_MODE) $mode
}
dac_fmc_ebz: Add initial ZCU102 and ZC706 carrier support Add a generic project for the AD91xx-FMC-EBZ DAC boards connected to the ZCU102 and ZC706 carrier boards. The project is called dac_fmc_ebz as the intention is to support all DAC FMC evaluation boards with this project since they are sufficiently similar to be supported by the same design. This project will successively extended to add support for more boards. The desired DAC device and JESD operation mode must be selected from the following file: ./common/config.tcl This design can support the following FMC boards which are all pin compatible: * AD9135-FMC-EBZ * AD9136-FMC-EBZ * AD9144-FMC-EBZ * AD9152-FMC-EBZ * AD9154-FMC-EBZ * AD916x-FMC-EBZ * AD9171-FMC-EBZ * AD9172-FMC-EBZ * AD9173-FMC-EBZ Note that the AD9152-FMC-EBZ only uses the first 4 lanes, whereas all other boards use 8 lanes. This project assumes that the transceiver reference clock and SYSREF are provided via the clock distribution chip that is found on the ADxxxx-FMC-EBZ board. In terms of pin connections between the FPGA and the FMC board the AD9172-FMC-EBZ is very similar to the AD9144-FMC-EBZ. The main differences are: * The DAC txen signals are connected to different pins * The polarity of the spi_en signal is active low instead of active high * The maximum lane rate is up to 15.4 Gpbs To accommodate this 5 txctrl signals as well as the spi_en signal are connected to GPIOs. Software can decide how to use them depending on which FMC board is connected. Note that each carrier has a maximum supported lane rate. Modes of the AD9172 (and similar) that exceed the carrier specific limit can not be used on that carrier. The limits are as following: * ZC706: 10.3125 Gbps * ZCU102: 15.4 Gbps (max AD9172 lanerate) * SPI and GPIOs to PMOD header support Connect a SPI interface and some GPIOs to the PL PMOD headers on the zcu102 and zc706 carriers. This is can be used to control additional external hardware like a clock chip or an analog front-end. This is especially useful on FMC boards that do not feature a clock generator chip. The pin out is: PMOD 1: SPI clock PMOD 2: SPI chipselect PMOD 3: SPI MOSI PMOD 4: SPI MISO PMOD 7: GPIO 0 PMOD 8: GPIO 1 PMOD 9: GPIO 2 PMOD 10: GPIO 3 The GPIOs are mapped at offset 48-51 of the EMIO GPIOs.
2018-06-15 11:50:34 +00:00
# 1 - Single link
# 2 - Dual link
set num_links 1
# This reference design supports the following devices and modes:
# AD9135/AD9136
# Mode M L S F HD N NP
set params(AD9135,08) {1 4 2 1 1 16 16}
set params(AD9135,09) {1 2 1 1 1 16 16}
set params(AD9135,10) {1 1 1 2 0 16 16}
set params(AD9135,11) {2 8 2 1 1 16 16}
set params(AD9135,12) {2 4 1 1 1 16 16}
set params(AD9135,13) {2 2 1 2 0 16 16}
set params(AD9135,device_code) 0
# Mode M L S F HD N NP
set params(AD9136,08) {1 4 2 1 1 16 16}
set params(AD9136,09) {1 2 1 1 1 16 16}
set params(AD9136,10) {1 1 1 2 0 16 16}
set params(AD9136,11) {2 8 2 1 1 16 16}
set params(AD9136,12) {2 4 1 1 1 16 16}
set params(AD9136,13) {2 2 1 2 0 16 16}
set params(AD9136,device_code) 0
# AD9144/AD9154
# Mode M L S F HD N NP
set params(AD9144,00) {4 8 1 1 1 16 16}
set params(AD9144,01) {4 8 2 2 0 16 16}
set params(AD9144,02) {4 4 1 2 0 16 16}
set params(AD9144,03) {4 2 1 4 0 16 16}
set params(AD9144,04) {2 4 1 1 1 16 16}
set params(AD9144,05) {2 4 2 2 0 16 16}
set params(AD9144,06) {2 2 1 2 0 16 16}
set params(AD9144,07) {2 1 1 4 0 16 16}
set params(AD9144,09) {1 2 1 1 1 16 16}
set params(AD9144,10) {1 1 1 2 0 16 16}
set params(AD9144,device_code) 1
# Mode M L S F HD N NP
set params(AD9154,00) {4 8 1 1 1 16 16}
set params(AD9154,01) {4 8 2 2 0 16 16}
set params(AD9154,02) {4 4 1 2 0 16 16}
set params(AD9154,03) {4 2 1 4 0 16 16}
set params(AD9154,04) {2 4 1 1 1 16 16}
set params(AD9154,05) {2 4 2 2 0 16 16}
set params(AD9154,06) {2 2 1 2 0 16 16}
set params(AD9154,07) {2 1 1 4 0 16 16}
set params(AD9154,09) {1 2 1 1 1 16 16}
set params(AD9154,10) {1 1 1 2 0 16 16}
set params(AD9154,device_code) 1
# AD9152
# Mode M L S F HD N NP
set params(AD9152,04) {2 4 1 1 1 16 16}
set params(AD9152,05) {2 4 2 2 0 16 16}
set params(AD9152,06) {2 2 1 2 0 16 16}
set params(AD9152,07) {2 1 1 4 0 16 16}
set params(AD9152,09) {1 2 1 1 1 16 16}
set params(AD9152,10) {1 1 1 2 0 16 16}
set params(AD9152,device_code) 2
# AD9161/2/3/4
# Mode M L S F HD N NP
set params(AD9161,01) {2 1 1 4 1 16 16}
set params(AD9161,02) {2 2 2 2 1 16 16}
set params(AD9161,03) {2 3 3 4 1 16 16}
set params(AD9161,04) {2 4 1 1 1 16 16}
set params(AD9161,06) {2 6 3 2 1 16 16}
set params(AD9161,08) {2 8 2 1 1 16 16}
dac_fmc_ebz: Add initial ZCU102 and ZC706 carrier support Add a generic project for the AD91xx-FMC-EBZ DAC boards connected to the ZCU102 and ZC706 carrier boards. The project is called dac_fmc_ebz as the intention is to support all DAC FMC evaluation boards with this project since they are sufficiently similar to be supported by the same design. This project will successively extended to add support for more boards. The desired DAC device and JESD operation mode must be selected from the following file: ./common/config.tcl This design can support the following FMC boards which are all pin compatible: * AD9135-FMC-EBZ * AD9136-FMC-EBZ * AD9144-FMC-EBZ * AD9152-FMC-EBZ * AD9154-FMC-EBZ * AD916x-FMC-EBZ * AD9171-FMC-EBZ * AD9172-FMC-EBZ * AD9173-FMC-EBZ Note that the AD9152-FMC-EBZ only uses the first 4 lanes, whereas all other boards use 8 lanes. This project assumes that the transceiver reference clock and SYSREF are provided via the clock distribution chip that is found on the ADxxxx-FMC-EBZ board. In terms of pin connections between the FPGA and the FMC board the AD9172-FMC-EBZ is very similar to the AD9144-FMC-EBZ. The main differences are: * The DAC txen signals are connected to different pins * The polarity of the spi_en signal is active low instead of active high * The maximum lane rate is up to 15.4 Gpbs To accommodate this 5 txctrl signals as well as the spi_en signal are connected to GPIOs. Software can decide how to use them depending on which FMC board is connected. Note that each carrier has a maximum supported lane rate. Modes of the AD9172 (and similar) that exceed the carrier specific limit can not be used on that carrier. The limits are as following: * ZC706: 10.3125 Gbps * ZCU102: 15.4 Gbps (max AD9172 lanerate) * SPI and GPIOs to PMOD header support Connect a SPI interface and some GPIOs to the PL PMOD headers on the zcu102 and zc706 carriers. This is can be used to control additional external hardware like a clock chip or an analog front-end. This is especially useful on FMC boards that do not feature a clock generator chip. The pin out is: PMOD 1: SPI clock PMOD 2: SPI chipselect PMOD 3: SPI MOSI PMOD 4: SPI MISO PMOD 7: GPIO 0 PMOD 8: GPIO 1 PMOD 9: GPIO 2 PMOD 10: GPIO 3 The GPIOs are mapped at offset 48-51 of the EMIO GPIOs.
2018-06-15 11:50:34 +00:00
set params(AD9161,device_code) 3
# Mode M L S F HD N NP
set params(AD9162,01) {2 1 1 4 1 16 16}
set params(AD9162,02) {2 2 2 2 1 16 16}
set params(AD9162,03) {2 3 3 4 1 16 16}
set params(AD9162,04) {2 4 1 1 1 16 16}
set params(AD9162,06) {2 6 3 2 1 16 16}
set params(AD9162,08) {2 8 2 1 1 16 16}
dac_fmc_ebz: Add initial ZCU102 and ZC706 carrier support Add a generic project for the AD91xx-FMC-EBZ DAC boards connected to the ZCU102 and ZC706 carrier boards. The project is called dac_fmc_ebz as the intention is to support all DAC FMC evaluation boards with this project since they are sufficiently similar to be supported by the same design. This project will successively extended to add support for more boards. The desired DAC device and JESD operation mode must be selected from the following file: ./common/config.tcl This design can support the following FMC boards which are all pin compatible: * AD9135-FMC-EBZ * AD9136-FMC-EBZ * AD9144-FMC-EBZ * AD9152-FMC-EBZ * AD9154-FMC-EBZ * AD916x-FMC-EBZ * AD9171-FMC-EBZ * AD9172-FMC-EBZ * AD9173-FMC-EBZ Note that the AD9152-FMC-EBZ only uses the first 4 lanes, whereas all other boards use 8 lanes. This project assumes that the transceiver reference clock and SYSREF are provided via the clock distribution chip that is found on the ADxxxx-FMC-EBZ board. In terms of pin connections between the FPGA and the FMC board the AD9172-FMC-EBZ is very similar to the AD9144-FMC-EBZ. The main differences are: * The DAC txen signals are connected to different pins * The polarity of the spi_en signal is active low instead of active high * The maximum lane rate is up to 15.4 Gpbs To accommodate this 5 txctrl signals as well as the spi_en signal are connected to GPIOs. Software can decide how to use them depending on which FMC board is connected. Note that each carrier has a maximum supported lane rate. Modes of the AD9172 (and similar) that exceed the carrier specific limit can not be used on that carrier. The limits are as following: * ZC706: 10.3125 Gbps * ZCU102: 15.4 Gbps (max AD9172 lanerate) * SPI and GPIOs to PMOD header support Connect a SPI interface and some GPIOs to the PL PMOD headers on the zcu102 and zc706 carriers. This is can be used to control additional external hardware like a clock chip or an analog front-end. This is especially useful on FMC boards that do not feature a clock generator chip. The pin out is: PMOD 1: SPI clock PMOD 2: SPI chipselect PMOD 3: SPI MOSI PMOD 4: SPI MISO PMOD 7: GPIO 0 PMOD 8: GPIO 1 PMOD 9: GPIO 2 PMOD 10: GPIO 3 The GPIOs are mapped at offset 48-51 of the EMIO GPIOs.
2018-06-15 11:50:34 +00:00
set params(AD9162,device_code) 3
# Mode M L S F HD N NP
set params(AD9163,01) {2 1 1 4 1 16 16}
set params(AD9163,02) {2 2 2 2 1 16 16}
set params(AD9163,03) {2 3 3 4 1 16 16}
set params(AD9163,04) {2 4 1 1 1 16 16}
set params(AD9163,06) {2 6 3 2 1 16 16}
set params(AD9163,08) {2 8 2 1 1 16 16}
dac_fmc_ebz: Add initial ZCU102 and ZC706 carrier support Add a generic project for the AD91xx-FMC-EBZ DAC boards connected to the ZCU102 and ZC706 carrier boards. The project is called dac_fmc_ebz as the intention is to support all DAC FMC evaluation boards with this project since they are sufficiently similar to be supported by the same design. This project will successively extended to add support for more boards. The desired DAC device and JESD operation mode must be selected from the following file: ./common/config.tcl This design can support the following FMC boards which are all pin compatible: * AD9135-FMC-EBZ * AD9136-FMC-EBZ * AD9144-FMC-EBZ * AD9152-FMC-EBZ * AD9154-FMC-EBZ * AD916x-FMC-EBZ * AD9171-FMC-EBZ * AD9172-FMC-EBZ * AD9173-FMC-EBZ Note that the AD9152-FMC-EBZ only uses the first 4 lanes, whereas all other boards use 8 lanes. This project assumes that the transceiver reference clock and SYSREF are provided via the clock distribution chip that is found on the ADxxxx-FMC-EBZ board. In terms of pin connections between the FPGA and the FMC board the AD9172-FMC-EBZ is very similar to the AD9144-FMC-EBZ. The main differences are: * The DAC txen signals are connected to different pins * The polarity of the spi_en signal is active low instead of active high * The maximum lane rate is up to 15.4 Gpbs To accommodate this 5 txctrl signals as well as the spi_en signal are connected to GPIOs. Software can decide how to use them depending on which FMC board is connected. Note that each carrier has a maximum supported lane rate. Modes of the AD9172 (and similar) that exceed the carrier specific limit can not be used on that carrier. The limits are as following: * ZC706: 10.3125 Gbps * ZCU102: 15.4 Gbps (max AD9172 lanerate) * SPI and GPIOs to PMOD header support Connect a SPI interface and some GPIOs to the PL PMOD headers on the zcu102 and zc706 carriers. This is can be used to control additional external hardware like a clock chip or an analog front-end. This is especially useful on FMC boards that do not feature a clock generator chip. The pin out is: PMOD 1: SPI clock PMOD 2: SPI chipselect PMOD 3: SPI MOSI PMOD 4: SPI MISO PMOD 7: GPIO 0 PMOD 8: GPIO 1 PMOD 9: GPIO 2 PMOD 10: GPIO 3 The GPIOs are mapped at offset 48-51 of the EMIO GPIOs.
2018-06-15 11:50:34 +00:00
set params(AD9163,device_code) 3
# Mode M L S F HD N NP
set params(AD9164,01) {2 1 1 4 1 16 16}
set params(AD9164,02) {2 2 2 2 1 16 16}
set params(AD9164,03) {2 3 3 4 1 16 16}
set params(AD9164,04) {2 4 1 1 1 16 16}
set params(AD9164,06) {2 6 3 2 1 16 16}
set params(AD9164,08) {2 8 2 1 1 16 16}
dac_fmc_ebz: Add initial ZCU102 and ZC706 carrier support Add a generic project for the AD91xx-FMC-EBZ DAC boards connected to the ZCU102 and ZC706 carrier boards. The project is called dac_fmc_ebz as the intention is to support all DAC FMC evaluation boards with this project since they are sufficiently similar to be supported by the same design. This project will successively extended to add support for more boards. The desired DAC device and JESD operation mode must be selected from the following file: ./common/config.tcl This design can support the following FMC boards which are all pin compatible: * AD9135-FMC-EBZ * AD9136-FMC-EBZ * AD9144-FMC-EBZ * AD9152-FMC-EBZ * AD9154-FMC-EBZ * AD916x-FMC-EBZ * AD9171-FMC-EBZ * AD9172-FMC-EBZ * AD9173-FMC-EBZ Note that the AD9152-FMC-EBZ only uses the first 4 lanes, whereas all other boards use 8 lanes. This project assumes that the transceiver reference clock and SYSREF are provided via the clock distribution chip that is found on the ADxxxx-FMC-EBZ board. In terms of pin connections between the FPGA and the FMC board the AD9172-FMC-EBZ is very similar to the AD9144-FMC-EBZ. The main differences are: * The DAC txen signals are connected to different pins * The polarity of the spi_en signal is active low instead of active high * The maximum lane rate is up to 15.4 Gpbs To accommodate this 5 txctrl signals as well as the spi_en signal are connected to GPIOs. Software can decide how to use them depending on which FMC board is connected. Note that each carrier has a maximum supported lane rate. Modes of the AD9172 (and similar) that exceed the carrier specific limit can not be used on that carrier. The limits are as following: * ZC706: 10.3125 Gbps * ZCU102: 15.4 Gbps (max AD9172 lanerate) * SPI and GPIOs to PMOD header support Connect a SPI interface and some GPIOs to the PL PMOD headers on the zcu102 and zc706 carriers. This is can be used to control additional external hardware like a clock chip or an analog front-end. This is especially useful on FMC boards that do not feature a clock generator chip. The pin out is: PMOD 1: SPI clock PMOD 2: SPI chipselect PMOD 3: SPI MOSI PMOD 4: SPI MISO PMOD 7: GPIO 0 PMOD 8: GPIO 1 PMOD 9: GPIO 2 PMOD 10: GPIO 3 The GPIOs are mapped at offset 48-51 of the EMIO GPIOs.
2018-06-15 11:50:34 +00:00
set params(AD9164,device_code) 3
# AD9171
# Mode M L S F HD N NP
set params(AD9171,00) {2 1 1 4 1 16 16}
set params(AD9171,03) {2 2 1 2 1 16 16}
set params(AD9171,device_code) 4
# AD9172/AD9174/AD9176
# Mode M L S F HD N NP
set params(AD9172,00) {2 1 1 4 1 16 16}
set params(AD9172,01) {4 2 1 4 1 16 16}
set params(AD9172,02) {6 3 1 4 1 16 16}
set params(AD9172,03) {2 2 1 2 1 16 16}
set params(AD9172,04) {4 4 1 2 1 16 16}
set params(AD9172,08) {2 4 1 1 1 16 16}
set params(AD9172,09) {2 4 2 2 1 16 16}
set params(AD9172,10) {2 8 2 1 1 16 16}
set params(AD9172,11) {2 8 4 2 1 16 16}
set params(AD9172,18) {1 4 2 1 1 16 16}
set params(AD9172,19) {1 4 4 2 1 16 16}
set params(AD9172,20) {1 8 4 1 1 16 16}
set params(AD9172,21) {1 8 8 2 1 16 16}
set params(AD9172,device_code) 5
# AD9173/AD9175
# Mode M L S F HD N NP
set params(AD9173,00) {2 1 1 4 1 16 16}
set params(AD9173,01) {4 2 1 4 1 16 16}
set params(AD9173,02) {6 3 1 4 1 16 16}
set params(AD9173,03) {2 2 1 2 1 16 16}
set params(AD9173,04) {4 4 1 2 1 16 16}
set params(AD9173,08) {2 4 1 1 1 16 16}
set params(AD9173,09) {2 4 2 2 1 16 16}
set params(AD9173,13) {2 4 1 1 1 11 16}
set params(AD9173,14) {2 4 2 2 1 11 16}
set params(AD9173,15) {2 8 2 1 1 11 16}
set params(AD9173,16) {2 8 4 2 1 11 16}
set params(AD9173,device_code) 6
set device_code $params($device,device_code)
# Internal procedures
proc get_config_param {param} {
upvar device device
upvar mode mode
upvar params params
set jesd_params {M L S F HD N NP}
set index [lsearch $jesd_params $param]
return [lindex $params($device,$mode) $index]
}