diff --git a/testbenches/ip/dma_flock/environment.sv b/testbenches/ip/dma_flock/environment.sv index 2d581701..cdf0ff9d 100644 --- a/testbenches/ip/dma_flock/environment.sv +++ b/testbenches/ip/dma_flock/environment.sv @@ -72,6 +72,8 @@ package environment_pkg; // Constructor //============================================================================ function new( + input string name, + virtual interface clk_vip_if #(.C_CLK_CLOCK_PERIOD(10)) sys_clk_vip_if, virtual interface clk_vip_if #(.C_CLK_CLOCK_PERIOD(5)) dma_clk_vip_if, virtual interface clk_vip_if #(.C_CLK_CLOCK_PERIOD(2.5)) ddr_clk_vip_if, @@ -83,7 +85,8 @@ package environment_pkg; virtual interface axi4stream_vip_if #(`AXIS_VIP_IF_PARAMS(test_harness, src_axis_vip)) src_axis_vip_if, virtual interface axi4stream_vip_if #(`AXIS_VIP_IF_PARAMS(test_harness, dst_axis_vip)) dst_axis_vip_if ); - super.new(sys_clk_vip_if, + super.new(name, + sys_clk_vip_if, dma_clk_vip_if, ddr_clk_vip_if, sys_rst_vip_if, @@ -95,10 +98,10 @@ package environment_pkg; dst_axis_agent = new("Dest AXI stream agent", dst_axis_vip_if); // Creating the sequencers - src_axis_seq = new(src_axis_agent); - dst_axis_seq = new(dst_axis_agent); + src_axis_seq = new("Src AXI stream sequencer", src_axis_agent, this); + dst_axis_seq = new("Dest AXI stream sequencer", dst_axis_agent, this); - scrb = new; + scrb = new("Scoreboard", this); endfunction diff --git a/testbenches/ip/dma_flock/scoreboard.sv b/testbenches/ip/dma_flock/scoreboard.sv index 44c1a63a..e728d0d0 100644 --- a/testbenches/ip/dma_flock/scoreboard.sv +++ b/testbenches/ip/dma_flock/scoreboard.sv @@ -42,14 +42,18 @@ package scoreboard_pkg; import axi_vip_pkg::*; import logger_pkg::*; - class scoreboard; + class scoreboard extends adi_component; // List of analysis ports from the monitors xil_analysis_port #(axi4stream_monitor_transaction) src_axis_ap; xil_analysis_port #(axi4stream_monitor_transaction) dst_axis_ap; protected event shutdown_event; - function new(); + function new( + input string name, + input adi_component parent = null); + + super.new(name, parent); endfunction: new function void connect( @@ -99,9 +103,9 @@ package scoreboard_pkg; if (received_tuser == 1) begin frame_count = data_beat[7:0]; if (frame_count < prev_frame_count) - `ERROR(("Frame count out of order. Expected at least: 0x%h ; Found : 0x%h", prev_frame_count, frame_count)); + this.error($sformatf("Frame count out of order. Expected at least: 0x%h ; Found : 0x%h", prev_frame_count, frame_count)); else - `INFO(("Received frame 0x%0h ", frame_count)); + this.info($sformatf("Received frame 0x%0h ", frame_count), ADI_VERBOSITY_MEDIUM); prev_frame_count = frame_count; end // Compare data against the frame counter; all pixels from frame @@ -110,9 +114,9 @@ package scoreboard_pkg; expected_byte = frame_count; received_byte = data_beat[i*8+:8]; if (expected_byte !== received_byte) - `ERROR(("Data mismatch. Expected : 0x%h ; Found : 0x%h", expected_byte, received_byte)); + this.error($sformatf("Data mismatch. Expected : 0x%h ; Found : 0x%h", expected_byte, received_byte)); else - `INFOV(("Received byte 0x%h ", received_byte), 99); + this.info($sformatf("Received byte 0x%h ", received_byte), ADI_VERBOSITY_MEDIUM); end end endtask : run_dst diff --git a/testbenches/ip/dma_flock/tests/test_program.sv b/testbenches/ip/dma_flock/tests/test_program.sv index 7988d1eb..18347e63 100644 --- a/testbenches/ip/dma_flock/tests/test_program.sv +++ b/testbenches/ip/dma_flock/tests/test_program.sv @@ -58,7 +58,8 @@ program test_program; initial begin //creating environment - env = new(`TH.`SYS_CLK.inst.IF, + env = new("DMA Flock environment", + `TH.`SYS_CLK.inst.IF, `TH.`DMA_CLK.inst.IF, `TH.`DDR_CLK.inst.IF, `TH.`SYS_RST.inst.IF, @@ -73,7 +74,7 @@ program test_program; has_sfsync = `M_DMA_CFG_USE_EXT_SYNC; has_dfsync = `S_DMA_CFG_USE_EXT_SYNC; - setLoggerVerbosity(6); + setLoggerVerbosity(ADI_VERBOSITY_NONE); env.start(); start_clocks(); env.sys_reset(); @@ -117,7 +118,7 @@ program test_program; stop_clocks(); env.stop(); - `INFO(("Testbench done!")); + `INFO(("Testbench done!"), ADI_VERBOSITY_NONE); $finish(); end @@ -150,7 +151,7 @@ program test_program; length == 1024; ylength == 8; dst_stride == length; }; - if (rand_succ == 0) `ERROR(("randomization failed")); + if (rand_succ == 0) `FATAL(("randomization failed")); m_seg.flock_framenum = flock_framenum; m_seg.flock_distance = flock_distance; diff --git a/testbenches/ip/dma_flock/tests/test_program_frame_delay.sv b/testbenches/ip/dma_flock/tests/test_program_frame_delay.sv index 3e16f9f3..f91b0498 100644 --- a/testbenches/ip/dma_flock/tests/test_program_frame_delay.sv +++ b/testbenches/ip/dma_flock/tests/test_program_frame_delay.sv @@ -60,7 +60,8 @@ program test_program_frame_delay; initial begin //creating environment - env = new(`TH.`SYS_CLK.inst.IF, + env = new("DMA Flock environment", + `TH.`SYS_CLK.inst.IF, `TH.`DMA_CLK.inst.IF, `TH.`DDR_CLK.inst.IF, `TH.`SYS_RST.inst.IF, @@ -77,7 +78,7 @@ program test_program_frame_delay; has_m_autorun = `M_DMA_CFG_AUTORUN; has_s_autorun = `S_DMA_CFG_AUTORUN; - setLoggerVerbosity(6); + setLoggerVerbosity(ADI_VERBOSITY_NONE); env.start(); start_clocks(); env.sys_reset(); @@ -146,7 +147,7 @@ program test_program_frame_delay; stop_clocks(); env.stop(); - `INFO(("Testbench done!")); + `INFO(("Testbench done!"), ADI_VERBOSITY_NONE); $finish(); end