pluto_hdl_adi/projects/ad_fmclidar1_ebz/zc706/system_bd.tcl

45 lines
1.4 KiB
Tcl
Raw Normal View History

ad_fmclidar1_ebz: Initial commit This commit was created by squashing the following commits, these messages were kept just for sake of history: ad9694_500ebz: Mirror the SPI interface to FMCB ad9694_500ebz: Set transceiver reference clock to 250 ad9694_500ebz: Allow to configure number of lanes, number of converters and sample rate axi_ad9694: Fix number of lanes, it must be 2 ad9694_500ebz: Update the mirrored spi pin assignments ad9694_500ebz: Gate SPI MISO signals based on chip-select ad9694_500ebz: Set channel pack sample width ad9694_500ebz: Change reference clock location ad9694_500ebz: Remove transceiver memory map arbitration ad9694_500ebz: Ensure ADC FIFO DMA_DATA_WIDTH is not larger ADC_DATA_WIDTH ad9694_500ebz: Adjust breakout board pin locations ad_fmclidar1_ebz: Rename the ad9694_500ebz project ad_fmclidar1_ebz: Fix lane mapping ad_fmclidar1_ebz: Delete deprecated files ad_fmclidar1_ebz: Integrate the axi_laser_driver into the design ad_fmclidar1_ebz: OTW is an active low signal ad_fmclidar1_ebz: zc706: Fix iic_dac signals assignment ad_fmclidar1_ebz: Switch to util_adcfifo ad_fmclidar1_ebz: Enable synced capture for the fifo ad_fmclidar1_ebz/zc706: Enable CAPTURE_TILL_FULL ad_fmclidar1_ebz/zc706: Reduce FIFO size to 2kB ad_fmclidar1_ebz: Laser driver runs on ADC's core clock ad_fmclidar1_ebz_bd: Delete the FIFO instance Because the DMA transfers are going to be relatively small (< 2kbyte), the DMA can handle the data rate, even when the frequency of the laser driver pulse is set to its maximum value. (200 kHz) The synchronization will be done by connecting the generated pulse to the DMA's SYNC input. Although, to support 2 or 1 channel scenarios, we need to use the util_axis_syncgen module to make sure that the DMA catches the pulse, in cases when the pulse width is too narrow. (SYNC is captures when valid and ready is asserted) Also we have to reset the cpack IP before each pulse, to keep the DMA buffer's relative starting point in time fixed, when only 2 or 1 channel is active.
2017-11-10 13:22:16 +00:00
# Configurable parameters
set SAMPLE_RATE_MHZ 1000.0
set NUM_OF_CHANNELS 4 ; # M
set SAMPLES_PER_FRAME 1 ; # S
set NUM_OF_LANES 4 ; # L
set ADC_RESOLUTION 8 ; # N & NP
# Auto-computed parameters
set CHANNEL_DATA_WIDTH [expr 32 * $NUM_OF_LANES / $NUM_OF_CHANNELS]
set ADC_DATA_WIDTH [expr $CHANNEL_DATA_WIDTH * $NUM_OF_CHANNELS]
# we have to calculate with an additional dummy channel for TIA
set DMA_DATA_WIDTH [expr $ADC_DATA_WIDTH > 127 ? 256 : \
$ADC_DATA_WIDTH > 63 ? 128 : 64]
ad_fmclidar1_ebz: Initial commit This commit was created by squashing the following commits, these messages were kept just for sake of history: ad9694_500ebz: Mirror the SPI interface to FMCB ad9694_500ebz: Set transceiver reference clock to 250 ad9694_500ebz: Allow to configure number of lanes, number of converters and sample rate axi_ad9694: Fix number of lanes, it must be 2 ad9694_500ebz: Update the mirrored spi pin assignments ad9694_500ebz: Gate SPI MISO signals based on chip-select ad9694_500ebz: Set channel pack sample width ad9694_500ebz: Change reference clock location ad9694_500ebz: Remove transceiver memory map arbitration ad9694_500ebz: Ensure ADC FIFO DMA_DATA_WIDTH is not larger ADC_DATA_WIDTH ad9694_500ebz: Adjust breakout board pin locations ad_fmclidar1_ebz: Rename the ad9694_500ebz project ad_fmclidar1_ebz: Fix lane mapping ad_fmclidar1_ebz: Delete deprecated files ad_fmclidar1_ebz: Integrate the axi_laser_driver into the design ad_fmclidar1_ebz: OTW is an active low signal ad_fmclidar1_ebz: zc706: Fix iic_dac signals assignment ad_fmclidar1_ebz: Switch to util_adcfifo ad_fmclidar1_ebz: Enable synced capture for the fifo ad_fmclidar1_ebz/zc706: Enable CAPTURE_TILL_FULL ad_fmclidar1_ebz/zc706: Reduce FIFO size to 2kB ad_fmclidar1_ebz: Laser driver runs on ADC's core clock ad_fmclidar1_ebz_bd: Delete the FIFO instance Because the DMA transfers are going to be relatively small (< 2kbyte), the DMA can handle the data rate, even when the frequency of the laser driver pulse is set to its maximum value. (200 kHz) The synchronization will be done by connecting the generated pulse to the DMA's SYNC input. Although, to support 2 or 1 channel scenarios, we need to use the util_axis_syncgen module to make sure that the DMA catches the pulse, in cases when the pulse width is too narrow. (SYNC is captures when valid and ready is asserted) Also we have to reset the cpack IP before each pulse, to keep the DMA buffer's relative starting point in time fixed, when only 2 or 1 channel is active.
2017-11-10 13:22:16 +00:00
set SAMPLE_WIDTH [expr $ADC_RESOLUTION > 8 ? 16 : 8]
# add RTL sources which will be instantiated in system_bd directly
adi_project_files ad_fmclidar1_ebz_zc706 [list \
"$ad_hdl_dir/library/util_cdc/sync_bits.v" \
"../common/util_tia_chsel.v" \
"../common/util_axis_syncgen.v" ]
ad_fmclidar1_ebz: Initial commit This commit was created by squashing the following commits, these messages were kept just for sake of history: ad9694_500ebz: Mirror the SPI interface to FMCB ad9694_500ebz: Set transceiver reference clock to 250 ad9694_500ebz: Allow to configure number of lanes, number of converters and sample rate axi_ad9694: Fix number of lanes, it must be 2 ad9694_500ebz: Update the mirrored spi pin assignments ad9694_500ebz: Gate SPI MISO signals based on chip-select ad9694_500ebz: Set channel pack sample width ad9694_500ebz: Change reference clock location ad9694_500ebz: Remove transceiver memory map arbitration ad9694_500ebz: Ensure ADC FIFO DMA_DATA_WIDTH is not larger ADC_DATA_WIDTH ad9694_500ebz: Adjust breakout board pin locations ad_fmclidar1_ebz: Rename the ad9694_500ebz project ad_fmclidar1_ebz: Fix lane mapping ad_fmclidar1_ebz: Delete deprecated files ad_fmclidar1_ebz: Integrate the axi_laser_driver into the design ad_fmclidar1_ebz: OTW is an active low signal ad_fmclidar1_ebz: zc706: Fix iic_dac signals assignment ad_fmclidar1_ebz: Switch to util_adcfifo ad_fmclidar1_ebz: Enable synced capture for the fifo ad_fmclidar1_ebz/zc706: Enable CAPTURE_TILL_FULL ad_fmclidar1_ebz/zc706: Reduce FIFO size to 2kB ad_fmclidar1_ebz: Laser driver runs on ADC's core clock ad_fmclidar1_ebz_bd: Delete the FIFO instance Because the DMA transfers are going to be relatively small (< 2kbyte), the DMA can handle the data rate, even when the frequency of the laser driver pulse is set to its maximum value. (200 kHz) The synchronization will be done by connecting the generated pulse to the DMA's SYNC input. Although, to support 2 or 1 channel scenarios, we need to use the util_axis_syncgen module to make sure that the DMA catches the pulse, in cases when the pulse width is too narrow. (SYNC is captures when valid and ready is asserted) Also we have to reset the cpack IP before each pulse, to keep the DMA buffer's relative starting point in time fixed, when only 2 or 1 channel is active.
2017-11-10 13:22:16 +00:00
# source all the block designs
source $ad_hdl_dir/projects/common/zc706/zc706_system_bd.tcl
source ../common/ad_fmclidar1_ebz_bd.tcl
# I2C for AFE board's DAC
create_bd_intf_port -mode Master -vlnv xilinx.com:interface:iic_rtl:1.0 iic_dac
ad_ip_parameter sys_ps7 CONFIG.PCW_QSPI_GRP_IO1_ENABLE 1
ad_ip_parameter sys_ps7 CONFIG.PCW_I2C1_PERIPHERAL_ENABLE 1
ad_connect iic_dac sys_ps7/IIC_1
# System ID instance and configuration
ad_ip_parameter axi_sysid_0 CONFIG.ROM_ADDR_BITS 9
ad_ip_parameter rom_sys_0 CONFIG.PATH_TO_FILE "[pwd]/mem_init_sys.txt"
ad_ip_parameter rom_sys_0 CONFIG.ROM_ADDR_BITS 9
2020-09-28 21:10:35 +00:00
sysid_gen_sys_init_file