Skip to content

Commit

Permalink
includes: Updated testbench files
Browse files Browse the repository at this point in the history
Signed-off-by: Istvan-Zsolt Szekely <[email protected]>
  • Loading branch information
IstvanZsSzekely committed Nov 19, 2024
1 parent e11bcf4 commit b8575ce
Show file tree
Hide file tree
Showing 83 changed files with 493 additions and 1,269 deletions.
24 changes: 6 additions & 18 deletions testbenches/ip/axi_tdd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 :
#
Expand Down
2 changes: 0 additions & 2 deletions testbenches/ip/axi_tdd/system_bd.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
# ***************************************************************************
# ***************************************************************************

source ../../../../scripts/adi_env.tcl

# Device clk
ad_ip_instance clk_vip device_clk_vip [ list \
INTERFACE_MODE {MASTER} \
Expand Down
19 changes: 4 additions & 15 deletions testbenches/ip/axi_tdd/system_project.tcl
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
26 changes: 7 additions & 19 deletions testbenches/ip/axis_sequencers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 :
#
Expand Down
4 changes: 0 additions & 4 deletions testbenches/ip/axis_sequencers/system_bd.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
22 changes: 5 additions & 17 deletions testbenches/ip/axis_sequencers/system_project.tcl
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
28 changes: 6 additions & 22 deletions testbenches/ip/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 :
#
Expand Down
5 changes: 0 additions & 5 deletions testbenches/ip/base/environment.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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)::*;
Expand Down
4 changes: 0 additions & 4 deletions testbenches/ip/base/system_bd.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@
# ***************************************************************************
# ***************************************************************************

global ad_hdl_dir

source ../../../../scripts/adi_env.tcl

global ad_project_params
24 changes: 3 additions & 21 deletions testbenches/ip/base/system_project.tcl
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -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]

1 change: 0 additions & 1 deletion testbenches/ip/base/tests/test_program.sv
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
`include "utils.svh"

import axi_vip_pkg::*;
import axi4stream_vip_pkg::*;
import logger_pkg::*;
import environment_pkg::*;

Expand Down
23 changes: 7 additions & 16 deletions testbenches/ip/data_offload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -41,7 +32,7 @@ $(warning $(CFG_FILES))
# Format is: <configuration>:<test name>
TESTS := $(foreach cfg, $(basename $(CFG_FILES)), $(cfg):$(TP))

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

####################################################################################
####################################################################################
4 changes: 1 addition & 3 deletions testbenches/ip/data_offload/system_bd.tcl
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
18 changes: 5 additions & 13 deletions testbenches/ip/data_offload/system_project.tcl
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit b8575ce

Please sign in to comment.