From b8575ce22ad9e23e10e63e319a0a5c88cce7c7ac Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Tue, 19 Nov 2024 08:03:52 +0200 Subject: [PATCH] includes: Updated testbench files Signed-off-by: Istvan-Zsolt Szekely --- testbenches/ip/axi_tdd/Makefile | 24 +++-------- testbenches/ip/axi_tdd/system_bd.tcl | 2 - testbenches/ip/axi_tdd/system_project.tcl | 19 ++------- testbenches/ip/axis_sequencers/Makefile | 26 ++++-------- testbenches/ip/axis_sequencers/system_bd.tcl | 4 -- .../ip/axis_sequencers/system_project.tcl | 22 +++------- testbenches/ip/base/Makefile | 28 +++---------- testbenches/ip/base/environment.sv | 5 --- testbenches/ip/base/system_bd.tcl | 4 -- testbenches/ip/base/system_project.tcl | 24 ++--------- testbenches/ip/base/tests/test_program.sv | 1 - testbenches/ip/data_offload/Makefile | 23 ++++------- testbenches/ip/data_offload/system_bd.tcl | 4 +- .../ip/data_offload/system_project.tcl | 18 +++----- testbenches/ip/data_offload_2/Makefile | 21 ++++------ testbenches/ip/data_offload_2/system_bd.tcl | 4 +- .../ip/data_offload_2/system_project.tcl | 22 ++++------ testbenches/ip/dma_loopback/Makefile | 27 ++++-------- testbenches/ip/dma_loopback/system_bd.tcl | 4 +- .../ip/dma_loopback/system_project.tcl | 23 +++-------- testbenches/ip/dma_sg/Makefile | 27 ++++-------- testbenches/ip/dma_sg/system_bd.tcl | 2 +- testbenches/ip/dma_sg/system_project.tcl | 27 ++++-------- testbenches/ip/hbm/Makefile | 27 ++++-------- testbenches/ip/hbm/system_bd.tcl | 6 +-- testbenches/ip/hbm/system_project.tcl | 22 +++------- testbenches/ip/i3c_controller/Makefile | 27 ++++-------- testbenches/ip/i3c_controller/system_bd.tcl | 8 ++-- .../ip/i3c_controller/system_project.tcl | 16 +------- testbenches/ip/jesd_loopback/Makefile | 37 ++++++----------- testbenches/ip/jesd_loopback/system_bd.tcl | 5 +-- .../ip/jesd_loopback/system_project.tcl | 34 ++++----------- testbenches/ip/jesd_loopback_64b/Makefile | 37 ++++++----------- .../ip/jesd_loopback_64b/system_bd.tcl | 5 +-- .../ip/jesd_loopback_64b/system_project.tcl | 31 ++++---------- testbenches/ip/scoreboard/Makefile | 36 +++++----------- testbenches/ip/scoreboard/system_bd.tcl | 6 +-- testbenches/ip/scoreboard/system_project.tcl | 32 ++++----------- testbenches/ip/spi_engine/Makefile | 41 ++++++------------- testbenches/ip/spi_engine/system_bd.tcl | 12 +++--- testbenches/ip/spi_engine/system_project.tcl | 30 +++----------- testbenches/ip/util_pack/Makefile | 35 ++++------------ testbenches/ip/util_pack/system_bd.tcl | 8 +--- testbenches/ip/util_pack/system_project.tcl | 31 ++++---------- testbenches/project/ad463x/Makefile | 34 +++++---------- testbenches/project/ad463x/system_bd.tcl | 6 +-- testbenches/project/ad463x/system_project.tcl | 27 ++++-------- testbenches/project/ad57xx/Makefile | 35 +++++----------- testbenches/project/ad57xx/system_bd.tcl | 12 +++--- testbenches/project/ad57xx/system_project.tcl | 26 +++--------- testbenches/project/ad738x/Makefile | 30 ++++---------- testbenches/project/ad738x/system_bd.tcl | 4 -- testbenches/project/ad738x/system_project.tcl | 26 ++++-------- testbenches/project/ad7606x/Makefile | 38 +++++++---------- testbenches/project/ad7606x/system_bd.tcl | 8 ++-- .../project/ad7606x/system_project.tcl | 36 ++++++---------- testbenches/project/ad7616/Makefile | 37 ++++++----------- testbenches/project/ad7616/system_bd.tcl | 8 ++-- testbenches/project/ad7616/system_project.tcl | 30 ++++---------- testbenches/project/ad9083/Makefile | 28 ++++--------- testbenches/project/ad9083/system_bd.tcl | 4 +- testbenches/project/ad9083/system_project.tcl | 35 ++++------------ testbenches/project/ad_quadmxfe1_ebz/Makefile | 35 +++++----------- .../project/ad_quadmxfe1_ebz/system_bd.tcl | 2 - .../ad_quadmxfe1_ebz/system_project.tcl | 40 +++++------------- testbenches/project/adrv9001/Makefile | 34 +++++---------- testbenches/project/adrv9001/system_bd.tcl | 2 - .../project/adrv9001/system_project.tcl | 30 ++++---------- testbenches/project/adrv9009/Makefile | 37 ++++++----------- testbenches/project/adrv9009/system_bd.tcl | 5 +-- .../project/adrv9009/system_project.tcl | 35 ++++------------ testbenches/project/fmcomms2/Makefile | 31 ++++---------- testbenches/project/fmcomms2/system_bd.tcl | 2 - .../project/fmcomms2/system_project.tcl | 27 ++++-------- testbenches/project/mxfe/Makefile | 37 ++++++----------- testbenches/project/mxfe/system_bd.tcl | 2 - testbenches/project/mxfe/system_project.tcl | 37 +++++------------ testbenches/project/pluto/Makefile | 33 +++++---------- testbenches/project/pluto/system_bd.tcl | 2 - testbenches/project/pluto/system_project.tcl | 29 ++++--------- testbenches/project/pulsar_adc_pmdz/Makefile | 34 +++++---------- .../project/pulsar_adc_pmdz/system_bd.tcl | 8 ++-- .../pulsar_adc_pmdz/system_project.tcl | 29 ++++--------- 83 files changed, 493 insertions(+), 1269 deletions(-) diff --git a/testbenches/ip/axi_tdd/Makefile b/testbenches/ip/axi_tdd/Makefile index f0deed49..69a24be9 100644 --- a/testbenches/ip/axi_tdd/Makefile +++ b/testbenches/ip/axi_tdd/Makefile @@ -4,24 +4,12 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_tdd_gen_pkg.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +#include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_tdd +# Remaining test-bench dependencies except test programs LIB_DEPS += axi_tdd # default test program @@ -40,7 +28,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/axi_tdd/system_bd.tcl b/testbenches/ip/axi_tdd/system_bd.tcl index 5369f7df..88e6ba6b 100644 --- a/testbenches/ip/axi_tdd/system_bd.tcl +++ b/testbenches/ip/axi_tdd/system_bd.tcl @@ -33,8 +33,6 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - # Device clk ad_ip_instance clk_vip device_clk_vip [ list \ INTERFACE_MODE {MASTER} \ diff --git a/testbenches/ip/axi_tdd/system_project.tcl b/testbenches/ip/axi_tdd/system_project.tcl index 699d5c26..c5ccebea 100644 --- a/testbenches/ip/axi_tdd/system_project.tcl +++ b/testbenches/ip/axi_tdd/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,21 +16,12 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_tdd.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_tdd_gen_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/axis_sequencers/Makefile b/testbenches/ip/axis_sequencers/Makefile index 1c27cb06..6d82e53c 100644 --- a/testbenches/ip/axis_sequencers/Makefile +++ b/testbenches/ip/axis_sequencers/Makefile @@ -4,25 +4,13 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += ../../../library/regmaps/adi_peripheral_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/drivers/common/watchdog.sv -SV_DEPS += environment.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Remaining test-bench dependencies except test programs +SV_DEPS += environment.sv # default test program TP := test_program @@ -40,7 +28,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/axis_sequencers/system_bd.tcl b/testbenches/ip/axis_sequencers/system_bd.tcl index 61142ac1..b05934de 100644 --- a/testbenches/ip/axis_sequencers/system_bd.tcl +++ b/testbenches/ip/axis_sequencers/system_bd.tcl @@ -33,10 +33,6 @@ # *************************************************************************** # *************************************************************************** -global ad_hdl_dir - -source ../../../../scripts/adi_env.tcl - global ad_project_params ad_ip_instance axi4stream_vip src_axis [list \ diff --git a/testbenches/ip/axis_sequencers/system_project.tcl b/testbenches/ip/axis_sequencers/system_project.tcl index c5bf16a7..6ffb8d79 100644 --- a/testbenches/ip/axis_sequencers/system_project.tcl +++ b/testbenches/ip/axis_sequencers/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,23 +16,13 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_axis.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "../../../library/drivers/common/watchdog.sv" \ - "environment.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "environment.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/base/Makefile b/testbenches/ip/base/Makefile index 174b9836..5a696fde 100644 --- a/testbenches/ip/base/Makefile +++ b/testbenches/ip/base/Makefile @@ -4,28 +4,12 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += ../../../library/regmaps/adi_peripheral_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/drivers/common/mailbox.sv -SV_DEPS += ../../../library/drivers/common/x_monitor.sv -SV_DEPS += ../../../library/drivers/common/scoreboard.sv -SV_DEPS += ../../../library/drivers/common/watchdog.sv -SV_DEPS += environment.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Remaining test-bench dependencies except test programs +SV_DEPS += environment.sv # default test program TP := test_program @@ -40,7 +24,7 @@ CFG_FILES := $(notdir $(wildcard cfgs/cfg*.tcl)) TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(addprefix $(cfg):, $(TP))) #TESTS += cfg1:test_program -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/base/environment.sv b/testbenches/ip/base/environment.sv index 970789c5..6ce50c24 100644 --- a/testbenches/ip/base/environment.sv +++ b/testbenches/ip/base/environment.sv @@ -4,15 +4,10 @@ package environment_pkg; import m_axi_sequencer_pkg::*; import s_axi_sequencer_pkg::*; - import m_axis_sequencer_pkg::*; - import s_axis_sequencer_pkg::*; import logger_pkg::*; import axi_vip_pkg::*; - import axi4stream_vip_pkg::*; import test_harness_env_pkg::*; - import scoreboard_pkg::*; - import x_monitor_pkg::*; import `PKGIFY(test_harness, mng_axi_vip)::*; import `PKGIFY(test_harness, ddr_axi_vip)::*; diff --git a/testbenches/ip/base/system_bd.tcl b/testbenches/ip/base/system_bd.tcl index 972e8a2c..7e456b0a 100644 --- a/testbenches/ip/base/system_bd.tcl +++ b/testbenches/ip/base/system_bd.tcl @@ -33,8 +33,4 @@ # *************************************************************************** # *************************************************************************** -global ad_hdl_dir - -source ../../../../scripts/adi_env.tcl - global ad_project_params diff --git a/testbenches/ip/base/system_project.tcl b/testbenches/ip/base/system_project.tcl index 54e1f340..d86009f2 100644 --- a/testbenches/ip/base/system_project.tcl +++ b/testbenches/ip/base/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -20,24 +18,9 @@ adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "../../../library/drivers/common/mailbox.sv" \ - "../../../library/drivers/common/x_monitor.sv" \ - "../../../library/drivers/common/scoreboard.sv" \ - "../../../library/drivers/common/watchdog.sv" \ - "environment.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "environment.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" @@ -46,4 +29,3 @@ adi_sim_generate $project_name # Use this only for debugging specific seeds that failed previously #set_property -name {xsim.simulate.xsim.more_options} -value {-sv_seed 1695199824} -objects [get_filesets sim_1] - diff --git a/testbenches/ip/base/tests/test_program.sv b/testbenches/ip/base/tests/test_program.sv index 7f0da586..9d788057 100644 --- a/testbenches/ip/base/tests/test_program.sv +++ b/testbenches/ip/base/tests/test_program.sv @@ -36,7 +36,6 @@ `include "utils.svh" import axi_vip_pkg::*; -import axi4stream_vip_pkg::*; import logger_pkg::*; import environment_pkg::*; diff --git a/testbenches/ip/data_offload/Makefile b/testbenches/ip/data_offload/Makefile index ad917bf8..1b375552 100644 --- a/testbenches/ip/data_offload/Makefile +++ b/testbenches/ip/data_offload/Makefile @@ -4,23 +4,14 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis + +# Remaining test-bench dependencies except test programs SV_DEPS += do_scoreboard.sv SV_DEPS += environment.sv -SV_DEPS += system_tb.sv - -#ENV_DEPS += cfgs/common_cfg.tcl -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl LIB_DEPS := util_cdc LIB_DEPS += util_axis_fifo @@ -41,7 +32,7 @@ $(warning $(CFG_FILES)) # Format is: : TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk #################################################################################### #################################################################################### diff --git a/testbenches/ip/data_offload/system_bd.tcl b/testbenches/ip/data_offload/system_bd.tcl index 39e02e2d..b2cadb67 100644 --- a/testbenches/ip/data_offload/system_bd.tcl +++ b/testbenches/ip/data_offload/system_bd.tcl @@ -1,9 +1,7 @@ -global ad_hdl_dir +global ad_project_params source "$ad_hdl_dir/projects/common/xilinx/data_offload_bd.tcl" -global ad_project_params - ## DUT configuration set adc_data_path_width $ad_project_params(ADC_DATA_PATH_WIDTH) diff --git a/testbenches/ip/data_offload/system_project.tcl b/testbenches/ip/data_offload/system_project.tcl index 3203832a..ddb8f963 100644 --- a/testbenches/ip/data_offload/system_project.tcl +++ b/testbenches/ip/data_offload/system_project.tcl @@ -1,7 +1,5 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -30,19 +28,13 @@ set part "xczu9eg-ffvb1156-2-e" adi_sim_project_xilinx $project_name $part +source $ad_tb_dir/library/includes/sp_include_axis.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "do_scoreboard.sv" \ - "environment.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ + "do_scoreboard.sv" \ + "environment.sv" \ + "tests/test_program.sv" \ ] #set a default test program diff --git a/testbenches/ip/data_offload_2/Makefile b/testbenches/ip/data_offload_2/Makefile index c439d7ff..407382a2 100644 --- a/testbenches/ip/data_offload_2/Makefile +++ b/testbenches/ip/data_offload_2/Makefile @@ -4,24 +4,17 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis + +# Remaining test-bench dependencies except test programs SV_DEPS += do_scoreboard.sv SV_DEPS += environment.sv -SV_DEPS += system_tb.sv SV_DEPS += data_offload_pkg.sv ENV_DEPS += cfgs/common_cfg.tcl -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl LIB_DEPS := util_cdc LIB_DEPS += util_axis_fifo @@ -43,7 +36,7 @@ $(warning $(CFG_FILES)) TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) TESTS += cfg3:test_program_sync -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk #################################################################################### #################################################################################### diff --git a/testbenches/ip/data_offload_2/system_bd.tcl b/testbenches/ip/data_offload_2/system_bd.tcl index 888ed99a..63249fe8 100644 --- a/testbenches/ip/data_offload_2/system_bd.tcl +++ b/testbenches/ip/data_offload_2/system_bd.tcl @@ -1,9 +1,7 @@ -global ad_hdl_dir +global ad_project_params source "$ad_hdl_dir/projects/common/xilinx/data_offload_bd.tcl" -global ad_project_params - ## DUT configuration set data_path_width $ad_project_params(DATA_PATH_WIDTH) diff --git a/testbenches/ip/data_offload_2/system_project.tcl b/testbenches/ip/data_offload_2/system_project.tcl index e3b7cf61..73eb0e12 100644 --- a/testbenches/ip/data_offload_2/system_project.tcl +++ b/testbenches/ip/data_offload_2/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -29,21 +27,15 @@ set part "xczu9eg-ffvb1156-2-e" adi_sim_project_xilinx $project_name $part +source $ad_tb_dir/library/includes/sp_include_axis.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "environment.sv" \ - "tests/test_program.sv" \ - "tests/test_program_sync.sv" \ - "do_scoreboard.sv" \ - "system_tb.sv" \ - "data_offload_pkg.sv" \ + "environment.sv" \ + "tests/test_program.sv" \ + "tests/test_program_sync.sv" \ + "do_scoreboard.sv" \ + "data_offload_pkg.sv" \ ] #set a default test program diff --git a/testbenches/ip/dma_loopback/Makefile b/testbenches/ip/dma_loopback/Makefile index d09ff046..2035acf3 100644 --- a/testbenches/ip/dma_loopback/Makefile +++ b/testbenches/ip/dma_loopback/Makefile @@ -4,26 +4,13 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +# Remaining test-bench dependencies except test programs LIB_DEPS += axi_dmac # default test program @@ -42,7 +29,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/dma_loopback/system_bd.tcl b/testbenches/ip/dma_loopback/system_bd.tcl index acef5610..a2fa7b7c 100644 --- a/testbenches/ip/dma_loopback/system_bd.tcl +++ b/testbenches/ip/dma_loopback/system_bd.tcl @@ -33,7 +33,7 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl +global ad_project_params # Device clk ad_ip_instance clk_vip device_clk_vip [ list \ @@ -50,8 +50,6 @@ set device_clk device_clk_vip/clk_out # # ------------------ -global ad_project_params - ad_ip_instance axi_dmac dut_rx_dma $ad_project_params(rx_dma_cfg) ad_ip_instance axi_dmac dut_tx_dma $ad_project_params(tx_dma_cfg) diff --git a/testbenches/ip/dma_loopback/system_project.tcl b/testbenches/ip/dma_loopback/system_project.tcl index f3b25d4f..10aab243 100644 --- a/testbenches/ip/dma_loopback/system_project.tcl +++ b/testbenches/ip/dma_loopback/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,24 +16,13 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_axis.tcl +source $ad_tb_dir/library/includes/sp_include_dmac.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/dma_sg/Makefile b/testbenches/ip/dma_sg/Makefile index f5380fb1..a132b991 100644 --- a/testbenches/ip/dma_sg/Makefile +++ b/testbenches/ip/dma_sg/Makefile @@ -2,26 +2,13 @@ ## Copyright (C) 2024 Analog Devices, Inc. #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +# Remaining test-bench dependencies except test programs LIB_DEPS += axi_dmac # default test program @@ -39,7 +26,7 @@ TESTS += cfg1:test_program_1d TESTS += cfg2:test_program_2d TESTS += cfg1:test_program_tr_queue -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/dma_sg/system_bd.tcl b/testbenches/ip/dma_sg/system_bd.tcl index 20b03ee5..a7259071 100644 --- a/testbenches/ip/dma_sg/system_bd.tcl +++ b/testbenches/ip/dma_sg/system_bd.tcl @@ -33,7 +33,7 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl +global ad_project_params # Device clk ad_ip_instance clk_vip device_clk_vip [ list \ diff --git a/testbenches/ip/dma_sg/system_project.tcl b/testbenches/ip/dma_sg/system_project.tcl index f6fa4578..c785d35c 100644 --- a/testbenches/ip/dma_sg/system_project.tcl +++ b/testbenches/ip/dma_sg/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,26 +16,15 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_axis.tcl +source $ad_tb_dir/library/includes/sp_include_dmac.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program_1d.sv" \ - "tests/test_program_2d.sv" \ - "tests/test_program_tr_queue.sv" \ - "system_tb.sv" \ - ] + "tests/test_program_1d.sv" \ + "tests/test_program_2d.sv" \ + "tests/test_program_tr_queue.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program_1d" diff --git a/testbenches/ip/hbm/Makefile b/testbenches/ip/hbm/Makefile index 24ec9b44..c9925f88 100644 --- a/testbenches/ip/hbm/Makefile +++ b/testbenches/ip/hbm/Makefile @@ -4,26 +4,13 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +# Remaining test-bench dependencies except test programs LIB_DEPS += axi_dmac LIB_DEPS += util_hbm @@ -43,7 +30,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/hbm/system_bd.tcl b/testbenches/ip/hbm/system_bd.tcl index c757bf32..71be57d5 100644 --- a/testbenches/ip/hbm/system_bd.tcl +++ b/testbenches/ip/hbm/system_bd.tcl @@ -33,8 +33,9 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl -source ../../../../library/util_hbm/scripts/adi_util_hbm.tcl +global ad_project_params + +source $ad_hdl_dir/library/util_hbm/scripts/adi_util_hbm.tcl # hbm clk/reset ad_ip_instance clk_vip hbm_clk_vip [ list \ @@ -54,7 +55,6 @@ ad_connect hbm_clk_vip/clk_out hbm_rst_vip/sync_clk set hbm_reset hbm_rst_vip/rst_out ## DUT configuration -global ad_project_params set src_clock_freq $ad_project_params(SRC_CLOCK_FREQ) set dst_clock_freq $ad_project_params(DST_CLOCK_FREQ) diff --git a/testbenches/ip/hbm/system_project.tcl b/testbenches/ip/hbm/system_project.tcl index 885bc012..68d41d3a 100644 --- a/testbenches/ip/hbm/system_project.tcl +++ b/testbenches/ip/hbm/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,23 +16,13 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu37p-fsvh2892-2L-e" +source $ad_tb_dir/library/includes/sp_include_axis.tcl +source $ad_tb_dir/library/includes/sp_include_dmac.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/i3c_controller/Makefile b/testbenches/ip/i3c_controller/Makefile index 4dd57ac3..68018a64 100755 --- a/testbenches/ip/i3c_controller/Makefile +++ b/testbenches/ip/i3c_controller/Makefile @@ -4,24 +4,13 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += ../../../../library/util_cdc/sync_bits.v -ENV_DEPS += ../../../../library/common/ad_edge_detect.v - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common + +# Remaining test-bench dependencies except test programs +ENV_DEPS += $(HDL_LIBRARY_PATH)/util_cdc/sync_bits.v +ENV_DEPS += $(HDL_LIBRARY_PATH)/common/ad_edge_detect.v LIB_DEPS += axi_sysid LIB_DEPS += i3c_controller/i3c_controller_host_interface @@ -40,7 +29,7 @@ CFG_FILES := $(notdir $(wildcard cfgs/cfg*.tcl)) # Format is: : TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/i3c_controller/system_bd.tcl b/testbenches/ip/i3c_controller/system_bd.tcl index 1745f2f2..ddf7fae8 100755 --- a/testbenches/ip/i3c_controller/system_bd.tcl +++ b/testbenches/ip/i3c_controller/system_bd.tcl @@ -33,14 +33,12 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params adi_project_files [list \ - "../../../../library/common/ad_edge_detect.v" \ - "../../../../library/util_cdc/sync_bits.v" \ - "../../../../library/common/ad_iobuf.v" \ + "$ad_hdl_dir/library/common/ad_edge_detect.v" \ + "$ad_hdl_dir/library/util_cdc/sync_bits.v" \ + "$ad_hdl_dir/library/common/ad_iobuf.v" \ ] # diff --git a/testbenches/ip/i3c_controller/system_project.tcl b/testbenches/ip/i3c_controller/system_project.tcl index e63add74..4b2a7c39 100755 --- a/testbenches/ip/i3c_controller/system_project.tcl +++ b/testbenches/ip/i3c_controller/system_project.tcl @@ -34,8 +34,6 @@ # *************************************************************************** source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -55,18 +53,8 @@ adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/jesd_loopback/Makefile b/testbenches/ip/jesd_loopback/Makefile index 4ba28761..54769975 100644 --- a/testbenches/ip/jesd_loopback/Makefile +++ b/testbenches/ip/jesd_loopback/Makefile @@ -4,30 +4,17 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr + +# 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 += jesd204/ad_ip_jesd204_tpl_dac LIB_DEPS += jesd204/axi_jesd204_tx @@ -55,7 +42,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/jesd_loopback/system_bd.tcl b/testbenches/ip/jesd_loopback/system_bd.tcl index 82a5a258..7b71ed7a 100644 --- a/testbenches/ip/jesd_loopback/system_bd.tcl +++ b/testbenches/ip/jesd_loopback/system_bd.tcl @@ -33,11 +33,10 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/library/jesd204/scripts/jesd204.tcl - global ad_project_params +source $ad_hdl_dir/library/jesd204/scripts/jesd204.tcl + set LINK_MODE $ad_project_params(LINK_MODE) set JESD_8B10B 1 diff --git a/testbenches/ip/jesd_loopback/system_project.tcl b/testbenches/ip/jesd_loopback/system_project.tcl index 11b4afcf..f2019c6e 100644 --- a/testbenches/ip/jesd_loopback/system_project.tcl +++ b/testbenches/ip/jesd_loopback/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -21,31 +19,17 @@ adi_sim_project_xilinx $project_name "xczu9eg-ffvb1156-2-e"; # GTH4 #adi_sim_project_xilinx $project_name "xcku040-ffva1156-2-e"; # GTH3 #adi_sim_project_xilinx $project_name; # GTX2 +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_jesd.tcl +source $ad_tb_dir/library/includes/sp_include_xcvr.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_xcvr_pkg.sv" \ - "../../../library/drivers/jesd/adi_jesd204_pkg.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/drivers/xcvr/adi_xcvr_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/jesd_loopback_64b/Makefile b/testbenches/ip/jesd_loopback_64b/Makefile index 4ba28761..54769975 100644 --- a/testbenches/ip/jesd_loopback_64b/Makefile +++ b/testbenches/ip/jesd_loopback_64b/Makefile @@ -4,30 +4,17 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr + +# 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 += jesd204/ad_ip_jesd204_tpl_dac LIB_DEPS += jesd204/axi_jesd204_tx @@ -55,7 +42,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/jesd_loopback_64b/system_bd.tcl b/testbenches/ip/jesd_loopback_64b/system_bd.tcl index a5c7d700..33387a9a 100644 --- a/testbenches/ip/jesd_loopback_64b/system_bd.tcl +++ b/testbenches/ip/jesd_loopback_64b/system_bd.tcl @@ -33,11 +33,10 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/library/jesd204/scripts/jesd204.tcl - global ad_project_params +source $ad_hdl_dir/library/jesd204/scripts/jesd204.tcl + set JESD_F $ad_project_params(JESD_F) # For F=3,6,12 use dual clock if {$JESD_F % 3 == 0} { diff --git a/testbenches/ip/jesd_loopback_64b/system_project.tcl b/testbenches/ip/jesd_loopback_64b/system_project.tcl index fe9a8bf4..4dcd5155 100644 --- a/testbenches/ip/jesd_loopback_64b/system_project.tcl +++ b/testbenches/ip/jesd_loopback_64b/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,28 +16,17 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_jesd.tcl +source $ad_tb_dir/library/includes/sp_include_xcvr.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/scoreboard/Makefile b/testbenches/ip/scoreboard/Makefile index 492afe87..b39c1825 100644 --- a/testbenches/ip/scoreboard/Makefile +++ b/testbenches/ip/scoreboard/Makefile @@ -4,32 +4,16 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += ../../../library/regmaps/adi_peripheral_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/drivers/common/mailbox.sv -SV_DEPS += ../../../library/drivers/common/x_monitor.sv -SV_DEPS += ../../../library/drivers/common/scoreboard.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/drivers/data_offload/data_offload_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_data_offload_pkg.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include $(TB_LIBRARY_PATH)/includes/Makeinclude_scoreboard +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_data_offload + +# Remaining test-bench dependencies except test programs SV_DEPS += environment.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl LIB_DEPS := util_cdc LIB_DEPS += util_axis_fifo @@ -53,7 +37,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/scoreboard/system_bd.tcl b/testbenches/ip/scoreboard/system_bd.tcl index 276fea7a..3385de14 100644 --- a/testbenches/ip/scoreboard/system_bd.tcl +++ b/testbenches/ip/scoreboard/system_bd.tcl @@ -33,14 +33,10 @@ # *************************************************************************** # *************************************************************************** -global ad_hdl_dir - -source ../../../../scripts/adi_env.tcl +global ad_project_params source "$ad_hdl_dir/projects/common/xilinx/data_offload_bd.tcl" -global ad_project_params - ## DUT configuration set adc_data_path_width $ad_project_params(ADC_DATA_PATH_WIDTH) diff --git a/testbenches/ip/scoreboard/system_project.tcl b/testbenches/ip/scoreboard/system_project.tcl index 27649425..cedbae72 100644 --- a/testbenches/ip/scoreboard/system_project.tcl +++ b/testbenches/ip/scoreboard/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,30 +16,16 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_axis.tcl +source $ad_tb_dir/library/includes/sp_include_scoreboard.tcl +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_data_offload.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "../../../library/drivers/common/mailbox.sv" \ - "../../../library/drivers/common/x_monitor.sv" \ - "../../../library/drivers/common/scoreboard.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/drivers/data_offload/data_offload_api.sv" \ - "../../../library/regmaps/adi_regmap_data_offload_pkg.sv" \ - "environment.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "environment.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/ip/spi_engine/Makefile b/testbenches/ip/spi_engine/Makefile index fd685800..4df07862 100644 --- a/testbenches/ip/spi_engine/Makefile +++ b/testbenches/ip/spi_engine/Makefile @@ -4,33 +4,20 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/vip/adi/spi_vip/s_spi_sequencer.sv -SV_DEPS += ../../../library/vip/adi/spi_vip/adi_spi_vip_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_clkgen_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_spi_engine_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine + +# Remaining test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pwm_gen_pkg.sv SV_DEPS += spi_environment.sv -SV_DEPS += system_tb.sv -ENV_DEPS += ../../../../library/util_cdc/sync_bits.v -ENV_DEPS += ../../../../library/common/ad_edge_detect.v - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +ENV_DEPS += $(HDL_LIBRARY_PATH)/util_cdc/sync_bits.v +ENV_DEPS += $(HDL_LIBRARY_PATH)/common/ad_edge_detect.v LIB_DEPS += axi_clkgen LIB_DEPS += axi_pwm_gen @@ -42,8 +29,6 @@ LIB_DEPS += spi_engine/spi_engine_interconnect LIB_DEPS += spi_engine/spi_engine_offload LIB_DEPS += sysid_rom -SIM_LIB_DEPS +=spi_vip - # default test programs # Format is: TP := $(notdir $(basename $(wildcard tests/*.sv))) @@ -56,7 +41,7 @@ CFG_FILES := $(notdir $(wildcard cfgs/cfg*.tcl)) # Format is: : TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(addprefix $(cfg):, $(TP))) -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/spi_engine/system_bd.tcl b/testbenches/ip/spi_engine/system_bd.tcl index 6ac075db..a107b6fc 100644 --- a/testbenches/ip/spi_engine/system_bd.tcl +++ b/testbenches/ip/spi_engine/system_bd.tcl @@ -33,16 +33,14 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/library/spi_engine/scripts/spi_engine.tcl - - global ad_project_params +source $ad_hdl_dir/library/spi_engine/scripts/spi_engine.tcl + adi_project_files [list \ - "../../../../library/common/ad_edge_detect.v" \ - "../../../../library/util_cdc/sync_bits.v" \ - "../../../../library/common/ad_iobuf.v" \ + "$ad_hdl_dir/library/common/ad_edge_detect.v" \ + "$ad_hdl_dir/library/util_cdc/sync_bits.v" \ + "$ad_hdl_dir/library/common/ad_iobuf.v" \ ] # diff --git a/testbenches/ip/spi_engine/system_project.tcl b/testbenches/ip/spi_engine/system_project.tcl index fa8d6797..35c82527 100644 --- a/testbenches/ip/spi_engine/system_project.tcl +++ b/testbenches/ip/spi_engine/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -15,36 +13,20 @@ source "cfgs/${cfg_file}" # Set the project name set project_name [file rootname $cfg_file] -# Set to use SmartConnect or AXI Interconnect -set use_smartconnect 1 - # Create the project adi_sim_project_xilinx $project_name "xc7z007sclg400-1" +source $ad_tb_dir/library/includes/sp_include_axis.tcl +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_spi_engine.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/vip/adi/spi_vip/adi_spi_vip_pkg.sv" \ - "../../../library/vip/adi/spi_vip/s_spi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_clkgen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_spi_engine_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "../../../library/drivers/spi_engine/spi_engine_instr_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_clkgen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ "spi_environment.sv" \ "tests/test_program.sv" \ "tests/test_sleep_delay.sv" \ - "system_tb.sv" \ ] #set a default test program diff --git a/testbenches/ip/util_pack/Makefile b/testbenches/ip/util_pack/Makefile index 0e2bb8b9..9759f10d 100644 --- a/testbenches/ip/util_pack/Makefile +++ b/testbenches/ip/util_pack/Makefile @@ -4,32 +4,15 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += ../../../library/regmaps/adi_peripheral_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/drivers/common/mailbox.sv -SV_DEPS += ../../../library/drivers/common/x_monitor.sv -SV_DEPS += ../../../library/drivers/common/scoreboard.sv -SV_DEPS += ../../../library/drivers/common/scoreboard_pack.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/drivers/common/watchdog.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include $(TB_LIBRARY_PATH)/includes/Makeinclude_scoreboard +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac + +# Remaining test-bench dependencies except test programs SV_DEPS += environment.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl LIB_DEPS := util_cdc LIB_DEPS += util_axis_fifo @@ -50,7 +33,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg1:test_program #TESTS += cfg_rand:test_program -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/util_pack/system_bd.tcl b/testbenches/ip/util_pack/system_bd.tcl index 8ae48b2b..e1bd41d9 100644 --- a/testbenches/ip/util_pack/system_bd.tcl +++ b/testbenches/ip/util_pack/system_bd.tcl @@ -33,16 +33,12 @@ # *************************************************************************** # *************************************************************************** +global ad_project_params + proc log2 {x} { return [expr {log($x) / log(2)}] } -global ad_hdl_dir - -source ../../../../scripts/adi_env.tcl - -global ad_project_params - set CHANNELS $ad_project_params(CHANNELS) set SAMPLES $ad_project_params(SAMPLES) set WIDTH $ad_project_params(WIDTH) diff --git a/testbenches/ip/util_pack/system_project.tcl b/testbenches/ip/util_pack/system_project.tcl index 6289033c..c0848216 100644 --- a/testbenches/ip/util_pack/system_project.tcl +++ b/testbenches/ip/util_pack/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,30 +16,15 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_axis.tcl +source $ad_tb_dir/library/includes/sp_include_scoreboard.tcl +source $ad_tb_dir/library/includes/sp_include_dmac.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "../../../library/drivers/common/mailbox.sv" \ - "../../../library/drivers/common/x_monitor.sv" \ - "../../../library/drivers/common/scoreboard.sv" \ - "../../../library/drivers/common/scoreboard_pack.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/drivers/common/watchdog.sv" \ - "environment.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "environment.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/ad463x/Makefile b/testbenches/project/ad463x/Makefile index cff61960..25400f0b 100644 --- a/testbenches/project/ad463x/Makefile +++ b/testbenches/project/ad463x/Makefile @@ -4,30 +4,18 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_clkgen_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_spi_engine_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine -ENV_DEPS += ../../../../library/util_cdc/sync_bits.v -ENV_DEPS += ../../../../library/common/ad_edge_detect.v +# Remaining test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pwm_gen_pkg.sv -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +ENV_DEPS += $(HDL_LIBRARY_PATH)/util_cdc/sync_bits.v +ENV_DEPS += $(HDL_LIBRARY_PATH)/common/ad_edge_detect.v LIB_DEPS += ad463x_data_capture LIB_DEPS += axi_dmac @@ -61,7 +49,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/ad463x/system_bd.tcl b/testbenches/project/ad463x/system_bd.tcl index 686c65ce..68071e82 100644 --- a/testbenches/project/ad463x/system_bd.tcl +++ b/testbenches/project/ad463x/system_bd.tcl @@ -33,13 +33,11 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params adi_project_files [list \ - "../../../../library/common/ad_edge_detect.v" \ - "../../../../library/util_cdc/sync_bits.v" \ + "$ad_hdl_dir/library/common/ad_edge_detect.v" \ + "$ad_hdl_dir/library/util_cdc/sync_bits.v" \ ] # diff --git a/testbenches/project/ad463x/system_project.tcl b/testbenches/project/ad463x/system_project.tcl index 80af9127..fbc7a90d 100644 --- a/testbenches/project/ad463x/system_project.tcl +++ b/testbenches/project/ad463x/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,26 +16,15 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_spi_engine.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_clkgen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_spi_engine_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_clkgen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/ad57xx/Makefile b/testbenches/project/ad57xx/Makefile index a897535a..750b9813 100644 --- a/testbenches/project/ad57xx/Makefile +++ b/testbenches/project/ad57xx/Makefile @@ -4,30 +4,17 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/vip/adi/spi_vip/s_spi_sequencer.sv -SV_DEPS += ../../../library/vip/adi/spi_vip/adi_spi_vip_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_clkgen_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_spi_engine_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ad57xx_environment.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine + +# Remaining test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pwm_gen_pkg.sv -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +SV_DEPS += ad57xx_environment.sv LIB_DEPS += axi_clkgen LIB_DEPS += axi_pwm_gen @@ -54,7 +41,7 @@ CFG_FILES := $(notdir $(wildcard cfgs/cfg*.tcl)) # Format is: : TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(addprefix $(cfg):, $(TP))) -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/ad57xx/system_bd.tcl b/testbenches/project/ad57xx/system_bd.tcl index 6893bbc0..0fc21b31 100644 --- a/testbenches/project/ad57xx/system_bd.tcl +++ b/testbenches/project/ad57xx/system_bd.tcl @@ -33,16 +33,14 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/library/spi_engine/scripts/spi_engine.tcl - - global ad_project_params +source $ad_hdl_dir/library/spi_engine/scripts/spi_engine.tcl + adi_project_files [list \ - "../../../../library/common/ad_edge_detect.v" \ - "../../../../library/util_cdc/sync_bits.v" \ - "../../../../library/common/ad_iobuf.v" \ + "$ad_hdl_dir/library/common/ad_edge_detect.v" \ + "$ad_hdl_dir/library/util_cdc/sync_bits.v" \ + "$ad_hdl_dir/library/common/ad_iobuf.v" \ ] # diff --git a/testbenches/project/ad57xx/system_project.tcl b/testbenches/project/ad57xx/system_project.tcl index c7e49f33..87f3ce04 100644 --- a/testbenches/project/ad57xx/system_project.tcl +++ b/testbenches/project/ad57xx/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -21,29 +19,15 @@ set use_smartconnect 1 # Create the project adi_sim_project_xilinx $project_name "xc7z007sclg400-1" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_spi_engine.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/vip/adi/spi_vip/adi_spi_vip_pkg.sv" \ - "../../../library/vip/adi/spi_vip/s_spi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_clkgen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_spi_engine_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "../../../library/drivers/spi_engine/spi_engine_instr_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_clkgen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ "ad57xx_environment.sv" \ "tests/test_program.sv" \ - "system_tb.sv" \ ] #set a default test program diff --git a/testbenches/project/ad738x/Makefile b/testbenches/project/ad738x/Makefile index 68617991..2b415298 100644 --- a/testbenches/project/ad738x/Makefile +++ b/testbenches/project/ad738x/Makefile @@ -4,27 +4,15 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_clkgen_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_spi_engine_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Remaining test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pwm_gen_pkg.sv LIB_DEPS += axi_clkgen LIB_DEPS += axi_dmac @@ -51,7 +39,7 @@ CFG_FILES := $(notdir $(wildcard cfgs/cfg*.tcl)) # Format is: : TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(addprefix $(cfg):, $(TP))) -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/ad738x/system_bd.tcl b/testbenches/project/ad738x/system_bd.tcl index 911cabc9..bdab458f 100644 --- a/testbenches/project/ad738x/system_bd.tcl +++ b/testbenches/project/ad738x/system_bd.tcl @@ -33,10 +33,6 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - -# system level parameters - global ad_project_params # diff --git a/testbenches/project/ad738x/system_project.tcl b/testbenches/project/ad738x/system_project.tcl index 09917eb6..86f3f6eb 100644 --- a/testbenches/project/ad738x/system_project.tcl +++ b/testbenches/project/ad738x/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -33,25 +31,15 @@ if {[expr {![info exists use_smartconnect]}]} { # Create the project adi_sim_project_xilinx $project_name "xc7z007sclg400-1" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_spi_engine.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_clkgen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_spi_engine_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv"] + "$ad_tb_dir/library/regmaps/adi_regmap_clkgen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/ad7606x/Makefile b/testbenches/project/ad7606x/Makefile index 39f6f7e0..42d13998 100755 --- a/testbenches/project/ad7606x/Makefile +++ b/testbenches/project/ad7606x/Makefile @@ -4,30 +4,20 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_clkgen_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine -ENV_DEPS += ../../../../library/util_cdc/sync_bits.v -ENV_DEPS += ../../../../library/common/ad_edge_detect.v -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Remaining test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_adc_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_common_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pwm_gen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv + +ENV_DEPS += $(HDL_LIBRARY_PATH)/util_cdc/sync_bits.v +ENV_DEPS += $(HDL_LIBRARY_PATH)/common/ad_edge_detect.v LIB_DEPS += axi_ad7606x LIB_DEPS += axi_clkgen @@ -74,7 +64,7 @@ TP := test_program_si #TESTS += cfg_s_sdi4:test_program_si #TESTS += cfg_s_sdi8:test_program_si -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/ad7606x/system_bd.tcl b/testbenches/project/ad7606x/system_bd.tcl index 953d00d5..e41dc01f 100755 --- a/testbenches/project/ad7606x/system_bd.tcl +++ b/testbenches/project/ad7606x/system_bd.tcl @@ -33,18 +33,16 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl +global ad_project_params # system level parameters set INTF $ad_project_params(INTF) set ADC_N_BITS $ad_project_params(ADC_N_BITS) set NUM_OF_SDI $ad_project_params(NUM_OF_SDI) -global ad_project_params - adi_project_files [list \ - "../../../../library/common/ad_edge_detect.v" \ - "../../../../library/util_cdc/sync_bits.v"] + "$ad_hdl_dir/library/common/ad_edge_detect.v" \ + "$ad_hdl_dir/library/util_cdc/sync_bits.v"] # # Block design under test diff --git a/testbenches/project/ad7606x/system_project.tcl b/testbenches/project/ad7606x/system_project.tcl index b7844952..49fa4580 100755 --- a/testbenches/project/ad7606x/system_project.tcl +++ b/testbenches/project/ad7606x/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -29,29 +27,19 @@ adi_sim_add_define "TEST_PROGRAM=test_program_si" # Create the project adi_sim_project_xilinx $project_name "xc7z020clg484-1" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_spi_engine.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_clkgen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_spi_engine_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program_8ch.sv" \ - "tests/test_program_4ch.sv" \ - "tests/test_program_6ch.sv" \ - "tests/test_program_si.sv" \ - "system_tb.sv"] + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_clkgen_pkg.sv" \ + "tests/test_program_8ch.sv" \ + "tests/test_program_4ch.sv" \ + "tests/test_program_6ch.sv" \ + "tests/test_program_si.sv" \ +] adi_sim_generate $project_name diff --git a/testbenches/project/ad7616/Makefile b/testbenches/project/ad7616/Makefile index a27abba1..0d66044d 100755 --- a/testbenches/project/ad7616/Makefile +++ b/testbenches/project/ad7616/Makefile @@ -4,30 +4,19 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_axi_ad7616_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_clkgen_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_spi_engine_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine -ENV_DEPS += ../../../../library/util_cdc/sync_bits.v -ENV_DEPS += ../../../../library/common/ad_edge_detect.v -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Remaining test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_axi_ad7616_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pwm_gen_pkg.sv + +ENV_DEPS += $(HDL_LIBRARY_PATH)/util_cdc/sync_bits.v +ENV_DEPS += $(HDL_LIBRARY_PATH)/common/ad_edge_detect.v LIB_DEPS += axi_clkgen LIB_DEPS += axi_ad7616 @@ -55,7 +44,7 @@ TP := test_program_si TESTS += cfg_pi:test_program_pi TESTS += cfg_si:test_program_si -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/ad7616/system_bd.tcl b/testbenches/project/ad7616/system_bd.tcl index 4ea0f06e..5d5c5336 100755 --- a/testbenches/project/ad7616/system_bd.tcl +++ b/testbenches/project/ad7616/system_bd.tcl @@ -33,16 +33,14 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl +global ad_project_params # system level parameters set SER_PAR_N $ad_project_params(SER_PAR_N) -global ad_project_params - adi_project_files [list \ - "../../../../library/common/ad_edge_detect.v" \ - "../../../../library/util_cdc/sync_bits.v"] + "$ad_hdl_dir/library/common/ad_edge_detect.v" \ + "$ad_hdl_dir/library/util_cdc/sync_bits.v"] # # Block design under test diff --git a/testbenches/project/ad7616/system_project.tcl b/testbenches/project/ad7616/system_project.tcl index 9b0c9019..931ccbf7 100755 --- a/testbenches/project/ad7616/system_project.tcl +++ b/testbenches/project/ad7616/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -38,26 +36,16 @@ if {[expr {![info exists use_smartconnect]}]} { # Create the project adi_sim_project_xilinx $project_name "xc7z020clg484-1" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_spi_engine.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_axi_ad7616_pkg.sv" \ - "../../../library/regmaps/adi_regmap_clkgen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_spi_engine_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program_si.sv" \ - "tests/test_program_pi.sv" \ - "system_tb.sv"] + "$ad_tb_dir/library/regmaps/adi_regmap_axi_ad7616_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_clkgen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ + "tests/test_program_si.sv" \ + "tests/test_program_pi.sv" \ +] adi_sim_generate $project_name diff --git a/testbenches/project/ad9083/Makefile b/testbenches/project/ad9083/Makefile index d5d2dc95..2cc8cd38 100644 --- a/testbenches/project/ad9083/Makefile +++ b/testbenches/project/ad9083/Makefile @@ -4,25 +4,15 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Remaining test-bench dependencies except test programs +# Missing things LIB_DEPS += axi_dmac LIB_DEPS += jesd204/ad_ip_jesd204_tpl_dac @@ -58,7 +48,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/ad9083/system_bd.tcl b/testbenches/project/ad9083/system_bd.tcl index 8e8714d6..7b199bb6 100644 --- a/testbenches/project/ad9083/system_bd.tcl +++ b/testbenches/project/ad9083/system_bd.tcl @@ -33,12 +33,10 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl +global ad_project_params source $ad_hdl_dir/library/jesd204/scripts/jesd204.tcl -global ad_project_params - source $ad_hdl_dir/projects/common/xilinx/adcfifo_bd.tcl source $ad_hdl_dir/projects/common/xilinx/dacfifo_bd.tcl diff --git a/testbenches/project/ad9083/system_project.tcl b/testbenches/project/ad9083/system_project.tcl index 3277f85b..3282c4e0 100644 --- a/testbenches/project/ad9083/system_project.tcl +++ b/testbenches/project/ad9083/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,32 +16,17 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_jesd.tcl +source $ad_tb_dir/library/includes/sp_include_xcvr.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_xcvr_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/drivers/jesd/adi_jesd204_pkg.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/drivers/xcvr/adi_xcvr_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/ad_quadmxfe1_ebz/Makefile b/testbenches/project/ad_quadmxfe1_ebz/Makefile index 9561df88..66d07d7b 100644 --- a/testbenches/project/ad_quadmxfe1_ebz/Makefile +++ b/testbenches/project/ad_quadmxfe1_ebz/Makefile @@ -4,30 +4,17 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# 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 += jesd204/ad_ip_jesd204_tpl_dac @@ -72,7 +59,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg5_64b66b_Tx23_Rx25_LR_24_75:test_dma #TESTS += cfg6_64b66b_Tx29_Rx24_LR_24_75:test_dma -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/ad_quadmxfe1_ebz/system_bd.tcl b/testbenches/project/ad_quadmxfe1_ebz/system_bd.tcl index 4c0246bc..ea5538cb 100644 --- a/testbenches/project/ad_quadmxfe1_ebz/system_bd.tcl +++ b/testbenches/project/ad_quadmxfe1_ebz/system_bd.tcl @@ -33,8 +33,6 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params source $ad_hdl_dir/projects/common/xilinx/adcfifo_bd.tcl diff --git a/testbenches/project/ad_quadmxfe1_ebz/system_project.tcl b/testbenches/project/ad_quadmxfe1_ebz/system_project.tcl index 29cb81c8..4ee3931e 100644 --- a/testbenches/project/ad_quadmxfe1_ebz/system_project.tcl +++ b/testbenches/project/ad_quadmxfe1_ebz/system_project.tcl @@ -1,7 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl - if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -19,34 +16,19 @@ set project_name [file rootname $topology_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_jesd.tcl +source $ad_tb_dir/library/includes/sp_include_xcvr.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_xcvr_pkg.sv" \ - "../../../library/drivers/jesd/adi_jesd204_pkg.sv" \ - "../../../library/drivers/xcvr/adi_xcvr_pkg.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "tests/test_dma.sv" \ - "tests/test_program_64b66b.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "tests/test_program.sv" \ + "tests/test_dma.sv" \ + "tests/test_program_64b66b.sv" \ +] #set a default test program diff --git a/testbenches/project/adrv9001/Makefile b/testbenches/project/adrv9001/Makefile index 6a2b830c..853eadf8 100644 --- a/testbenches/project/adrv9001/Makefile +++ b/testbenches/project/adrv9001/Makefile @@ -4,30 +4,16 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# 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 += axi_adrv9001 @@ -52,7 +38,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/adrv9001/system_bd.tcl b/testbenches/project/adrv9001/system_bd.tcl index 7f7b8b5c..d177cbb2 100644 --- a/testbenches/project/adrv9001/system_bd.tcl +++ b/testbenches/project/adrv9001/system_bd.tcl @@ -33,8 +33,6 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params # Device clk diff --git a/testbenches/project/adrv9001/system_project.tcl b/testbenches/project/adrv9001/system_project.tcl index dcd47964..68c4572d 100644 --- a/testbenches/project/adrv9001/system_project.tcl +++ b/testbenches/project/adrv9001/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,28 +16,16 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xczu9eg-ffvb1156-2-e" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_jesd.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/adrv9009/Makefile b/testbenches/project/adrv9009/Makefile index 244ec5c5..b644f5f0 100755 --- a/testbenches/project/adrv9009/Makefile +++ b/testbenches/project/adrv9009/Makefile @@ -4,30 +4,17 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv - -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr + +# 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_clkgen LIB_DEPS += axi_dmac @@ -62,7 +49,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/adrv9009/system_bd.tcl b/testbenches/project/adrv9009/system_bd.tcl index ea1709b5..58dc58ac 100755 --- a/testbenches/project/adrv9009/system_bd.tcl +++ b/testbenches/project/adrv9009/system_bd.tcl @@ -33,11 +33,10 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/library/jesd204/scripts/jesd204.tcl - global ad_project_params +source $ad_hdl_dir/library/jesd204/scripts/jesd204.tcl + source $ad_hdl_dir/projects/common/xilinx/adcfifo_bd.tcl source $ad_hdl_dir/projects/common/xilinx/dacfifo_bd.tcl diff --git a/testbenches/project/adrv9009/system_project.tcl b/testbenches/project/adrv9009/system_project.tcl index 6c2cba9f..08e5fc1a 100755 --- a/testbenches/project/adrv9009/system_project.tcl +++ b/testbenches/project/adrv9009/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -23,32 +21,17 @@ set use_smartconnect 0 adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" #adi_sim_project_xilinx $project_name "xczu9eg-ffvb1156-2-e"; # GTH4 +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_jesd.tcl +source $ad_tb_dir/library/includes/sp_include_xcvr.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "../../../library/regmaps/adi_regmap_xcvr_pkg.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/drivers/jesd/adi_jesd204_pkg.sv" \ - "../../../library/drivers/xcvr/adi_xcvr_pkg.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/fmcomms2/Makefile b/testbenches/project/fmcomms2/Makefile index 31fe2f56..b22130e9 100644 --- a/testbenches/project/fmcomms2/Makefile +++ b/testbenches/project/fmcomms2/Makefile @@ -4,28 +4,15 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# 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_adc_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_common_pkg.sv LIB_DEPS += axi_ad9361 LIB_DEPS += axi_dmac @@ -54,7 +41,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/fmcomms2/system_bd.tcl b/testbenches/project/fmcomms2/system_bd.tcl index d85e461a..1fdd39b0 100644 --- a/testbenches/project/fmcomms2/system_bd.tcl +++ b/testbenches/project/fmcomms2/system_bd.tcl @@ -33,8 +33,6 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params # Device clk diff --git a/testbenches/project/fmcomms2/system_project.tcl b/testbenches/project/fmcomms2/system_project.tcl index 0fe0d726..b6e151ad 100644 --- a/testbenches/project/fmcomms2/system_project.tcl +++ b/testbenches/project/fmcomms2/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,26 +16,15 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xczu9eg-ffvb1156-2-e" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/mxfe/Makefile b/testbenches/project/mxfe/Makefile index 05a2ca30..4f226929 100644 --- a/testbenches/project/mxfe/Makefile +++ b/testbenches/project/mxfe/Makefile @@ -4,31 +4,18 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_tdd_gen_pkg.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr +include $(TB_LIBRARY_PATH)/includes/Makeinclude_tdd -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# 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 += axi_tdd @@ -67,7 +54,7 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/mxfe/system_bd.tcl b/testbenches/project/mxfe/system_bd.tcl index 6fbbbbf0..31c05a74 100644 --- a/testbenches/project/mxfe/system_bd.tcl +++ b/testbenches/project/mxfe/system_bd.tcl @@ -33,8 +33,6 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params source $ad_hdl_dir/projects/common/xilinx/adcfifo_bd.tcl diff --git a/testbenches/project/mxfe/system_project.tcl b/testbenches/project/mxfe/system_project.tcl index 7f23430a..682034da 100644 --- a/testbenches/project/mxfe/system_project.tcl +++ b/testbenches/project/mxfe/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,33 +16,18 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_jesd.tcl +source $ad_tb_dir/library/includes/sp_include_xcvr.tcl +source $ad_tb_dir/library/includes/sp_include_tdd.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ - "../../../library/regmaps/adi_regmap_xcvr_pkg.sv" \ - "../../../library/regmaps/adi_regmap_tdd_gen_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/drivers/jesd/adi_jesd204_pkg.sv" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ - "../../../library/drivers/xcvr/adi_xcvr_pkg.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/pluto/Makefile b/testbenches/project/pluto/Makefile index 3fb127cc..fc138af5 100644 --- a/testbenches/project/pluto/Makefile +++ b/testbenches/project/pluto/Makefile @@ -2,29 +2,16 @@ ## Copyright (C) 2024 Analog Devices, Inc. #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_adc_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_common_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_tdd_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += ../../../library/utilities/test_harness_env.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_tdd -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +# 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_adc_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_common_pkg.sv LIB_DEPS += axi_ad9361 LIB_DEPS += axi_dmac @@ -48,4 +35,4 @@ TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP)) #TESTS += cfg2_fsync:test_program #TESTS += cfg2_fsync:test_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk diff --git a/testbenches/project/pluto/system_bd.tcl b/testbenches/project/pluto/system_bd.tcl index 2e6b33f1..89a966c9 100644 --- a/testbenches/project/pluto/system_bd.tcl +++ b/testbenches/project/pluto/system_bd.tcl @@ -33,8 +33,6 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params # Device clk diff --git a/testbenches/project/pluto/system_project.tcl b/testbenches/project/pluto/system_project.tcl index 8afd32e5..9884dea5 100644 --- a/testbenches/project/pluto/system_project.tcl +++ b/testbenches/project/pluto/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -18,27 +16,16 @@ set project_name [file rootname $cfg_file] # Create the project adi_sim_project_xilinx $project_name "xc7z010clg400-1" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_tdd.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_adc_pkg.sv" \ - "../../../library/regmaps/adi_regmap_common_pkg.sv" \ - "../../../library/regmaps/adi_regmap_tdd_gen_pkg.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_dac_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_adc_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_common_pkg.sv" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program" diff --git a/testbenches/project/pulsar_adc_pmdz/Makefile b/testbenches/project/pulsar_adc_pmdz/Makefile index 4768e93f..57a84967 100755 --- a/testbenches/project/pulsar_adc_pmdz/Makefile +++ b/testbenches/project/pulsar_adc_pmdz/Makefile @@ -4,30 +4,18 @@ #################################################################################### #################################################################################### -# All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/utilities/logger_pkg.sv -SV_DEPS += ../../../library/regmaps/reg_accessor.sv -SV_DEPS += ../../../library/vip/amd/m_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axis_sequencer.sv -SV_DEPS += ../../../library/vip/amd/m_axi_sequencer.sv -SV_DEPS += ../../../library/vip/amd/s_axi_sequencer.sv -SV_DEPS += ../../../library/drivers/dmac/dmac_api.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_clkgen_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_dmac_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_spi_engine_pkg.sv -SV_DEPS += ../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -SV_DEPS += system_tb.sv +# Makeincludes +include ../../../scripts/make_tb_path +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine -ENV_DEPS += ../../../../library/util_cdc/sync_bits.v -ENV_DEPS += ../../../../library/common/ad_edge_detect.v +# Remaining test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pwm_gen_pkg.sv -ENV_DEPS += system_project.tcl -ENV_DEPS += system_bd.tcl -ENV_DEPS += ../../../scripts/adi_sim.tcl -ENV_DEPS += ../../../scripts/run_sim.tcl +ENV_DEPS += $(HDL_LIBRARY_PATH)/util_cdc/sync_bits.v +ENV_DEPS += $(HDL_LIBRARY_PATH)/common/ad_edge_detect.v LIB_DEPS += axi_clkgen LIB_DEPS += axi_pwm_gen @@ -54,7 +42,7 @@ CFG_FILES := $(notdir $(wildcard cfgs/cfg*.tcl)) # Format is: : TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(addprefix $(cfg):, $(TP))) -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/project/pulsar_adc_pmdz/system_bd.tcl b/testbenches/project/pulsar_adc_pmdz/system_bd.tcl index 161ce168..64517339 100755 --- a/testbenches/project/pulsar_adc_pmdz/system_bd.tcl +++ b/testbenches/project/pulsar_adc_pmdz/system_bd.tcl @@ -33,14 +33,12 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl - global ad_project_params adi_project_files [list \ - "../../../../library/common/ad_edge_detect.v" \ - "../../../../library/util_cdc/sync_bits.v" \ - "../../../../library/common/ad_iobuf.v" \ + "$ad_hdl_dir/library/common/ad_edge_detect.v" \ + "$ad_hdl_dir/library/util_cdc/sync_bits.v" \ + "$ad_hdl_dir/library/common/ad_iobuf.v" \ ] # diff --git a/testbenches/project/pulsar_adc_pmdz/system_project.tcl b/testbenches/project/pulsar_adc_pmdz/system_project.tcl index 709cbcca..201341a0 100755 --- a/testbenches/project/pulsar_adc_pmdz/system_project.tcl +++ b/testbenches/project/pulsar_adc_pmdz/system_project.tcl @@ -1,6 +1,4 @@ source ../../../scripts/adi_sim.tcl -source ../../../../scripts/adi_env.tcl -source $ad_hdl_dir/projects/scripts/adi_board.tcl if {$argc < 1} { puts "Expecting at least one argument that specifies the test configuration" @@ -21,27 +19,16 @@ set use_smartconnect 1 # Create the project adi_sim_project_xilinx $project_name "xc7z007sclg400-1" +source $ad_tb_dir/library/includes/sp_include_dmac.tcl +source $ad_tb_dir/library/includes/sp_include_spi_engine.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/utilities/logger_pkg.sv" \ - "../../../library/regmaps/reg_accessor.sv" \ - "../../../library/vip/amd/m_axis_sequencer.sv" \ - "../../../library/vip/amd/s_axis_sequencer.sv" \ - "../../../library/vip/amd/m_axi_sequencer.sv" \ - "../../../library/vip/amd/s_axi_sequencer.sv" \ - "../../../library/drivers/dmac/dmac_api.sv" \ - "../../../library/regmaps/adi_regmap_pkg.sv" \ - "../../../library/regmaps/adi_regmap_clkgen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_dmac_pkg.sv" \ - "../../../library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ - "../../../library/regmaps/adi_regmap_spi_engine_pkg.sv" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../library/utilities/test_harness_env.sv" \ - "spi_engine.svh" \ - "tests/test_program.sv" \ - "system_tb.sv" \ - ] + "$ad_tb_dir/library/regmaps/adi_regmap_clkgen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pwm_gen_pkg.sv" \ + "spi_engine.svh" \ + "tests/test_program.sv" \ +] #set a default test program adi_sim_add_define "TEST_PROGRAM=test_program"