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

Merged
merged 2 commits into from
May 14, 2025
Merged
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
45 changes: 17 additions & 28 deletions docs/projects/ad7616_sdz/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,20 @@ AD7616_SDZ parallel interface
Configuration modes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The INTF configuration parameter defines the interface type (Serial or
Parallel). By default it is set to Parallel (0). Depending on the required interface mode,
some hardware modifications need to be done on the board and/or make command:

In case of the **PARALLEL** interface:

.. shell:: bash

$make INTF=0

In case of the **SERIAL** interface:

.. shell:: bash

$make INTF=1

.. note::

This switch is a *hardware* switch. Please rebuild the design if the
variable has been changed.

- SL5 - unmounted - Parallel interface
- SL5 - mounted - Serial interface
The following are the parameters of this project that can be configured:
- INTF: specifies the type of interface used;
- 0 - parallel (default)
- 1 - serial
- NUM_OF_SDI: number of SDI lines used, **only in serial interface mode**;
- 1 - one SDI line
- 2 - two SDI lines (default)

Depending on the required interface mode, some hardware modifications need to
be done on the board:
- SL5 - unmounted - Parallel interface
- SL5 - mounted - Serial interface
This switch is a *hardware* switch. Please rebuild the design if the variable
has been changed.

Jumper setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -268,20 +259,18 @@ the HDL repository, and then build the project as follows:.
.. shell::

$cd hdl/projects/ad7616_sdz/zed
$make INTF=0

The default configuration is Parallel Mode (0).
$make INTF=1 NUM_OF_SDI=2

The result of the build, if parameters were used, will be in a folder named
by the configuration used:

if the following command was run

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

then the folder name will be:

``INTF0``
``INTF1_NUMOFSDI2``

A more comprehensive build guide can be found in the :ref:`build_hdl` user guide.

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
7 changes: 4 additions & 3 deletions projects/ad7616_sdz/zed/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
####################################################################################
## 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 += parallel_if_constr.xdc
M_DEPS += system_constr_serial_sdi1.xdc
M_DEPS += system_constr_serial_sdi2.xdc
M_DEPS += system_constr_parallel.xdc
M_DEPS += ../common/ad7616_bd.tcl
M_DEPS += ../../scripts/adi_pd.tcl
M_DEPS += ../../common/zed/zed_system_constr.xdc
Expand Down
15 changes: 11 additions & 4 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 @@ -12,8 +12,12 @@ make
The overwritable parameter from the environment:

- INTF - specifies the interface to be used;
- 0 - Parallel interface
- 1 - Serial interface
- 0 - parallel interface (default)
- 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 (default)

Depending on the required interface mode, some hardware modifications need to be done.
- SL5 - unmounted - Parallel interface
Expand All @@ -33,7 +37,10 @@ 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.

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: 31 additions & 0 deletions projects/ad7616_sdz/zed/system_constr_serial_sdi1.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/system_constr_serial_sdi2.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
33 changes: 22 additions & 11 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)
# - 0 - parallel (default)
# - 1 - serial
# NUM_OF_SDI - Number of SDI lines used when **serial interface** is set
# - 1 - one SDI line
# - 2 - two SDI lines (default)
#
# 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,15 +46,23 @@ 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" \
"system_constr_serial_sdi1.xdc"]
}
2 {
adi_project_files ad7616_sdz_zed [list \
"system_top_si.v" \
"system_constr_serial_sdi2.xdc"]
}
}
}
0 {
adi_project_files ad7616_sdz_zed [list \
"system_top_pi.v" \
"parallel_if_constr.xdc"
"system_constr_parallel.xdc"
]
}
}
Expand Down
Loading
Loading