ad9081:zcu102: Expose parameters to environment

Allow setting project parameters from the environment.
main
Laszlo Nagy 2021-01-18 07:48:47 +00:00 committed by Laszlo Nagy
parent d82f61b9af
commit da9828a63e
1 changed files with 19 additions and 10 deletions

View File

@ -3,6 +3,15 @@ source ../../scripts/adi_env.tcl
source $ad_hdl_dir/projects/scripts/adi_project_xilinx.tcl
source $ad_hdl_dir/projects/scripts/adi_board.tcl
# get_env_param retrieves parameter value from the environment if exists,
# other case use the default value
#
# Use over-writable parameters from the environment.
#
# e.g.
# make RX_JESD_L=4 RX_JESD_M=8 RX_JESD_S=1 TX_JESD_L=4 TX_JESD_M=8 TX_JESD_S=1
# make RX_JESD_L=8 RX_JESD_M=4 RX_JESD_S=1 TX_JESD_L=8 TX_JESD_M=4 TX_JESD_S=1
#
# Parameter description:
# JESD_MODE : Used link layer encoder mode
@ -28,16 +37,16 @@ source $ad_hdl_dir/projects/scripts/adi_board.tcl
adi_project ad9081_fmca_ebz_zcu102 0 [list \
JESD_MODE 8B10B \
RX_JESD_M 8 \
RX_JESD_L 4 \
RX_JESD_S 1 \
RX_JESD_NP 16 \
RX_NUM_LINKS 1 \
TX_JESD_M 8 \
TX_JESD_L 4 \
TX_JESD_S 1 \
TX_JESD_NP 16 \
TX_NUM_LINKS 1 \
RX_JESD_M [get_env_param RX_JESD_M 8 ] \
RX_JESD_L [get_env_param RX_JESD_L 4 ] \
RX_JESD_S [get_env_param RX_JESD_S 1 ] \
RX_JESD_NP [get_env_param RX_JESD_NP 16] \
RX_NUM_LINKS [get_env_param RX_NUM_LINKS 1 ] \
TX_JESD_M [get_env_param TX_JESD_M 8 ] \
TX_JESD_L [get_env_param TX_JESD_L 4 ] \
TX_JESD_S [get_env_param TX_JESD_S 1 ] \
TX_JESD_NP [get_env_param TX_JESD_NP 16] \
TX_NUM_LINKS [get_env_param TX_NUM_LINKS 1 ] \
]
adi_project_files ad9081_fmca_ebz_zcu102 [list \