From 96a45aeec8efa3da1c14ed19b34e681a4e85b583 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Tue, 19 Nov 2024 08:03:30 +0200 Subject: [PATCH 1/7] includes: Introduced include files for Makefile and system_project - Added include files for major drivers - Updated scripts Signed-off-by: Istvan-Zsolt Szekely --- library/includes/Makeinclude_axi | 8 ++++ library/includes/Makeinclude_axis | 7 +++ library/includes/Makeinclude_common | 19 +++++++++ library/includes/Makeinclude_data_offload | 10 +++++ library/includes/Makeinclude_dmac | 11 +++++ library/includes/Makeinclude_jesd | 14 ++++++ library/includes/Makeinclude_regmap | 8 ++++ library/includes/Makeinclude_scoreboard | 9 ++++ library/includes/Makeinclude_spi_engine | 14 ++++++ library/includes/Makeinclude_tdd | 10 +++++ library/includes/Makeinclude_xcvr | 10 +++++ library/includes/sp_include_axi.tcl | 41 ++++++++++++++++++ library/includes/sp_include_axis.tcl | 40 +++++++++++++++++ library/includes/sp_include_common.tcl | 45 ++++++++++++++++++++ library/includes/sp_include_data_offload.tcl | 42 ++++++++++++++++++ library/includes/sp_include_dmac.tcl | 43 +++++++++++++++++++ library/includes/sp_include_jesd.tcl | 44 +++++++++++++++++++ library/includes/sp_include_regmap.tcl | 41 ++++++++++++++++++ library/includes/sp_include_scoreboard.tcl | 42 ++++++++++++++++++ library/includes/sp_include_spi_engine.tcl | 44 +++++++++++++++++++ library/includes/sp_include_tdd.tcl | 42 ++++++++++++++++++ library/includes/sp_include_xcvr.tcl | 42 ++++++++++++++++++ library/vip/adi/spi_vip/Makefile | 9 ++-- scripts/adi_sim.tcl | 16 +++++-- scripts/adi_tb_env.tcl | 9 ++++ scripts/make_tb_path | 9 ++++ scripts/project-sim.mk | 15 +++---- 27 files changed, 628 insertions(+), 16 deletions(-) create mode 100644 library/includes/Makeinclude_axi create mode 100644 library/includes/Makeinclude_axis create mode 100644 library/includes/Makeinclude_common create mode 100644 library/includes/Makeinclude_data_offload create mode 100644 library/includes/Makeinclude_dmac create mode 100644 library/includes/Makeinclude_jesd create mode 100644 library/includes/Makeinclude_regmap create mode 100644 library/includes/Makeinclude_scoreboard create mode 100644 library/includes/Makeinclude_spi_engine create mode 100644 library/includes/Makeinclude_tdd create mode 100644 library/includes/Makeinclude_xcvr create mode 100644 library/includes/sp_include_axi.tcl create mode 100644 library/includes/sp_include_axis.tcl create mode 100644 library/includes/sp_include_common.tcl create mode 100644 library/includes/sp_include_data_offload.tcl create mode 100644 library/includes/sp_include_dmac.tcl create mode 100644 library/includes/sp_include_jesd.tcl create mode 100644 library/includes/sp_include_regmap.tcl create mode 100644 library/includes/sp_include_scoreboard.tcl create mode 100644 library/includes/sp_include_spi_engine.tcl create mode 100644 library/includes/sp_include_tdd.tcl create mode 100644 library/includes/sp_include_xcvr.tcl create mode 100644 scripts/adi_tb_env.tcl create mode 100644 scripts/make_tb_path diff --git a/library/includes/Makeinclude_axi b/library/includes/Makeinclude_axi new file mode 100644 index 00000000..56637bbb --- /dev/null +++ b/library/includes/Makeinclude_axi @@ -0,0 +1,8 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/vip/amd/m_axi_sequencer.sv +SV_DEPS += $(TB_LIBRARY_PATH)/vip/amd/s_axi_sequencer.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/reg_accessor.sv diff --git a/library/includes/Makeinclude_axis b/library/includes/Makeinclude_axis new file mode 100644 index 00000000..c8996e22 --- /dev/null +++ b/library/includes/Makeinclude_axis @@ -0,0 +1,7 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/vip/amd/m_axis_sequencer.sv +SV_DEPS += $(TB_LIBRARY_PATH)/vip/amd/s_axis_sequencer.sv diff --git a/library/includes/Makeinclude_common b/library/includes/Makeinclude_common new file mode 100644 index 00000000..496e1d71 --- /dev/null +++ b/library/includes/Makeinclude_common @@ -0,0 +1,19 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Makeincludes +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axi + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/utilities/utils.svh +SV_DEPS += $(TB_LIBRARY_PATH)/utilities/logger_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/utilities/test_harness_env.sv +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/common/watchdog.sv + +SV_DEPS += system_tb.sv + +ENV_DEPS += system_project.tcl +ENV_DEPS += system_bd.tcl +ENV_DEPS += $(ADI_TB_DIR)/scripts/adi_sim.tcl +ENV_DEPS += $(ADI_TB_DIR)/scripts/run_sim.tcl diff --git a/library/includes/Makeinclude_data_offload b/library/includes/Makeinclude_data_offload new file mode 100644 index 00000000..699ed86f --- /dev/null +++ b/library/includes/Makeinclude_data_offload @@ -0,0 +1,10 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Makeincludes +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/data_offload/data_offload_api.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_data_offload_pkg.sv diff --git a/library/includes/Makeinclude_dmac b/library/includes/Makeinclude_dmac new file mode 100644 index 00000000..298a26b1 --- /dev/null +++ b/library/includes/Makeinclude_dmac @@ -0,0 +1,11 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Makeincludes +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/dmac/dma_trans.sv +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/dmac/dmac_api.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dmac_pkg.sv diff --git a/library/includes/Makeinclude_jesd b/library/includes/Makeinclude_jesd new file mode 100644 index 00000000..176c9ec5 --- /dev/null +++ b/library/includes/Makeinclude_jesd @@ -0,0 +1,14 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Makeincludes +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/jesd/adi_jesd204_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_jesd_rx_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_jesd_tx_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_jesd_tpl_pkg.sv + +ENV_DEPS += $(TB_LIBRARY_PATH)/drivers/jesd/jesd_exerciser.tcl diff --git a/library/includes/Makeinclude_regmap b/library/includes/Makeinclude_regmap new file mode 100644 index 00000000..30977cc9 --- /dev/null +++ b/library/includes/Makeinclude_regmap @@ -0,0 +1,8 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/reg_accessor.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_peripheral_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_pkg.sv diff --git a/library/includes/Makeinclude_scoreboard b/library/includes/Makeinclude_scoreboard new file mode 100644 index 00000000..5a95ba29 --- /dev/null +++ b/library/includes/Makeinclude_scoreboard @@ -0,0 +1,9 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/common/mailbox.sv +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/common/scoreboard.sv +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/common/scoreboard_pack.sv +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/common/x_monitor.sv diff --git a/library/includes/Makeinclude_spi_engine b/library/includes/Makeinclude_spi_engine new file mode 100644 index 00000000..5311f855 --- /dev/null +++ b/library/includes/Makeinclude_spi_engine @@ -0,0 +1,14 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Makeincludes +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/vip/adi/spi_vip/adi_spi_vip_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/vip/adi/spi_vip/s_spi_sequencer.sv +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/spi_engine/spi_engine_instr_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_spi_engine_pkg.sv + +SIM_LIB_DEPS += spi_vip diff --git a/library/includes/Makeinclude_tdd b/library/includes/Makeinclude_tdd new file mode 100644 index 00000000..6285ecb6 --- /dev/null +++ b/library/includes/Makeinclude_tdd @@ -0,0 +1,10 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Makeincludes +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_tdd_gen_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_tdd_trans_pkg.sv diff --git a/library/includes/Makeinclude_xcvr b/library/includes/Makeinclude_xcvr new file mode 100644 index 00000000..bf095110 --- /dev/null +++ b/library/includes/Makeinclude_xcvr @@ -0,0 +1,10 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Makeincludes +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap + +# All test-bench dependencies except test programs +SV_DEPS += $(TB_LIBRARY_PATH)/drivers/xcvr/adi_xcvr_pkg.sv +SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_xcvr_pkg.sv diff --git a/library/includes/sp_include_axi.tcl b/library/includes/sp_include_axi.tcl new file mode 100644 index 00000000..bff4766c --- /dev/null +++ b/library/includes/sp_include_axi.tcl @@ -0,0 +1,41 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/vip/amd/m_axi_sequencer.sv" \ + "$ad_tb_dir/library/vip/amd/s_axi_sequencer.sv" \ + "$ad_tb_dir/library/regmaps/reg_accessor.sv" \ +] diff --git a/library/includes/sp_include_axis.tcl b/library/includes/sp_include_axis.tcl new file mode 100644 index 00000000..9e4420e0 --- /dev/null +++ b/library/includes/sp_include_axis.tcl @@ -0,0 +1,40 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/vip/amd/m_axis_sequencer.sv" \ + "$ad_tb_dir/library/vip/amd/s_axis_sequencer.sv" \ +] diff --git a/library/includes/sp_include_common.tcl b/library/includes/sp_include_common.tcl new file mode 100644 index 00000000..f97515b3 --- /dev/null +++ b/library/includes/sp_include_common.tcl @@ -0,0 +1,45 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +source $ad_tb_dir/library/includes/sp_include_axi.tcl + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/utilities/utils.svh" \ + "$ad_tb_dir/library/utilities/logger_pkg.sv" \ + "$ad_tb_dir/library/utilities/test_harness_env.sv" \ + "$ad_tb_dir/library/drivers/common/watchdog.sv" \ + "system_tb.sv" \ +] diff --git a/library/includes/sp_include_data_offload.tcl b/library/includes/sp_include_data_offload.tcl new file mode 100644 index 00000000..e1a8c2c2 --- /dev/null +++ b/library/includes/sp_include_data_offload.tcl @@ -0,0 +1,42 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +source $ad_tb_dir/library/includes/sp_include_regmap.tcl + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/drivers/data_offload/data_offload_api.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_data_offload_pkg.sv" \ +] diff --git a/library/includes/sp_include_dmac.tcl b/library/includes/sp_include_dmac.tcl new file mode 100644 index 00000000..511727c1 --- /dev/null +++ b/library/includes/sp_include_dmac.tcl @@ -0,0 +1,43 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +source $ad_tb_dir/library/includes/sp_include_regmap.tcl + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/drivers/dmac/dma_trans.sv" \ + "$ad_tb_dir/library/drivers/dmac/dmac_api.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_dmac_pkg.sv" \ +] diff --git a/library/includes/sp_include_jesd.tcl b/library/includes/sp_include_jesd.tcl new file mode 100644 index 00000000..e768ea17 --- /dev/null +++ b/library/includes/sp_include_jesd.tcl @@ -0,0 +1,44 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +source $ad_tb_dir/library/includes/sp_include_regmap.tcl + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/drivers/jesd/adi_jesd204_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_jesd_rx_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_jesd_tx_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_jesd_tpl_pkg.sv" \ +] diff --git a/library/includes/sp_include_regmap.tcl b/library/includes/sp_include_regmap.tcl new file mode 100644 index 00000000..583fbde0 --- /dev/null +++ b/library/includes/sp_include_regmap.tcl @@ -0,0 +1,41 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/regmaps/reg_accessor.sv" \ + "$ad_tb_dir/library/regmaps/adi_peripheral_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_pkg.sv" \ +] diff --git a/library/includes/sp_include_scoreboard.tcl b/library/includes/sp_include_scoreboard.tcl new file mode 100644 index 00000000..dba36127 --- /dev/null +++ b/library/includes/sp_include_scoreboard.tcl @@ -0,0 +1,42 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/drivers/common/mailbox.sv" \ + "$ad_tb_dir/library/drivers/common/scoreboard.sv" \ + "$ad_tb_dir/library/drivers/common/scoreboard_pack.sv" \ + "$ad_tb_dir/library/drivers/common/x_monitor.sv" \ +] diff --git a/library/includes/sp_include_spi_engine.tcl b/library/includes/sp_include_spi_engine.tcl new file mode 100644 index 00000000..114a5561 --- /dev/null +++ b/library/includes/sp_include_spi_engine.tcl @@ -0,0 +1,44 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +source $ad_tb_dir/library/includes/sp_include_regmap.tcl + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/vip/adi/spi_vip/adi_spi_vip_pkg.sv" \ + "$ad_tb_dir/library/vip/adi/spi_vip/s_spi_sequencer.sv" \ + "$ad_tb_dir/library/drivers/spi_engine/spi_engine_instr_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_spi_engine_pkg.sv" \ +] diff --git a/library/includes/sp_include_tdd.tcl b/library/includes/sp_include_tdd.tcl new file mode 100644 index 00000000..38a8b855 --- /dev/null +++ b/library/includes/sp_include_tdd.tcl @@ -0,0 +1,42 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +source $ad_tb_dir/library/includes/sp_include_regmap.tcl + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/regmaps/adi_regmap_tdd_gen_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_tdd_trans_pkg.sv" \ +] diff --git a/library/includes/sp_include_xcvr.tcl b/library/includes/sp_include_xcvr.tcl new file mode 100644 index 00000000..6e27586a --- /dev/null +++ b/library/includes/sp_include_xcvr.tcl @@ -0,0 +1,42 @@ +# *************************************************************************** +# *************************************************************************** +# Copyright 2024 (c) Analog Devices, Inc. All rights reserved. +# +# In this HDL repository, there are many different and unique modules, consisting +# of various HDL (Verilog or VHDL) components. The individual modules are +# developed independently, and may be accompanied by separate and unique license +# terms. +# +# The user should read each of these license terms, and understand the +# freedoms and responsibilities that he or she has by using this source/core. +# +# This core is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. +# +# Redistribution and use of source or resulting binaries, with or without modification +# of this file, are permitted under one of the following two license terms: +# +# 1. The GNU General Public License version 2 as published by the +# Free Software Foundation, which can be found in the top level directory +# of this repository (LICENSE_GPL2), and also online at: +# +# +# OR +# +# 2. An ADI specific BSD license, which can be found in the top level directory +# of this repository (LICENSE_ADIBSD), and also on-line at: +# https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD +# This will allow to generate bit files and not release the source code, +# as long as it attaches to an ADI device. +# +# *************************************************************************** +# *************************************************************************** + +source $ad_tb_dir/library/includes/sp_include_regmap.tcl + +# Add test files to the project +adi_sim_project_files [list \ + "$ad_tb_dir/library/drivers/xcvr/adi_xcvr_pkg.sv" \ + "$ad_tb_dir/library/regmaps/adi_regmap_xcvr_pkg.sv" \ +] diff --git a/library/vip/adi/spi_vip/Makefile b/library/vip/adi/spi_vip/Makefile index 7ff9d0f9..c9f7ea20 100644 --- a/library/vip/adi/spi_vip/Makefile +++ b/library/vip/adi/spi_vip/Makefile @@ -4,13 +4,12 @@ ## Auto-generated, do not modify! #################################################################################### -# Assumes this file is in /testbenches/library/vip/adi/spi_vip/Makefile -ADI_HDL_DIR := $(subst /testbenches/library/vip/adi/spi_vip/Makefile,,$(abspath $(lastword $(MAKEFILE_LIST)))) -HDL_LIBRARY_PATH := $(ADI_HDL_DIR)/library/ +# Makeincludes +include ../../../../scripts/make_tb_path LIBRARY_NAME := adi_spi_vip -GENERIC_DEPS += $(ADI_HDL_DIR)/testbenches/library/utilities/utils.svh +GENERIC_DEPS += $(TB_LIBRARY_PATH)/utilities/utils.svh GENERIC_DEPS += adi_spi_vip_pkg.sv GENERIC_DEPS += spi_vip_if.sv GENERIC_DEPS += adi_spi_vip.sv @@ -20,4 +19,4 @@ XILINX_DEPS += adi_spi_vip_pkg.ttcl #TODO: INTEL_DEPS += adi_spi_vip_hw.tcl -include $(HDL_LIBRARY_PATH)/scripts/library.mk \ No newline at end of file +include $(HDL_LIBRARY_PATH)/scripts/library.mk diff --git a/scripts/adi_sim.tcl b/scripts/adi_sim.tcl index f6b18a03..057901aa 100644 --- a/scripts/adi_sim.tcl +++ b/scripts/adi_sim.tcl @@ -2,6 +2,13 @@ variable adi_sim_defines {} variable design_name "test_harness" +global ad_hdl_dir +global ad_tb_dir + +source ../../../scripts/adi_tb_env.tcl + +source $ad_hdl_dir/projects/scripts/adi_board.tcl + proc adi_sim_add_define {value} { global adi_sim_defines lappend adi_sim_defines $value @@ -12,7 +19,8 @@ proc adi_sim_project_xilinx {project_name {part "xc7vx485tffg1157-1"}} { global ad_project_params global use_smartconnect global ad_hdl_dir - + global ad_tb_dir + # Create project create_project ${project_name} ./runs/${project_name} -part $part -force @@ -21,7 +29,7 @@ proc adi_sim_project_xilinx {project_name {part "xc7vx485tffg1157-1"}} { # Set IP repository paths set lib_dirs $ad_hdl_dir/library - lappend lib_dirs [file normalize "./../../../library"] + lappend lib_dirs "$ad_tb_dir/library" set_property ip_repo_paths $lib_dirs \ [get_filesets sources_1] @@ -35,7 +43,7 @@ proc adi_sim_project_xilinx {project_name {part "xc7vx485tffg1157-1"}} { global sys_zynq set sys_zynq -1 if { ![info exists ad_project_params(CUSTOM_HARNESS)] || !$ad_project_params(CUSTOM_HARNESS) } { - source ../../../library/utilities/test_harness_system_bd.tcl + source $ad_tb_dir/library/utilities/test_harness_system_bd.tcl } # transfer tcl parameters as defines to verilog @@ -75,6 +83,8 @@ proc adi_sim_project_xilinx {project_name {part "xc7vx485tffg1157-1"}} { # Use a define for the top module adi_sim_add_define "TB=system_tb" + + source $ad_tb_dir/library/includes/sp_include_common.tcl } proc adi_sim_project_files {project_files} { diff --git a/scripts/adi_tb_env.tcl b/scripts/adi_tb_env.tcl new file mode 100644 index 00000000..eff40bdd --- /dev/null +++ b/scripts/adi_tb_env.tcl @@ -0,0 +1,9 @@ +############################################################################### +## Copyright (C) 2024 Analog Devices, Inc. All rights reserved. +### SPDX short identifier: ADIBSD +############################################################################### + +# environment related stuff +set ad_tb_dir [file normalize [file join [file dirname [info script]] "../"]] + +source $ad_tb_dir/../scripts/adi_env.tcl diff --git a/scripts/make_tb_path b/scripts/make_tb_path new file mode 100644 index 00000000..576f816a --- /dev/null +++ b/scripts/make_tb_path @@ -0,0 +1,9 @@ +## Copyright 2024(c) Analog Devices, Inc. +#################################################################################### +#################################################################################### + +# Assumes this file is in /testbenches/scripts/make_tb_path +ADI_HDL_DIR := $(subst /testbenches/scripts/make_tb_path,,$(abspath $(lastword $(MAKEFILE_LIST)))) +HDL_LIBRARY_PATH := $(ADI_HDL_DIR)/library/ +ADI_TB_DIR := $(ADI_HDL_DIR)/testbenches/ +TB_LIBRARY_PATH := $(ADI_TB_DIR)/library/ diff --git a/scripts/project-sim.mk b/scripts/project-sim.mk index 255b64f9..c6a5e524 100644 --- a/scripts/project-sim.mk +++ b/scripts/project-sim.mk @@ -4,13 +4,12 @@ #################################################################################### #################################################################################### -# Assumes this file is in /testbenches/scripts/project-sim.mk -ADI_HDL_DIR := $(subst /testbenches/scripts/project-sim.mk,,$(abspath $(lastword $(MAKEFILE_LIST)))) -HDL_LIBRARY_PATH := $(ADI_HDL_DIR)/library/ +include $(ADI_TB_DIR)/library/includes/Makeinclude_common + include $(ADI_HDL_DIR)/quiet.mk ENV_DEPS += $(foreach dep,$(LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/component.xml) -ENV_DEPS += $(foreach dep,$(SIM_LIB_DEPS),$(ADI_HDL_DIR)/testbenches/library/vip/adi/$(dep)/component.xml) +ENV_DEPS += $(foreach dep,$(SIM_LIB_DEPS),$(ADI_TB_DIR)/library/vip/adi/$(dep)/component.xml) SHELL:=/bin/bash @@ -71,11 +70,11 @@ endef ifeq ($(OS), Windows_NT) CMD_PRE = cmd /C " CMD_POST = " -RUN_SIM_PATH = $(shell cygpath -m $(ADI_HDL_DIR)/testbenches/scripts/run_sim.tcl) +RUN_SIM_PATH = $(shell cygpath -m $(ADI_TB_DIR)/scripts/run_sim.tcl) else CMD_PRE = CMD_POST = -RUN_SIM_PATH = $(ADI_HDL_DIR)/testbenches/scripts/run_sim.tcl +RUN_SIM_PATH = $(ADI_TB_DIR)/scripts/run_sim.tcl endif # This rule template will build the environment @@ -160,9 +159,9 @@ $(HDL_LIBRARY_PATH)%/component.xml: FORCE "; exit $$? # Create here the targets which build the sim libraries -$(ADI_HDL_DIR)/testbenches/library/vip/adi/%/component.xml: TARGET:=xilinx +$(ADI_TB_DIR)/library/vip/adi/%/component.xml: TARGET:=xilinx FORCE: -$(ADI_HDL_DIR)/testbenches/library/vip/adi/%/component.xml: FORCE +$(ADI_TB_DIR)/library/vip/adi/%/component.xml: FORCE flock $(dir $@).lock -c " \ $(MAKE) -C $(dir $@) xilinx; \ "; exit $$? From f29d2ccc550eb836bedbbbf38e126615bf8455d0 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Tue, 19 Nov 2024 08:03:52 +0200 Subject: [PATCH 2/7] 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 ebcb278f..90b91888 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 ecb5a4ef..45c49baf 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 3b570ad8..3cbf59b5 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 @@ TESTS += cfg_s_sdi2: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" From 1aaf49b8f9e2bb3a7c629b1fb128d581e6ea2548 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Fri, 22 Nov 2024 16:29:41 +0200 Subject: [PATCH 3/7] includes: Updated dma_flock Signed-off-by: Istvan-Zsolt Szekely --- library/includes/Makeinclude_dmac | 2 ++ library/vip/adi/io_vip/Makefile | 5 +++- testbenches/ip/dma_flock/Makefile | 29 +++++---------------- testbenches/ip/dma_flock/system_bd.tcl | 2 +- testbenches/ip/dma_flock/system_project.tcl | 20 +++----------- 5 files changed, 17 insertions(+), 41 deletions(-) diff --git a/library/includes/Makeinclude_dmac b/library/includes/Makeinclude_dmac index 298a26b1..3bf0fb03 100644 --- a/library/includes/Makeinclude_dmac +++ b/library/includes/Makeinclude_dmac @@ -9,3 +9,5 @@ include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap SV_DEPS += $(TB_LIBRARY_PATH)/drivers/dmac/dma_trans.sv SV_DEPS += $(TB_LIBRARY_PATH)/drivers/dmac/dmac_api.sv SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dmac_pkg.sv + +SIM_LIB_DEPS := io_vip diff --git a/library/vip/adi/io_vip/Makefile b/library/vip/adi/io_vip/Makefile index 33fb74bc..b941dff5 100644 --- a/library/vip/adi/io_vip/Makefile +++ b/library/vip/adi/io_vip/Makefile @@ -3,6 +3,9 @@ ## Auto-generated, do not modify! #################################################################################### +# Makeincludes +include ../../../../scripts/make_tb_path + LIBRARY_NAME := io_vip GENERIC_DEPS += io_vip.sv @@ -11,4 +14,4 @@ GENERIC_DEPS += io_vip_if.sv XILINX_DEPS += io_vip_ip.tcl XILINX_DEPS += io_vip_pkg.ttcl -include ../../../../../library/scripts/library.mk +include $(HDL_LIBRARY_PATH)/scripts/library.mk diff --git a/testbenches/ip/dma_flock/Makefile b/testbenches/ip/dma_flock/Makefile index 0d356da1..bd121142 100644 --- a/testbenches/ip/dma_flock/Makefile +++ b/testbenches/ip/dma_flock/Makefile @@ -4,32 +4,17 @@ #################################################################################### #################################################################################### +# 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_axis + # All test-bench dependencies except test programs -SV_DEPS += ../../../library/utilities/utils.svh -SV_DEPS += ../../../library/drivers/dmac/dma_trans.sv -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 += ../../../library/regmaps/adi_peripheral_pkg.sv SV_DEPS += environment.sv SV_DEPS += scoreboard.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 := axi_dmac -SIM_LIB_DEPS := io_vip # default test program TP := test_program @@ -47,7 +32,7 @@ TESTS += cfg2_fsync:test_program TESTS += cfg2_fsync:test_program_frame_delay TESTS += cfg3_fsync_autorun:test_program_frame_delay -include ../../../scripts/project-sim.mk +include $(ADI_TB_DIR)/scripts/project-sim.mk # usage : # diff --git a/testbenches/ip/dma_flock/system_bd.tcl b/testbenches/ip/dma_flock/system_bd.tcl index 3473a53e..8f7db11e 100644 --- a/testbenches/ip/dma_flock/system_bd.tcl +++ b/testbenches/ip/dma_flock/system_bd.tcl @@ -33,7 +33,7 @@ # *************************************************************************** # *************************************************************************** -source ../../../../scripts/adi_env.tcl +global ad_project_params global m_dma_cfg global s_dma_cfg diff --git a/testbenches/ip/dma_flock/system_project.tcl b/testbenches/ip/dma_flock/system_project.tcl index 331c579b..4c26cbe7 100644 --- a/testbenches/ip/dma_flock/system_project.tcl +++ b/testbenches/ip/dma_flock/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,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_axis.tcl + # Add test files to the project adi_sim_project_files [list \ - "../../../library/utilities/utils.svh" \ - "../../../library/drivers/dmac/dma_trans.sv" \ - "../../../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" \ - "../../../library/regmaps/adi_peripheral_pkg.sv" \ "scoreboard.sv" \ "environment.sv" \ "tests/test_program.sv" \ "tests/test_program_frame_delay.sv" \ - "system_tb.sv" \ ] #set a default test program From 1fce0ec5bb85ae6e7b327b323a1f1580daa156a5 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Fri, 29 Nov 2024 09:38:27 +0200 Subject: [PATCH 4/7] adi_tb_env: Updated TCL variables setting - Separated Testbenches from HDL dependency Signed-off-by: Istvan-Zsolt Szekely --- scripts/adi_tb_env.tcl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/adi_tb_env.tcl b/scripts/adi_tb_env.tcl index eff40bdd..66224601 100644 --- a/scripts/adi_tb_env.tcl +++ b/scripts/adi_tb_env.tcl @@ -4,6 +4,16 @@ ############################################################################### # environment related stuff +if [info exists ::env(ADI_HDL_DIR)] { + set ad_hdl_dir [file normalize $::env(ADI_HDL_DIR)] +} else { + error "Missing ADI_HDL_DIR environment variable definition!" +} + set ad_tb_dir [file normalize [file join [file dirname [info script]] "../"]] -source $ad_tb_dir/../scripts/adi_env.tcl +if [info exists ::env(ADI_TB_DIR)] { + set ad_tb_dir [file normalize $::env(ADI_TB_DIR)] +} + +source $ad_hdl_dir/scripts/adi_env.tcl From cd32db2ba897fe4c6bda47b99c9cebf43f4ea063 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Fri, 29 Nov 2024 10:43:35 +0200 Subject: [PATCH 5/7] includes: Added .mk extenstion to Makeinclude files Signed-off-by: Istvan-Zsolt Szekely --- .../includes/{Makeinclude_axi => Makeinclude_axi.mk} | 0 .../{Makeinclude_axis => Makeinclude_axis.mk} | 0 .../{Makeinclude_common => Makeinclude_common.mk} | 2 +- ...lude_data_offload => Makeinclude_data_offload.mk} | 2 +- .../{Makeinclude_dmac => Makeinclude_dmac.mk} | 2 +- .../{Makeinclude_jesd => Makeinclude_jesd.mk} | 2 +- .../{Makeinclude_regmap => Makeinclude_regmap.mk} | 0 ...einclude_scoreboard => Makeinclude_scoreboard.mk} | 0 ...einclude_spi_engine => Makeinclude_spi_engine.mk} | 2 +- .../includes/{Makeinclude_tdd => Makeinclude_tdd.mk} | 2 +- .../{Makeinclude_xcvr => Makeinclude_xcvr.mk} | 2 +- library/vip/adi/io_vip/Makefile | 2 +- library/vip/adi/spi_vip/Makefile | 2 +- scripts/{make_tb_path => make_tb_path.mk} | 4 ++-- scripts/project-sim.mk | 2 +- testbenches/ip/axi_tdd/Makefile | 6 +++--- testbenches/ip/axis_sequencers/Makefile | 6 +++--- testbenches/ip/base/Makefile | 4 ++-- testbenches/ip/data_offload/Makefile | 6 +++--- testbenches/ip/data_offload_2/Makefile | 6 +++--- testbenches/ip/dma_flock/Makefile | 8 ++++---- testbenches/ip/dma_loopback/Makefile | 8 ++++---- testbenches/ip/dma_sg/Makefile | 8 ++++---- testbenches/ip/hbm/Makefile | 8 ++++---- testbenches/ip/i3c_controller/Makefile | 4 ++-- testbenches/ip/jesd_loopback/Makefile | 10 +++++----- testbenches/ip/jesd_loopback_64b/Makefile | 10 +++++----- testbenches/ip/scoreboard/Makefile | 12 ++++++------ testbenches/ip/spi_engine/Makefile | 10 +++++----- testbenches/ip/util_pack/Makefile | 10 +++++----- testbenches/project/ad463x/Makefile | 8 ++++---- testbenches/project/ad57xx/Makefile | 8 ++++---- testbenches/project/ad738x/Makefile | 8 ++++---- testbenches/project/ad7606x/Makefile | 8 ++++---- testbenches/project/ad7616/Makefile | 8 ++++---- testbenches/project/ad9083/Makefile | 10 +++++----- testbenches/project/ad_quadmxfe1_ebz/Makefile | 10 +++++----- testbenches/project/adrv9001/Makefile | 8 ++++---- testbenches/project/adrv9009/Makefile | 10 +++++----- testbenches/project/fmcomms2/Makefile | 6 +++--- testbenches/project/mxfe/Makefile | 12 ++++++------ testbenches/project/pluto/Makefile | 8 ++++---- testbenches/project/pulsar_adc_pmdz/Makefile | 8 ++++---- 43 files changed, 126 insertions(+), 126 deletions(-) rename library/includes/{Makeinclude_axi => Makeinclude_axi.mk} (100%) rename library/includes/{Makeinclude_axis => Makeinclude_axis.mk} (100%) rename library/includes/{Makeinclude_common => Makeinclude_common.mk} (92%) rename library/includes/{Makeinclude_data_offload => Makeinclude_data_offload.mk} (87%) rename library/includes/{Makeinclude_dmac => Makeinclude_dmac.mk} (89%) rename library/includes/{Makeinclude_jesd => Makeinclude_jesd.mk} (91%) rename library/includes/{Makeinclude_regmap => Makeinclude_regmap.mk} (100%) rename library/includes/{Makeinclude_scoreboard => Makeinclude_scoreboard.mk} (100%) rename library/includes/{Makeinclude_spi_engine => Makeinclude_spi_engine.mk} (90%) rename library/includes/{Makeinclude_tdd => Makeinclude_tdd.mk} (87%) rename library/includes/{Makeinclude_xcvr => Makeinclude_xcvr.mk} (87%) rename scripts/{make_tb_path => make_tb_path.mk} (79%) diff --git a/library/includes/Makeinclude_axi b/library/includes/Makeinclude_axi.mk similarity index 100% rename from library/includes/Makeinclude_axi rename to library/includes/Makeinclude_axi.mk diff --git a/library/includes/Makeinclude_axis b/library/includes/Makeinclude_axis.mk similarity index 100% rename from library/includes/Makeinclude_axis rename to library/includes/Makeinclude_axis.mk diff --git a/library/includes/Makeinclude_common b/library/includes/Makeinclude_common.mk similarity index 92% rename from library/includes/Makeinclude_common rename to library/includes/Makeinclude_common.mk index 496e1d71..e6431799 100644 --- a/library/includes/Makeinclude_common +++ b/library/includes/Makeinclude_common.mk @@ -3,7 +3,7 @@ #################################################################################### # Makeincludes -include $(TB_LIBRARY_PATH)/includes/Makeinclude_axi +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axi.mk # All test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/utilities/utils.svh diff --git a/library/includes/Makeinclude_data_offload b/library/includes/Makeinclude_data_offload.mk similarity index 87% rename from library/includes/Makeinclude_data_offload rename to library/includes/Makeinclude_data_offload.mk index 699ed86f..bec4f316 100644 --- a/library/includes/Makeinclude_data_offload +++ b/library/includes/Makeinclude_data_offload.mk @@ -3,7 +3,7 @@ #################################################################################### # Makeincludes -include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap.mk # All test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/drivers/data_offload/data_offload_api.sv diff --git a/library/includes/Makeinclude_dmac b/library/includes/Makeinclude_dmac.mk similarity index 89% rename from library/includes/Makeinclude_dmac rename to library/includes/Makeinclude_dmac.mk index 3bf0fb03..5c43ce10 100644 --- a/library/includes/Makeinclude_dmac +++ b/library/includes/Makeinclude_dmac.mk @@ -3,7 +3,7 @@ #################################################################################### # Makeincludes -include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap.mk # All test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/drivers/dmac/dma_trans.sv diff --git a/library/includes/Makeinclude_jesd b/library/includes/Makeinclude_jesd.mk similarity index 91% rename from library/includes/Makeinclude_jesd rename to library/includes/Makeinclude_jesd.mk index 176c9ec5..3f8889e2 100644 --- a/library/includes/Makeinclude_jesd +++ b/library/includes/Makeinclude_jesd.mk @@ -3,7 +3,7 @@ #################################################################################### # Makeincludes -include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap.mk # All test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/drivers/jesd/adi_jesd204_pkg.sv diff --git a/library/includes/Makeinclude_regmap b/library/includes/Makeinclude_regmap.mk similarity index 100% rename from library/includes/Makeinclude_regmap rename to library/includes/Makeinclude_regmap.mk diff --git a/library/includes/Makeinclude_scoreboard b/library/includes/Makeinclude_scoreboard.mk similarity index 100% rename from library/includes/Makeinclude_scoreboard rename to library/includes/Makeinclude_scoreboard.mk diff --git a/library/includes/Makeinclude_spi_engine b/library/includes/Makeinclude_spi_engine.mk similarity index 90% rename from library/includes/Makeinclude_spi_engine rename to library/includes/Makeinclude_spi_engine.mk index 5311f855..1c0af3b0 100644 --- a/library/includes/Makeinclude_spi_engine +++ b/library/includes/Makeinclude_spi_engine.mk @@ -3,7 +3,7 @@ #################################################################################### # Makeincludes -include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap.mk # All test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/vip/adi/spi_vip/adi_spi_vip_pkg.sv diff --git a/library/includes/Makeinclude_tdd b/library/includes/Makeinclude_tdd.mk similarity index 87% rename from library/includes/Makeinclude_tdd rename to library/includes/Makeinclude_tdd.mk index 6285ecb6..0d078b04 100644 --- a/library/includes/Makeinclude_tdd +++ b/library/includes/Makeinclude_tdd.mk @@ -3,7 +3,7 @@ #################################################################################### # Makeincludes -include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap.mk # All test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_tdd_gen_pkg.sv diff --git a/library/includes/Makeinclude_xcvr b/library/includes/Makeinclude_xcvr.mk similarity index 87% rename from library/includes/Makeinclude_xcvr rename to library/includes/Makeinclude_xcvr.mk index bf095110..23dc8402 100644 --- a/library/includes/Makeinclude_xcvr +++ b/library/includes/Makeinclude_xcvr.mk @@ -3,7 +3,7 @@ #################################################################################### # Makeincludes -include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap +include $(TB_LIBRARY_PATH)/includes/Makeinclude_regmap.mk # All test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/drivers/xcvr/adi_xcvr_pkg.sv diff --git a/library/vip/adi/io_vip/Makefile b/library/vip/adi/io_vip/Makefile index b941dff5..8e61c693 100644 --- a/library/vip/adi/io_vip/Makefile +++ b/library/vip/adi/io_vip/Makefile @@ -4,7 +4,7 @@ #################################################################################### # Makeincludes -include ../../../../scripts/make_tb_path +include ../../../../scripts/make_tb_path.mk LIBRARY_NAME := io_vip diff --git a/library/vip/adi/spi_vip/Makefile b/library/vip/adi/spi_vip/Makefile index c9f7ea20..890ed530 100644 --- a/library/vip/adi/spi_vip/Makefile +++ b/library/vip/adi/spi_vip/Makefile @@ -5,7 +5,7 @@ #################################################################################### # Makeincludes -include ../../../../scripts/make_tb_path +include ../../../../scripts/make_tb_path.mk LIBRARY_NAME := adi_spi_vip diff --git a/scripts/make_tb_path b/scripts/make_tb_path.mk similarity index 79% rename from scripts/make_tb_path rename to scripts/make_tb_path.mk index 576f816a..61b46fd9 100644 --- a/scripts/make_tb_path +++ b/scripts/make_tb_path.mk @@ -2,8 +2,8 @@ #################################################################################### #################################################################################### -# Assumes this file is in /testbenches/scripts/make_tb_path -ADI_HDL_DIR := $(subst /testbenches/scripts/make_tb_path,,$(abspath $(lastword $(MAKEFILE_LIST)))) +# Assumes this file is in /testbenches/scripts/make_tb_path.mk +ADI_HDL_DIR := $(subst /testbenches/scripts/make_tb_path.mk,,$(abspath $(lastword $(MAKEFILE_LIST)))) HDL_LIBRARY_PATH := $(ADI_HDL_DIR)/library/ ADI_TB_DIR := $(ADI_HDL_DIR)/testbenches/ TB_LIBRARY_PATH := $(ADI_TB_DIR)/library/ diff --git a/scripts/project-sim.mk b/scripts/project-sim.mk index c6a5e524..228a3710 100644 --- a/scripts/project-sim.mk +++ b/scripts/project-sim.mk @@ -4,7 +4,7 @@ #################################################################################### #################################################################################### -include $(ADI_TB_DIR)/library/includes/Makeinclude_common +include $(ADI_TB_DIR)/library/includes/Makeinclude_common.mk include $(ADI_HDL_DIR)/quiet.mk diff --git a/testbenches/ip/axi_tdd/Makefile b/testbenches/ip/axi_tdd/Makefile index 69a24be9..074e4aa1 100644 --- a/testbenches/ip/axi_tdd/Makefile +++ b/testbenches/ip/axi_tdd/Makefile @@ -5,9 +5,9 @@ #################################################################################### # Makeincludes -include ../../../scripts/make_tb_path -#include $(TB_LIBRARY_PATH)/includes/Makeinclude_common -include $(TB_LIBRARY_PATH)/includes/Makeinclude_tdd +include ../../../scripts/make_tb_path.mk +#include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_tdd.mk # Remaining test-bench dependencies except test programs LIB_DEPS += axi_tdd diff --git a/testbenches/ip/axis_sequencers/Makefile b/testbenches/ip/axis_sequencers/Makefile index 6d82e53c..0319e0db 100644 --- a/testbenches/ip/axis_sequencers/Makefile +++ b/testbenches/ip/axis_sequencers/Makefile @@ -5,9 +5,9 @@ #################################################################################### # Makeincludes -include ../../../scripts/make_tb_path -include $(TB_LIBRARY_PATH)/includes/Makeinclude_common -include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk # Remaining test-bench dependencies except test programs SV_DEPS += environment.sv diff --git a/testbenches/ip/base/Makefile b/testbenches/ip/base/Makefile index 5a696fde..6c2e0bea 100644 --- a/testbenches/ip/base/Makefile +++ b/testbenches/ip/base/Makefile @@ -5,8 +5,8 @@ #################################################################################### # Makeincludes -include ../../../scripts/make_tb_path -include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk # Remaining test-bench dependencies except test programs SV_DEPS += environment.sv diff --git a/testbenches/ip/data_offload/Makefile b/testbenches/ip/data_offload/Makefile index 1b375552..7770fc41 100644 --- a/testbenches/ip/data_offload/Makefile +++ b/testbenches/ip/data_offload/Makefile @@ -5,9 +5,9 @@ #################################################################################### # Makeincludes -include ../../../scripts/make_tb_path -include $(TB_LIBRARY_PATH)/includes/Makeinclude_common -include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk # Remaining test-bench dependencies except test programs SV_DEPS += do_scoreboard.sv diff --git a/testbenches/ip/data_offload_2/Makefile b/testbenches/ip/data_offload_2/Makefile index 407382a2..08279063 100644 --- a/testbenches/ip/data_offload_2/Makefile +++ b/testbenches/ip/data_offload_2/Makefile @@ -5,9 +5,9 @@ #################################################################################### # Makeincludes -include ../../../scripts/make_tb_path -include $(TB_LIBRARY_PATH)/includes/Makeinclude_common -include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk # Remaining test-bench dependencies except test programs SV_DEPS += do_scoreboard.sv diff --git a/testbenches/ip/dma_flock/Makefile b/testbenches/ip/dma_flock/Makefile index bd121142..1b2d59ce 100644 --- a/testbenches/ip/dma_flock/Makefile +++ b/testbenches/ip/dma_flock/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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_axis +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk # All test-bench dependencies except test programs SV_DEPS += environment.sv diff --git a/testbenches/ip/dma_loopback/Makefile b/testbenches/ip/dma_loopback/Makefile index 2035acf3..3b461f72 100644 --- a/testbenches/ip/dma_loopback/Makefile +++ b/testbenches/ip/dma_loopback/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk # Remaining test-bench dependencies except test programs LIB_DEPS += axi_dmac diff --git a/testbenches/ip/dma_sg/Makefile b/testbenches/ip/dma_sg/Makefile index a132b991..b3ff2a00 100644 --- a/testbenches/ip/dma_sg/Makefile +++ b/testbenches/ip/dma_sg/Makefile @@ -3,10 +3,10 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk # Remaining test-bench dependencies except test programs LIB_DEPS += axi_dmac diff --git a/testbenches/ip/hbm/Makefile b/testbenches/ip/hbm/Makefile index c9925f88..956fb144 100644 --- a/testbenches/ip/hbm/Makefile +++ b/testbenches/ip/hbm/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk # Remaining test-bench dependencies except test programs LIB_DEPS += axi_dmac diff --git a/testbenches/ip/i3c_controller/Makefile b/testbenches/ip/i3c_controller/Makefile index 68018a64..a02a0a8d 100755 --- a/testbenches/ip/i3c_controller/Makefile +++ b/testbenches/ip/i3c_controller/Makefile @@ -5,8 +5,8 @@ #################################################################################### # Makeincludes -include ../../../scripts/make_tb_path -include $(TB_LIBRARY_PATH)/includes/Makeinclude_common +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk # Remaining test-bench dependencies except test programs ENV_DEPS += $(HDL_LIBRARY_PATH)/util_cdc/sync_bits.v diff --git a/testbenches/ip/jesd_loopback/Makefile b/testbenches/ip/jesd_loopback/Makefile index 54769975..197b3f07 100644 --- a/testbenches/ip/jesd_loopback/Makefile +++ b/testbenches/ip/jesd_loopback/Makefile @@ -5,11 +5,11 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/ip/jesd_loopback_64b/Makefile b/testbenches/ip/jesd_loopback_64b/Makefile index 54769975..197b3f07 100644 --- a/testbenches/ip/jesd_loopback_64b/Makefile +++ b/testbenches/ip/jesd_loopback_64b/Makefile @@ -5,11 +5,11 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/ip/scoreboard/Makefile b/testbenches/ip/scoreboard/Makefile index b39c1825..b8505a2d 100644 --- a/testbenches/ip/scoreboard/Makefile +++ b/testbenches/ip/scoreboard/Makefile @@ -5,12 +5,12 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_scoreboard.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_data_offload.mk # Remaining test-bench dependencies except test programs SV_DEPS += environment.sv diff --git a/testbenches/ip/spi_engine/Makefile b/testbenches/ip/spi_engine/Makefile index 4df07862..629aab2d 100644 --- a/testbenches/ip/spi_engine/Makefile +++ b/testbenches/ip/spi_engine/Makefile @@ -5,11 +5,11 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv diff --git a/testbenches/ip/util_pack/Makefile b/testbenches/ip/util_pack/Makefile index 9759f10d..34d6d9ed 100644 --- a/testbenches/ip/util_pack/Makefile +++ b/testbenches/ip/util_pack/Makefile @@ -5,11 +5,11 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_axis.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_scoreboard.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk # Remaining test-bench dependencies except test programs SV_DEPS += environment.sv diff --git a/testbenches/project/ad463x/Makefile b/testbenches/project/ad463x/Makefile index 25400f0b..ba422b1e 100644 --- a/testbenches/project/ad463x/Makefile +++ b/testbenches/project/ad463x/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv diff --git a/testbenches/project/ad57xx/Makefile b/testbenches/project/ad57xx/Makefile index 750b9813..45db572c 100644 --- a/testbenches/project/ad57xx/Makefile +++ b/testbenches/project/ad57xx/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv diff --git a/testbenches/project/ad738x/Makefile b/testbenches/project/ad738x/Makefile index 2b415298..a15dd306 100644 --- a/testbenches/project/ad738x/Makefile +++ b/testbenches/project/ad738x/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv diff --git a/testbenches/project/ad7606x/Makefile b/testbenches/project/ad7606x/Makefile index 3cbf59b5..879ba8d2 100755 --- a/testbenches/project/ad7606x/Makefile +++ b/testbenches/project/ad7606x/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_adc_pkg.sv diff --git a/testbenches/project/ad7616/Makefile b/testbenches/project/ad7616/Makefile index 0d66044d..f9e4de96 100755 --- a/testbenches/project/ad7616/Makefile +++ b/testbenches/project/ad7616/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_axi_ad7616_pkg.sv diff --git a/testbenches/project/ad9083/Makefile b/testbenches/project/ad9083/Makefile index 2cc8cd38..79078678 100644 --- a/testbenches/project/ad9083/Makefile +++ b/testbenches/project/ad9083/Makefile @@ -5,11 +5,11 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr.mk # Remaining test-bench dependencies except test programs # Missing things diff --git a/testbenches/project/ad_quadmxfe1_ebz/Makefile b/testbenches/project/ad_quadmxfe1_ebz/Makefile index 66d07d7b..9e9d4915 100644 --- a/testbenches/project/ad_quadmxfe1_ebz/Makefile +++ b/testbenches/project/ad_quadmxfe1_ebz/Makefile @@ -5,11 +5,11 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/project/adrv9001/Makefile b/testbenches/project/adrv9001/Makefile index 853eadf8..c17fe47d 100644 --- a/testbenches/project/adrv9001/Makefile +++ b/testbenches/project/adrv9001/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/project/adrv9009/Makefile b/testbenches/project/adrv9009/Makefile index b644f5f0..f11e8b86 100755 --- a/testbenches/project/adrv9009/Makefile +++ b/testbenches/project/adrv9009/Makefile @@ -5,11 +5,11 @@ #################################################################################### # 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 ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/project/fmcomms2/Makefile b/testbenches/project/fmcomms2/Makefile index b22130e9..7e64b79b 100644 --- a/testbenches/project/fmcomms2/Makefile +++ b/testbenches/project/fmcomms2/Makefile @@ -5,9 +5,9 @@ #################################################################################### # Makeincludes -include ../../../scripts/make_tb_path -include $(TB_LIBRARY_PATH)/includes/Makeinclude_common -include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/project/mxfe/Makefile b/testbenches/project/mxfe/Makefile index 4f226929..1af65b08 100644 --- a/testbenches/project/mxfe/Makefile +++ b/testbenches/project/mxfe/Makefile @@ -5,12 +5,12 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_jesd.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_xcvr.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_tdd.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/project/pluto/Makefile b/testbenches/project/pluto/Makefile index fc138af5..d1785618 100644 --- a/testbenches/project/pluto/Makefile +++ b/testbenches/project/pluto/Makefile @@ -3,10 +3,10 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_tdd.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_dac_pkg.sv diff --git a/testbenches/project/pulsar_adc_pmdz/Makefile b/testbenches/project/pulsar_adc_pmdz/Makefile index 57a84967..ffaeb4e1 100755 --- a/testbenches/project/pulsar_adc_pmdz/Makefile +++ b/testbenches/project/pulsar_adc_pmdz/Makefile @@ -5,10 +5,10 @@ #################################################################################### # 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 +include ../../../scripts/make_tb_path.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_common.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_dmac.mk +include $(TB_LIBRARY_PATH)/includes/Makeinclude_spi_engine.mk # Remaining test-bench dependencies except test programs SV_DEPS += $(TB_LIBRARY_PATH)/regmaps/adi_regmap_clkgen_pkg.sv From 37a5a5ff979a7b43cf34c422164417ef29709ea0 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Fri, 29 Nov 2024 11:19:54 +0200 Subject: [PATCH 6/7] make_tb_path: Updated pathing to use environment variables Signed-off-by: Istvan-Zsolt Szekely --- scripts/make_tb_path.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/make_tb_path.mk b/scripts/make_tb_path.mk index 61b46fd9..9f0c5fe4 100644 --- a/scripts/make_tb_path.mk +++ b/scripts/make_tb_path.mk @@ -3,7 +3,7 @@ #################################################################################### # Assumes this file is in /testbenches/scripts/make_tb_path.mk -ADI_HDL_DIR := $(subst /testbenches/scripts/make_tb_path.mk,,$(abspath $(lastword $(MAKEFILE_LIST)))) +ADI_HDL_DIR := ${ADI_HDL_DIR} HDL_LIBRARY_PATH := $(ADI_HDL_DIR)/library/ -ADI_TB_DIR := $(ADI_HDL_DIR)/testbenches/ +ADI_TB_DIR := ${ADI_TB_DIR} TB_LIBRARY_PATH := $(ADI_TB_DIR)/library/ From 24f7be68ccf26c16f0a34023183962bb13da75b8 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Mon, 2 Dec 2024 09:52:38 +0200 Subject: [PATCH 7/7] includes: Updated requirements for build in docs Signed-off-by: Istvan-Zsolt Szekely --- docs/user_guide/build_tb.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/user_guide/build_tb.rst b/docs/user_guide/build_tb.rst index 0e615611..43316fdf 100644 --- a/docs/user_guide/build_tb.rst +++ b/docs/user_guide/build_tb.rst @@ -60,8 +60,12 @@ Building a test bench .. caution:: - Before building any test bench, you must have the environment prepared and the - proper tools. + Before building any test bench, you must have the environment prepared each + time a new terminal session is started: + + #. Set the HDL repository path with ``export ADI_HDL_DIR=``. + + #. Set the Testbenches repository path with ``export ADI_TB_DIR=``. The way of building a test bench in Cygwin and WSL is almost the same. In this example, it is building the **AD7616** test bench.