parent
c2d37b2db3
commit
2a740d0c2b
|
@ -1,5 +1,8 @@
|
|||
|
||||
global ad7616_if
|
||||
# system level parameters
|
||||
set SI_OR_PI $ad_project_params(SI_OR_PI)
|
||||
|
||||
puts "build parameters: SI_OR_PI: $SI_OR_PI"
|
||||
|
||||
# data interfaces
|
||||
|
||||
|
@ -22,7 +25,7 @@ create_bd_port -dir I rx_busy
|
|||
# instantiation
|
||||
|
||||
ad_ip_instance axi_ad7616 axi_ad7616
|
||||
ad_ip_parameter axi_ad7616 CONFIG.IF_TYPE $ad7616_if
|
||||
ad_ip_parameter axi_ad7616 CONFIG.IF_TYPE $SI_OR_PI
|
||||
|
||||
ad_ip_instance axi_dmac axi_ad7616_dma
|
||||
ad_ip_parameter axi_ad7616_dma CONFIG.DMA_TYPE_SRC 2
|
||||
|
@ -33,7 +36,7 @@ ad_ip_parameter axi_ad7616_dma CONFIG.DMA_DATA_WIDTH_SRC 16
|
|||
ad_ip_parameter axi_ad7616_dma CONFIG.DMA_DATA_WIDTH_DEST 64
|
||||
|
||||
# interface connections
|
||||
if {$ad7616_if == 0} {
|
||||
if {$SI_OR_PI == 0} {
|
||||
|
||||
ad_connect rx_sclk axi_ad7616/rx_sclk
|
||||
ad_connect rx_sdo axi_ad7616/rx_sdo
|
||||
|
|
|
@ -6,7 +6,15 @@ source $ad_hdl_dir/projects/scripts/adi_board.tcl
|
|||
##--------------------------------------------------------------
|
||||
# IMPORTANT: Set AD7616 operation and interface mode
|
||||
#
|
||||
# ad7616_if - Defines the interface type (serial OR parallel)
|
||||
# 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 SI_OR_PI=0
|
||||
#
|
||||
# SI_OR_PI - Defines the interface type (serial OR parallel)
|
||||
#
|
||||
# LEGEND: Serial - 0
|
||||
# Parallel - 1
|
||||
|
@ -16,31 +24,33 @@ source $ad_hdl_dir/projects/scripts/adi_board.tcl
|
|||
#
|
||||
##--------------------------------------------------------------
|
||||
|
||||
set ad7616_if 0
|
||||
if {[info exists ::env(SI_OR_PI)]} {
|
||||
set S_SI_OR_PI [get_env_param SI_OR_PI 0]
|
||||
} elseif {![info exists SI_OR_PI]} {
|
||||
set S_SI_OR_PI 0
|
||||
}
|
||||
|
||||
adi_project ad7616_sdz_zc706
|
||||
adi_project ad7616_sdz_zc706 0 [list \
|
||||
SI_OR_PI $S_SI_OR_PI \
|
||||
]
|
||||
|
||||
if { $ad7616_if == 0 } {
|
||||
|
||||
adi_project_files ad7616_sdz_zc706 [list \
|
||||
"$ad_hdl_dir/library/common/ad_iobuf.v" \
|
||||
"system_top_si.v" \
|
||||
"serial_if_constr.xdc" \
|
||||
"$ad_hdl_dir/projects/common/zc706/zc706_system_constr.xdc"]
|
||||
|
||||
} elseif { $ad7616_if == 1 } {
|
||||
|
||||
adi_project_files ad7616_sdz_zc706 [list \
|
||||
"$ad_hdl_dir/library/common/ad_iobuf.v" \
|
||||
"system_top_pi.v" \
|
||||
"parallel_if_constr.xdc" \
|
||||
"$ad_hdl_dir/projects/common/zc706/zc706_system_constr.xdc"]
|
||||
|
||||
} else {
|
||||
|
||||
return -code error [format "ERROR: Invalid interface type! Define as \'serial\' or \'parallel\' ..."]
|
||||
adi_project_files ad7616_sdz_zc706 [list \
|
||||
"$ad_hdl_dir/library/common/ad_iobuf.v" \
|
||||
"$ad_hdl_dir/projects/common/zc706/zc706_system_constr.xdc"]
|
||||
|
||||
switch $S_SI_OR_PI {
|
||||
0 {
|
||||
adi_project_files ad7616_sdz_zc706 [list \
|
||||
"system_top_si.v" \
|
||||
"serial_if_constr.xdc"
|
||||
]
|
||||
}
|
||||
1 {
|
||||
adi_project_files ad7616_sdz_zc706 [list \
|
||||
"system_top_pi.v" \
|
||||
"parallel_if_constr.xdc"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
adi_project_run ad7616_sdz_zc706
|
||||
|
||||
|
|
|
@ -6,7 +6,15 @@ source $ad_hdl_dir/projects/scripts/adi_board.tcl
|
|||
##--------------------------------------------------------------
|
||||
# IMPORTANT: Set AD7616 operation and interface mode
|
||||
#
|
||||
# ad7616_if - Defines the interface type (serial OR parallel)
|
||||
# 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 SI_OR_PI=0
|
||||
#
|
||||
# SI_OR_PI - Defines the interface type (serial OR parallel)
|
||||
#
|
||||
# LEGEND: Serial - 0
|
||||
# Parallel - 1
|
||||
|
@ -16,31 +24,33 @@ source $ad_hdl_dir/projects/scripts/adi_board.tcl
|
|||
#
|
||||
##--------------------------------------------------------------
|
||||
|
||||
set ad7616_if 0
|
||||
|
||||
adi_project ad7616_sdz_zed
|
||||
|
||||
if { $ad7616_if == 0 } {
|
||||
|
||||
adi_project_files ad7616_sdz_zed [list \
|
||||
"$ad_hdl_dir/library/common/ad_iobuf.v" \
|
||||
"system_top_si.v" \
|
||||
"serial_if_constr.xdc" \
|
||||
"$ad_hdl_dir/projects/common/zed/zed_system_constr.xdc"]
|
||||
|
||||
} elseif { $ad7616_if == 1 } {
|
||||
|
||||
adi_project_files ad7616_sdz_zed [list \
|
||||
"$ad_hdl_dir/library/common/ad_iobuf.v" \
|
||||
"system_top_pi.v" \
|
||||
"parallel_if_constr.xdc" \
|
||||
"$ad_hdl_dir/projects/common/zed/zed_system_constr.xdc"]
|
||||
|
||||
} else {
|
||||
|
||||
return -code error [format "ERROR: Invalid interface type! Define as \'serial\' or \'parallel\' ..."]
|
||||
|
||||
if {[info exists ::env(SI_OR_PI)]} {
|
||||
set S_SI_OR_PI [get_env_param SI_OR_PI 0]
|
||||
} elseif {![info exists SI_OR_PI]} {
|
||||
set S_SI_OR_PI 0
|
||||
}
|
||||
|
||||
adi_project_run ad7616_sdz_zed
|
||||
adi_project ad7616_sdz_zed 0 [list \
|
||||
SI_OR_PI $S_SI_OR_PI \
|
||||
]
|
||||
|
||||
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"]
|
||||
|
||||
switch $S_SI_OR_PI {
|
||||
0 {
|
||||
adi_project_files ad7616_sdz_zed [list \
|
||||
"system_top_si.v" \
|
||||
"serial_if_constr.xdc"
|
||||
]
|
||||
}
|
||||
1 {
|
||||
adi_project_files ad7616_sdz_zed [list \
|
||||
"system_top_pi.v" \
|
||||
"parallel_if_constr.xdc"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
adi_project_run ad7616_sdz_zed
|
||||
|
|
Loading…
Reference in New Issue