Skip to content

ad7616: Add build parameter to select the number of SDI lines. #1699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/projects/ad7616_sdz/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ In case of the **SERIAL** interface:
- SL5 - unmounted - Parallel interface
- SL5 - mounted - Serial interface

The NUM_OF_SDI configuration parameter defines the number of SDI lines used:
**{1, 2}**. By default is set to 2.

Jumper setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
9 changes: 6 additions & 3 deletions projects/ad7616_sdz/common/ad7616_bd.tcl
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
###############################################################################
## Copyright (C) 2019-2024 Analog Devices, Inc. All rights reserved.
## Copyright (C) 2019-2025 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################
##--------------------------------------------------------------

# system level parameter

set INTF $ad_project_params(INTF)
set NUM_OF_SDI $ad_project_params(NUM_OF_SDI)

puts "build parameters: INTF: $INTF"
puts "build parameters: NUM_OF_SDI: $NUM_OF_SDI"

# control lines

Expand Down Expand Up @@ -51,13 +54,13 @@ if {$INTF == 1} {
set data_width 16
set async_spi_clk 1
set num_cs 1
set num_sdi 2
set num_sdi $NUM_OF_SDI
set sdi_delay 1
set hier_spi_engine spi_ad7616

spi_engine_create $hier_spi_engine $data_width $async_spi_clk $num_cs $num_sdi $sdi_delay

ad_ip_parameter axi_ad7616_dma CONFIG.DMA_DATA_WIDTH_SRC 32
ad_ip_parameter axi_ad7616_dma CONFIG.DMA_DATA_WIDTH_SRC [expr $data_width * $num_sdi]
ad_ip_parameter axi_ad7616_dma CONFIG.DMA_TYPE_SRC 1
ad_ip_parameter axi_ad7616_dma CONFIG.SYNC_TRANSFER_START 0
ad_ip_parameter axi_ad7616_dma CONFIG.AXI_SLICE_SRC 0
Expand Down
5 changes: 3 additions & 2 deletions projects/ad7616_sdz/zed/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
####################################################################################
## Copyright (c) 2018 - 2024 Analog Devices, Inc.
## Copyright (c) 2018 - 2025 Analog Devices, Inc.
### SPDX short identifier: BSD-1-Clause
## Auto-generated, do not modify!
####################################################################################

PROJECT_NAME := ad7616_sdz_zed

M_DEPS += serial_if_constr.xdc
M_DEPS += serial_if_constr_spi_1.xdc
M_DEPS += serial_if_constr_spi_2.xdc
M_DEPS += parallel_if_constr.xdc
M_DEPS += ../common/ad7616_bd.tcl
M_DEPS += ../../scripts/adi_pd.tcl
Expand Down
9 changes: 7 additions & 2 deletions projects/ad7616_sdz/zed/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ed7616-SDZ/Zed HDL Project
# AD7616-SDZ/Zed HDL Project

## Building the project

Expand All @@ -15,6 +15,10 @@ The overwritable parameter from the environment:
- 0 - Parallel interface
- 1 - Serial interface

- NUM_OF_SDI - specifies the number of SDI lines used when serial interface is set
- 1 - One SDI line
- 2 - Two SDI lines

Depending on the required interface mode, some hardware modifications need to be done.
- SL5 - unmounted - Parallel interface
- SL5 - mounted - Serial interface
Expand All @@ -33,7 +37,8 @@ make INTF=0
#### Serial interface

```
make INTF=1
make INTF=1 NUM_OF_SDI=1
make INTF=1 NUM_OF_SDI=2
```

Corresponding No-OS project for both configurations: [ad7616-sdz](https://github.com/analogdevicesinc/no-OS/tree/main/projects/ad7616-sdz)
33 changes: 0 additions & 33 deletions projects/ad7616_sdz/zed/serial_if_constr.xdc

This file was deleted.

31 changes: 31 additions & 0 deletions projects/ad7616_sdz/zed/serial_if_constr_spi_1.xdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
###############################################################################
## Copyright (C) 2016-2025 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################

# ad7616

# data interface

set_property -dict {PACKAGE_PIN P22 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_sclk]; ## FMC_LPC_LA03_N
set_property -dict {PACKAGE_PIN L21 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_sdo]; ## FMC_LPC_LA06_P
set_property -dict {PACKAGE_PIN M19 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_sdi[0]]; ## FMC_LPC_LA00_CC_P
set_property -dict {PACKAGE_PIN M22 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_cs]; ## FMC_LPC_LA04_N

# control lines

set_property -dict {PACKAGE_PIN A18 IOSTANDARD LVCMOS25} [get_ports adc_cnvst]; ## FMC_LPC_LA24_P
set_property -dict {PACKAGE_PIN E20 IOSTANDARD LVCMOS25} [get_ports adc_chsel[0]]; ## FMC_LPC_LA21_N
set_property -dict {PACKAGE_PIN E18 IOSTANDARD LVCMOS25} [get_ports adc_chsel[1]]; ## FMC_LPC_LA26_N
set_property -dict {PACKAGE_PIN D22 IOSTANDARD LVCMOS25} [get_ports adc_chsel[2]]; ## FMC_LPC_LA25_P
set_property -dict {PACKAGE_PIN E19 IOSTANDARD LVCMOS25} [get_ports adc_hw_rngsel[0]]; ## FMC_LPC_LA21_P
set_property -dict {PACKAGE_PIN F18 IOSTANDARD LVCMOS25} [get_ports adc_hw_rngsel[1]]; ## FMC_LPC_LA26_P
set_property -dict {PACKAGE_PIN T19 IOSTANDARD LVCMOS25} [get_ports adc_busy]; ## FMC_LPC_LA10_N
set_property -dict {PACKAGE_PIN E21 IOSTANDARD LVCMOS25} [get_ports adc_seq_en]; ## FMC_LPC_LA27_P
set_property -dict {PACKAGE_PIN F19 IOSTANDARD LVCMOS25} [get_ports adc_reset_n]; ## FMC_LPC_LA22_N

set_property -dict {PACKAGE_PIN L19 IOSTANDARD LVCMOS25} [get_ports adc_os[0]]; ## FMC_LPC_CLK0_M2C_N
set_property -dict {PACKAGE_PIN L18 IOSTANDARD LVCMOS25} [get_ports adc_os[1]]; ## FMC_LPC_CLK0_M2C_P
set_property -dict {PACKAGE_PIN N19 IOSTANDARD LVCMOS25} [get_ports adc_os[2]]; ## FMC_LPC_LA01_CC_P
set_property -dict {PACKAGE_PIN R21 IOSTANDARD LVCMOS25} [get_ports adc_burst]; ## FMC_LPC_LA09_N
set_property -dict {PACKAGE_PIN P18 IOSTANDARD LVCMOS25} [get_ports adc_crcen]; ## FMC_LPC_LA02_N
32 changes: 32 additions & 0 deletions projects/ad7616_sdz/zed/serial_if_constr_spi_2.xdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###############################################################################
## Copyright (C) 2016-2025 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################

# ad7616

# data interface

set_property -dict {PACKAGE_PIN P22 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_sclk]; ## FMC_LPC_LA03_N
set_property -dict {PACKAGE_PIN L21 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_sdo]; ## FMC_LPC_LA06_P
set_property -dict {PACKAGE_PIN M19 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_sdi[0]]; ## FMC_LPC_LA00_CC_P
set_property -dict {PACKAGE_PIN N20 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_sdi[1]]; ## FMC_LPC_LA01_CC_N
set_property -dict {PACKAGE_PIN M22 IOSTANDARD LVCMOS25} [get_ports ad7616_spi_cs]; ## FMC_LPC_LA04_N

# control lines

set_property -dict {PACKAGE_PIN A18 IOSTANDARD LVCMOS25} [get_ports adc_cnvst]; ## FMC_LPC_LA24_P
set_property -dict {PACKAGE_PIN E20 IOSTANDARD LVCMOS25} [get_ports adc_chsel[0]]; ## FMC_LPC_LA21_N
set_property -dict {PACKAGE_PIN E18 IOSTANDARD LVCMOS25} [get_ports adc_chsel[1]]; ## FMC_LPC_LA26_N
set_property -dict {PACKAGE_PIN D22 IOSTANDARD LVCMOS25} [get_ports adc_chsel[2]]; ## FMC_LPC_LA25_P
set_property -dict {PACKAGE_PIN E19 IOSTANDARD LVCMOS25} [get_ports adc_hw_rngsel[0]]; ## FMC_LPC_LA21_P
set_property -dict {PACKAGE_PIN F18 IOSTANDARD LVCMOS25} [get_ports adc_hw_rngsel[1]]; ## FMC_LPC_LA26_P
set_property -dict {PACKAGE_PIN T19 IOSTANDARD LVCMOS25} [get_ports adc_busy]; ## FMC_LPC_LA10_N
set_property -dict {PACKAGE_PIN E21 IOSTANDARD LVCMOS25} [get_ports adc_seq_en]; ## FMC_LPC_LA27_P
set_property -dict {PACKAGE_PIN F19 IOSTANDARD LVCMOS25} [get_ports adc_reset_n]; ## FMC_LPC_LA22_N

set_property -dict {PACKAGE_PIN L19 IOSTANDARD LVCMOS25} [get_ports adc_os[0]]; ## FMC_LPC_CLK0_M2C_N
set_property -dict {PACKAGE_PIN L18 IOSTANDARD LVCMOS25} [get_ports adc_os[1]]; ## FMC_LPC_CLK0_M2C_P
set_property -dict {PACKAGE_PIN N19 IOSTANDARD LVCMOS25} [get_ports adc_os[2]]; ## FMC_LPC_LA01_CC_P
set_property -dict {PACKAGE_PIN R21 IOSTANDARD LVCMOS25} [get_ports adc_burst]; ## FMC_LPC_LA09_N
set_property -dict {PACKAGE_PIN P18 IOSTANDARD LVCMOS25} [get_ports adc_crcen]; ## FMC_LPC_LA02_N
5 changes: 3 additions & 2 deletions projects/ad7616_sdz/zed/system_bd.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
## Copyright (C) 2019-2024 Analog Devices, Inc. All rights reserved.
## Copyright (C) 2019-2025 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################

Expand All @@ -19,6 +19,7 @@ ad_ip_parameter axi_sysid_0 CONFIG.ROM_ADDR_BITS 9
ad_ip_parameter rom_sys_0 CONFIG.PATH_TO_FILE "$mem_init_sys_file_path/mem_init_sys.txt"
ad_ip_parameter rom_sys_0 CONFIG.ROM_ADDR_BITS 9

set sys_cstring "INTF=$ad_project_params(INTF)"
set sys_cstring "INTF=$ad_project_params(INTF)\
NUM_OF_SDI=$ad_project_params(NUM_OF_SDI)"

sysid_gen_sys_init_file $sys_cstring
31 changes: 21 additions & 10 deletions projects/ad7616_sdz/zed/system_project.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
## Copyright (C) 2019-2024 Analog Devices, Inc. All rights reserved.
## Copyright (C) 2019-2025 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################

Expand All @@ -18,11 +18,12 @@ source $ad_hdl_dir/projects/scripts/adi_board.tcl
# e.g.
# make INTF=0
#
# INTF - Defines the interface type (serial OR parallel)
# - Default value is 0
#
# LEGEND: Serial - 1
# Parallel - 0
# INTF - Defines the interface type (serial OR parallel)
# - Default value is 0
# - Options: Serial - 1
# Parallel - 0
# NUM_OF_SDI - Number of SDI lines used
# - Options: 1, 2
#
# NOTE : This switch is a 'hardware' switch. Please rebuild the design if the
# variable has been changed.
Expand All @@ -32,9 +33,11 @@ source $ad_hdl_dir/projects/scripts/adi_board.tcl
##--------------------------------------------------------------

set INTF [get_env_param INTF 0]
set NUM_OF_SDI [get_env_param NUM_OF_SDI 2]

adi_project ad7616_sdz_zed 0 [list \
INTF $INTF \
NUM_OF_SDI $NUM_OF_SDI \
]

adi_project_files ad7616_sdz_zed [list \
Expand All @@ -43,10 +46,18 @@ adi_project_files ad7616_sdz_zed [list \

switch $INTF {
1 {
adi_project_files ad7616_sdz_zed [list \
"system_top_si.v" \
"serial_if_constr.xdc"
]
switch $NUM_OF_SDI {
1 {
adi_project_files ad7616_sdz_zed [list \
"system_top_si.v" \
"serial_if_constr_spi_1.xdc"]
}
2 {
adi_project_files ad7616_sdz_zed [list \
"system_top_si.v" \
"serial_if_constr_spi_2.xdc"]
}
}
}
0 {
adi_project_files ad7616_sdz_zed [list \
Expand Down
Loading
Loading