From 70ab61e2028770aed4934ecfb953bd723965f252 Mon Sep 17 00:00:00 2001 From: Wade Fife Date: Tue, 14 May 2024 14:58:16 -0500 Subject: [PATCH] fpga: sim: Fix test_status indices in PkgTestExec Original-commit: 19a6ad3073647b0a7d98bded0a7d23133dc97945 --- sim/rfnoc/PkgTestExec.sv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sim/rfnoc/PkgTestExec.sv b/sim/rfnoc/PkgTestExec.sv index 4138fca..47e390d 100644 --- a/sim/rfnoc/PkgTestExec.sv +++ b/sim/rfnoc/PkgTestExec.sv @@ -30,7 +30,7 @@ package PkgTestExec; time start_time, end_time; // Start and end time of the testbench bit stop_on_error = 1; // Configuration option to stop when an error occurs bit done = 0; // Flag that sets when tb is finished - bit test_status[$]; // Pass/fail status of each test + logic test_status[$]; // Pass/fail of each test where index matches test number timeout_t tb_timeout; // Handle to timeout for the overall testbench timeout_t test_timeout; // Handle to timeout for current test @@ -61,7 +61,7 @@ package PkgTestExec; $display("========================================================"); this.tb_name = tb_name; start_time = $time; - test_status = {}; + test_status = { 1'bX }; // There is no test 0, so set it to X num_started = 0; num_finished = 0; num_passed = 0; @@ -148,7 +148,7 @@ package PkgTestExec; end_timeout(test_timeout); - passed = test_status[num_started-1] && test_result; + passed = test_status[num_started] && test_result; num_finished++; $display("[TEST CASE %3d] (t = %t) DONE... %s", num_started, $time, passed ? "Passed" : "FAILED");