diff --git a/dma_flock/system_project.tcl b/dma_flock/system_project.tcl deleted file mode 100644 index 892fbfbb..00000000 --- a/dma_flock/system_project.tcl +++ /dev/null @@ -1,46 +0,0 @@ -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" - exit 1 -} else { - set cfg_file [lindex $argv 0] -} - -# Read config file with cfg information -source "cfgs/${cfg_file}" - -# Set the project name -set project_name [file rootname $cfg_file] - -# Create the project -adi_sim_project_xilinx $project_name "xcvu9p-flga2104-2L-e" - -# Add test files to the project -adi_sim_project_files [list \ - "../common/sv/utils.svh" \ - "../common/sv/logger_pkg.sv" \ - "../common/sv/reg_accessor.sv" \ - "../common/sv/m_axis_sequencer.sv" \ - "../common/sv/s_axis_sequencer.sv" \ - "../common/sv/m_axi_sequencer.sv" \ - "../common/sv/s_axi_sequencer.sv" \ - "../common/sv/dmac_api.sv" \ - "../common/sv/adi_regmap_pkg.sv" \ - "../common/sv/adi_regmap_dmac_pkg.sv" \ - "../common/sv/dma_trans.sv" \ - "../common/sv/test_harness_env.sv" \ - "../common/sv/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 -adi_sim_add_define "TEST_PROGRAM=test_program" - -adi_sim_generate $project_name diff --git a/common/sv/io_vip/Makefile b/library/vip/adi/io_vip/Makefile similarity index 88% rename from common/sv/io_vip/Makefile rename to library/vip/adi/io_vip/Makefile index f0d5b812..33fb74bc 100644 --- a/common/sv/io_vip/Makefile +++ b/library/vip/adi/io_vip/Makefile @@ -11,4 +11,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 ../../../../../library/scripts/library.mk diff --git a/common/sv/io_vip/io_vip.sv b/library/vip/adi/io_vip/io_vip.sv similarity index 100% rename from common/sv/io_vip/io_vip.sv rename to library/vip/adi/io_vip/io_vip.sv diff --git a/common/sv/io_vip/io_vip_if.sv b/library/vip/adi/io_vip/io_vip_if.sv similarity index 100% rename from common/sv/io_vip/io_vip_if.sv rename to library/vip/adi/io_vip/io_vip_if.sv diff --git a/common/sv/io_vip/io_vip_ip.tcl b/library/vip/adi/io_vip/io_vip_ip.tcl similarity index 97% rename from common/sv/io_vip/io_vip_ip.tcl rename to library/vip/adi/io_vip/io_vip_ip.tcl index b72efeea..46f5fcad 100644 --- a/common/sv/io_vip/io_vip_ip.tcl +++ b/library/vip/adi/io_vip/io_vip_ip.tcl @@ -3,7 +3,7 @@ ### SPDX short identifier: ADIBSD ############################################################################### -source ../../../../scripts/adi_env.tcl +source ../../../../../scripts/adi_env.tcl source $ad_hdl_dir/library/scripts/adi_ip_xilinx.tcl adi_ip_create io_vip diff --git a/common/sv/io_vip/io_vip_pkg.ttcl b/library/vip/adi/io_vip/io_vip_pkg.ttcl similarity index 100% rename from common/sv/io_vip/io_vip_pkg.ttcl rename to library/vip/adi/io_vip/io_vip_pkg.ttcl diff --git a/dma_flock/Makefile b/testbenches/ip/dma_flock/Makefile similarity index 63% rename from dma_flock/Makefile rename to testbenches/ip/dma_flock/Makefile index c07d03e3..0d356da1 100644 --- a/dma_flock/Makefile +++ b/testbenches/ip/dma_flock/Makefile @@ -5,26 +5,28 @@ #################################################################################### # All test-bench dependencies except test programs -SV_DEPS += ../common/sv/utils.svh -SV_DEPS += ../common/sv/logger_pkg.sv -SV_DEPS += ../common/sv/reg_accessor.sv -SV_DEPS += ../common/sv/m_axis_sequencer.sv -SV_DEPS += ../common/sv/s_axis_sequencer.sv -SV_DEPS += ../common/sv/m_axi_sequencer.sv -SV_DEPS += ../common/sv/s_axi_sequencer.sv -SV_DEPS += ../common/sv/dmac_api.sv -SV_DEPS += ../common/sv/adi_regmap_pkg.sv -SV_DEPS += ../common/sv/adi_regmap_dmac_pkg.sv -SV_DEPS += ../common/sv/dma_trans.sv -SV_DEPS += ../common/sv/test_harness_env.sv +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 +ENV_DEPS +=../../../scripts/adi_sim.tcl +ENV_DEPS +=../../../scripts/run_sim.tcl LIB_DEPS := axi_dmac SIM_LIB_DEPS := io_vip @@ -45,7 +47,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 ../../../scripts/project-sim.mk # usage : # diff --git a/dma_flock/cfgs/cfg1.tcl b/testbenches/ip/dma_flock/cfgs/cfg1.tcl similarity index 100% rename from dma_flock/cfgs/cfg1.tcl rename to testbenches/ip/dma_flock/cfgs/cfg1.tcl diff --git a/dma_flock/cfgs/cfg2_fsync.tcl b/testbenches/ip/dma_flock/cfgs/cfg2_fsync.tcl similarity index 100% rename from dma_flock/cfgs/cfg2_fsync.tcl rename to testbenches/ip/dma_flock/cfgs/cfg2_fsync.tcl diff --git a/dma_flock/cfgs/cfg3_fsync_autorun.tcl b/testbenches/ip/dma_flock/cfgs/cfg3_fsync_autorun.tcl similarity index 100% rename from dma_flock/cfgs/cfg3_fsync_autorun.tcl rename to testbenches/ip/dma_flock/cfgs/cfg3_fsync_autorun.tcl diff --git a/dma_flock/environment.sv b/testbenches/ip/dma_flock/environment.sv similarity index 100% rename from dma_flock/environment.sv rename to testbenches/ip/dma_flock/environment.sv diff --git a/dma_flock/scoreboard.sv b/testbenches/ip/dma_flock/scoreboard.sv similarity index 99% rename from dma_flock/scoreboard.sv rename to testbenches/ip/dma_flock/scoreboard.sv index 7d03ab63..44c1a63a 100644 --- a/dma_flock/scoreboard.sv +++ b/testbenches/ip/dma_flock/scoreboard.sv @@ -34,7 +34,6 @@ // *************************************************************************** `include "utils.svh" -`include "dma_trans.sv" package scoreboard_pkg; diff --git a/dma_flock/system_bd.tcl b/testbenches/ip/dma_flock/system_bd.tcl similarity index 99% rename from dma_flock/system_bd.tcl rename to testbenches/ip/dma_flock/system_bd.tcl index 32cde5d3..6ca60ad0 100644 --- a/dma_flock/system_bd.tcl +++ b/testbenches/ip/dma_flock/system_bd.tcl @@ -33,7 +33,7 @@ # *************************************************************************** # *************************************************************************** -source ../../scripts/adi_env.tcl +source ../../../../scripts/adi_env.tcl 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 new file mode 100644 index 00000000..331c579b --- /dev/null +++ b/testbenches/ip/dma_flock/system_project.tcl @@ -0,0 +1,47 @@ +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" + exit 1 +} else { + set cfg_file [lindex $argv 0] +} + +# Read config file with cfg information +source "cfgs/${cfg_file}" + +# Set the project name +set project_name [file rootname $cfg_file] + +# Create the project +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/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 +adi_sim_add_define "TEST_PROGRAM=test_program" + +adi_sim_generate $project_name diff --git a/dma_flock/system_tb.sv b/testbenches/ip/dma_flock/system_tb.sv similarity index 100% rename from dma_flock/system_tb.sv rename to testbenches/ip/dma_flock/system_tb.sv diff --git a/dma_flock/tests/test_program.sv b/testbenches/ip/dma_flock/tests/test_program.sv similarity index 99% rename from dma_flock/tests/test_program.sv rename to testbenches/ip/dma_flock/tests/test_program.sv index 2bf9554b..a8826735 100644 --- a/dma_flock/tests/test_program.sv +++ b/testbenches/ip/dma_flock/tests/test_program.sv @@ -137,7 +137,7 @@ program test_program; ); dma_flocked_2d_segment m_seg, s_seg; int m_tid, s_tid; - int rand_succ = 0; + automatic int rand_succ = 0; axi4stream_ready_gen tready_gen; axi_ready_gen wready_gen; diff --git a/dma_flock/tests/test_program_frame_delay.sv b/testbenches/ip/dma_flock/tests/test_program_frame_delay.sv similarity index 99% rename from dma_flock/tests/test_program_frame_delay.sv rename to testbenches/ip/dma_flock/tests/test_program_frame_delay.sv index 25b30fcb..7434e5f3 100644 --- a/dma_flock/tests/test_program_frame_delay.sv +++ b/testbenches/ip/dma_flock/tests/test_program_frame_delay.sv @@ -167,7 +167,7 @@ program test_program_frame_delay; ); dma_flocked_2d_segment m_seg, s_seg; int m_tid, s_tid; - int rand_succ = 0; + automatic int rand_succ = 0; int x_length, y_length, baseaddress; axi4stream_ready_gen tready_gen; diff --git a/dma_flock/waves/cfg1.wcfg b/testbenches/ip/dma_flock/waves/cfg1.wcfg similarity index 100% rename from dma_flock/waves/cfg1.wcfg rename to testbenches/ip/dma_flock/waves/cfg1.wcfg diff --git a/dma_flock/waves/cfg2_fsync.wcfg b/testbenches/ip/dma_flock/waves/cfg2_fsync.wcfg similarity index 100% rename from dma_flock/waves/cfg2_fsync.wcfg rename to testbenches/ip/dma_flock/waves/cfg2_fsync.wcfg diff --git a/dma_flock/waves/cfg3_fsync_autorun.wcfg b/testbenches/ip/dma_flock/waves/cfg3_fsync_autorun.wcfg similarity index 100% rename from dma_flock/waves/cfg3_fsync_autorun.wcfg rename to testbenches/ip/dma_flock/waves/cfg3_fsync_autorun.wcfg