Skip to content
Draft
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
60 changes: 60 additions & 0 deletions testbenches/project/adrv9371x/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
####################################################################################
####################################################################################
## Copyright (C) 2018-2025 Analog Devices, Inc.
####################################################################################
####################################################################################

# Makeincludes
include ../../../scripts/make_tb_path.mk
include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk
include $(TB_LIBRARY_PATH)/includes/Makeinclude_data_offload.mk
include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk
include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk
include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr.mk

# Remaining test-bench dependencies except test programs
SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv
SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_common_pkg.sv
SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_adc_pkg.sv

LIB_DEPS += axi_dmac
LIB_DEPS += data_offload
LIB_DEPS += jesd204/ad_ip_jesd204_tpl_dac
LIB_DEPS += jesd204/axi_jesd204_tx
LIB_DEPS += jesd204/jesd204_tx
LIB_DEPS += jesd204/ad_ip_jesd204_tpl_adc
LIB_DEPS += jesd204/axi_jesd204_rx
LIB_DEPS += jesd204/jesd204_rx
LIB_DEPS += util_do_ram
LIB_DEPS += util_hbm
LIB_DEPS += util_pack/util_cpack2
LIB_DEPS += util_pack/util_upack2
LIB_DEPS += xilinx/axi_adxcvr
LIB_DEPS += xilinx/util_adxcvr


# default test program
TP := test_program

# config files should have the following format
# cfg_<param1>_<param2>.tcl
CFG_FILES := $(notdir $(wildcard cfgs/cfg*.tcl))
#$(warning $(CFG_FILES))

# List of tests and configuration combinations that has to be run
# Format is: <configuration>:<test name>
TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP))
#TESTS += cfg1:test_program

include $(ADI_TB_DIR)/scripts/project-sim.mk

# usage :
#
# run specific test on a specific configuration in gui mode
# make CFG=cfg2_fsync TST=test_frame_delay MODE=gui
#
# run all test from a configuration
# make cfg1_mm2mm_default

####################################################################################
####################################################################################
27 changes: 27 additions & 0 deletions testbenches/project/adrv9371x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Usage :

Run all tests in batch mode:

make


Run all tests in GUI mode:

make MODE=gui


Run specific test on a specific configuration in gui mode:

make CFG=<name of cfg> TST=<name of test> MODE=gui


Run all test from a configuration:

make <name of cfg>


Where:

* <name of cfg> is a file from the cfgs directory without the tcl extension of format cfg\*
* <name of test> is a file from the tests directory without the tcl extension

31 changes: 31 additions & 0 deletions testbenches/project/adrv9371x/cfgs/cfg1.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
global ad_project_params

set ad_project_params(LINK_MODE) 1

set ad_project_params(REF_CLK_RATE) 250
set ad_project_params(LANE_RATE) 10

set ad_project_params(DAC_OFFLOAD_TYPE) 0
set ad_project_params(DAC_OFFLOAD_SIZE) [expr 2*1024*1024]
set ad_project_params(PLDDR_OFFLOAD_DATA_WIDTH) 0

set ad_project_params(TX_JESD_M) 4
set ad_project_params(TX_JESD_L) 4
set ad_project_params(TX_JESD_S) 1
set ad_project_params(TX_JESD_NP) 16
set ad_project_params(TX_JESD_F) 2
set ad_project_params(TX_JESD_K) 32

set ad_project_params(RX_JESD_M) 4
set ad_project_params(RX_JESD_L) 2
set ad_project_params(RX_JESD_S) 1
set ad_project_params(RX_JESD_NP) 16
set ad_project_params(RX_JESD_F) 4
set ad_project_params(RX_JESD_K) 32

set ad_project_params(RX_OS_JESD_M) 2
set ad_project_params(RX_OS_JESD_L) 2
set ad_project_params(RX_OS_JESD_S) 1
set ad_project_params(RX_OS_JESD_NP) 16
set ad_project_params(RX_OS_JESD_F) 2
set ad_project_params(RX_OS_JESD_K) 32
Loading