2023-07-06 12:08:22 +00:00
|
|
|
###############################################################################
|
|
|
|
## Copyright (C) 2019-2023 Analog Devices, Inc. All rights reserved.
|
|
|
|
### SPDX short identifier: ADIBSD
|
|
|
|
###############################################################################
|
|
|
|
|
2022-07-12 11:06:15 +00:00
|
|
|
source ../../../scripts/adi_env.tcl
|
2018-08-14 08:43:32 +00:00
|
|
|
source $ad_hdl_dir/projects/scripts/adi_project_xilinx.tcl
|
2019-03-21 06:24:45 +00:00
|
|
|
source $ad_hdl_dir/projects/scripts/adi_board.tcl
|
|
|
|
|
|
|
|
##--------------------------------------------------------------
|
|
|
|
# IMPORTANT: Set AD7616 operation and interface mode
|
|
|
|
#
|
2021-10-29 15:26:52 +00:00
|
|
|
# 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.
|
2022-03-16 11:27:38 +00:00
|
|
|
# make SER_PAR_N=0
|
2021-10-29 15:26:52 +00:00
|
|
|
#
|
2022-03-16 11:27:38 +00:00
|
|
|
# SER_PAR_N - Defines the interface type (serial OR parallel)
|
|
|
|
# - Default value is 1
|
2019-03-21 06:24:45 +00:00
|
|
|
#
|
2022-03-16 11:27:38 +00:00
|
|
|
# LEGEND: Serial - 1
|
|
|
|
# Parallel - 0
|
2019-03-21 06:24:45 +00:00
|
|
|
#
|
2022-03-16 11:27:38 +00:00
|
|
|
# NOTE : This switch is a 'hardware' switch. Please rebuild the design if the
|
|
|
|
# variable has been changed.
|
|
|
|
# SL5 - mounted - Serial
|
|
|
|
# SL5 - unmounted - Parallel
|
2019-03-21 06:24:45 +00:00
|
|
|
#
|
|
|
|
##--------------------------------------------------------------
|
|
|
|
|
2022-03-16 11:27:38 +00:00
|
|
|
if {[info exists ::env(SER_PAR_N)]} {
|
|
|
|
set S_SER_PAR_N [get_env_param SER_PAR_N 0]
|
|
|
|
} elseif {![info exists SER_PAR_N]} {
|
|
|
|
set S_SER_PAR_N 1
|
2019-03-21 06:24:45 +00:00
|
|
|
}
|
|
|
|
|
2021-10-29 15:26:52 +00:00
|
|
|
adi_project ad7616_sdz_zed 0 [list \
|
2022-03-16 11:27:38 +00:00
|
|
|
SER_PAR_N $S_SER_PAR_N \
|
2021-10-29 15:26:52 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
adi_project_files ad7616_sdz_zed [list \
|
|
|
|
"$ad_hdl_dir/library/common/ad_iobuf.v" \
|
|
|
|
"$ad_hdl_dir/projects/common/zed/zed_system_constr.xdc"]
|
|
|
|
|
2022-03-16 11:27:38 +00:00
|
|
|
switch $S_SER_PAR_N {
|
|
|
|
1 {
|
2021-10-29 15:26:52 +00:00
|
|
|
adi_project_files ad7616_sdz_zed [list \
|
|
|
|
"system_top_si.v" \
|
|
|
|
"serial_if_constr.xdc"
|
|
|
|
]
|
|
|
|
}
|
2022-03-16 11:27:38 +00:00
|
|
|
0 {
|
2021-10-29 15:26:52 +00:00
|
|
|
adi_project_files ad7616_sdz_zed [list \
|
|
|
|
"system_top_pi.v" \
|
|
|
|
"parallel_if_constr.xdc"
|
|
|
|
]
|
|
|
|
}
|
2023-07-06 12:08:22 +00:00
|
|
|
}
|
2019-03-21 06:24:45 +00:00
|
|
|
|
2021-10-29 15:26:52 +00:00
|
|
|
adi_project_run ad7616_sdz_zed
|