2022-07-12 11:06:15 +00:00
|
|
|
source ../../../scripts/adi_env.tcl
|
2021-01-21 10:05:11 +00:00
|
|
|
source $ad_hdl_dir/projects/scripts/adi_project_xilinx.tcl
|
|
|
|
source $ad_hdl_dir/projects/scripts/adi_board.tcl
|
|
|
|
|
|
|
|
# The get_env_param procedure retrieves parameter value from the environment if exists,
|
|
|
|
# other case returns the default value specified in its second parameter field.
|
|
|
|
#
|
|
|
|
# How to use over-writable parameters from the environment:
|
|
|
|
#
|
|
|
|
# e.g.
|
|
|
|
# make NUM_OF_SDI=4 CAPTURE_ZONE=2
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Parameter description:
|
|
|
|
#
|
|
|
|
# CLK_MODE : Clocking mode of the device's digital interface
|
|
|
|
#
|
|
|
|
# 0 - SPI Mode
|
|
|
|
# 1 - Echo-clock or Master clock mode
|
|
|
|
#
|
|
|
|
# NUM_OF_SDI : the number of MOSI lines of the SPI interface
|
|
|
|
#
|
|
|
|
# 1 - Interleaved mode
|
|
|
|
# 2 - 1 lane per channel
|
|
|
|
# 4 - 2 lanes per channel
|
|
|
|
# 8 - 4 lanes per channel
|
|
|
|
#
|
|
|
|
# CAPTURE_ZONE : the capture zone of the next sample
|
|
|
|
# There are two capture zones for AD4624-30:
|
|
|
|
#
|
|
|
|
# 1 - from negative edge of the BUSY line until the next CNV positive edge -20ns
|
|
|
|
# 2 - from the next consecutive CNV positive edge +20ns until the second next
|
|
|
|
# consecutive CNV positive edge -20ns
|
|
|
|
#
|
|
|
|
# DDR_EN : in echo and master clock mode the SDI lines can have Single or Double
|
|
|
|
# Data Rates
|
|
|
|
#
|
|
|
|
# 0 - MISO runs on SDR
|
|
|
|
# 1 - MISO runs on DDR
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# make NUM_OF_SDI=2 CAPTURE_ZONE=2
|
|
|
|
#
|
|
|
|
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project ad4630_fmc_zed 0 [list \
|
2021-01-21 10:05:11 +00:00
|
|
|
CLK_MODE [get_env_param CLK_MODE 0] \
|
|
|
|
NUM_OF_SDI [get_env_param NUM_OF_SDI 4] \
|
|
|
|
CAPTURE_ZONE [get_env_param CAPTURE_ZONE 2] \
|
2022-09-23 10:45:35 +00:00
|
|
|
DDR_EN [get_env_param DDR_EN 0] ]
|
2021-01-21 10:05:11 +00:00
|
|
|
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project_files ad4630_fmc_zed [list \
|
2021-01-21 10:05:11 +00:00
|
|
|
"$ad_hdl_dir/library/common/ad_iobuf.v" \
|
|
|
|
"$ad_hdl_dir/library/xilinx/common/ad_data_clk.v" \
|
|
|
|
"$ad_hdl_dir/projects/common/zed/zed_system_constr.xdc" \
|
|
|
|
"system_constr.xdc" \
|
2022-09-23 10:45:35 +00:00
|
|
|
"system_top.v" ]
|
2021-01-21 10:05:11 +00:00
|
|
|
|
|
|
|
switch [get_env_param NUM_OF_SDI 4] {
|
|
|
|
1 {
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project_files ad4630_fmc_zed [list \
|
|
|
|
"system_constr_1sdi.xdc" ]
|
2021-01-21 10:05:11 +00:00
|
|
|
}
|
|
|
|
2 {
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project_files ad4630_fmc_zed [list \
|
|
|
|
"system_constr_2sdi.xdc" ]
|
2021-01-21 10:05:11 +00:00
|
|
|
}
|
|
|
|
4 {
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project_files ad4630_fmc_zed [list \
|
|
|
|
"system_constr_4sdi.xdc" ]
|
2021-01-21 10:05:11 +00:00
|
|
|
}
|
|
|
|
8 {
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project_files ad4630_fmc_zed [list \
|
|
|
|
"system_constr_8sdi.xdc" ]
|
2021-01-21 10:05:11 +00:00
|
|
|
}
|
|
|
|
default {
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project_files ad4630_fmc_zed [list \
|
|
|
|
"system_constr_2sdi.xdc" ]
|
2021-01-21 10:05:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-23 10:45:35 +00:00
|
|
|
adi_project_run ad4630_fmc_zed
|