From 21ef11099e550ac2aa02a6f59763c65b46467cb5 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Thu, 23 Oct 2025 14:39:09 +0100 Subject: [PATCH] Tests: Fix trace file name in t_wrapper_context_fst --- test_regress/t/t_wrapper_context.v | 4 +++ .../t/t_wrapper_context__top0.dat.out | 26 +++++++++---------- .../t/t_wrapper_context__top1.dat.out | 26 +++++++++---------- test_regress/t/t_wrapper_context_fst.py | 2 +- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/test_regress/t/t_wrapper_context.v b/test_regress/t/t_wrapper_context.v index e892d6138..e0a833752 100644 --- a/test_regress/t/t_wrapper_context.v +++ b/test_regress/t/t_wrapper_context.v @@ -23,7 +23,11 @@ module top string number; string filename; number.itoa(trace_number); +`ifdef TRACE_FST + filename = {`STRINGIFY(`TEST_OBJ_DIR), "/trace", number, ".fst"}; +`else filename = {`STRINGIFY(`TEST_OBJ_DIR), "/trace", number, ".vcd"}; +`endif $display("Writing dumpfile '%s'", filename); $dumpfile(filename); $dumpvars(); diff --git a/test_regress/t/t_wrapper_context__top0.dat.out b/test_regress/t/t_wrapper_context__top0.dat.out index 734b39e8d..c12f007f4 100644 --- a/test_regress/t/t_wrapper_context__top0.dat.out +++ b/test_regress/t/t_wrapper_context__top0.dat.out @@ -135,16 +135,16 @@ C 'ft/t_wrapper_context.vl18n22ttogglepagev_toggle/topocounter[9]:0- C 'ft/t_wrapper_context.vl18n22ttogglepagev_toggle/topocounter[9]:1->0htop0.top' 0 C 'ft/t_wrapper_context.vl19n22ttogglepagev_toggle/topodone_o:0->1htop0.top' 1 C 'ft/t_wrapper_context.vl19n22ttogglepagev_toggle/topodone_o:1->0htop0.top' 0 -C 'ft/t_wrapper_context.vl22n4tlinepagev_line/topoblockS22,25-29htop0.top' 1 -C 'ft/t_wrapper_context.vl32n4tlinepagev_line/topoblockS32htop0.top' 11 -C 'ft/t_wrapper_context.vl33n7tbranchpagev_branch/topoifS33-34htop0.top' 1 -C 'ft/t_wrapper_context.vl33n8tbranchpagev_branch/topoelseS36htop0.top' 10 -C 'ft/t_wrapper_context.vl38n4tlinepagev_line/topoblockS38-39htop0.top' 34 -C 'ft/t_wrapper_context.vl40n7tbranchpagev_branch/topoifS40htop0.top' 0 -C 'ft/t_wrapper_context.vl40n8tbranchpagev_branch/topoelseS46htop0.top' 34 -C 'ft/t_wrapper_context.vl41n11tlinepagev_line/topoelsehtop0.top' 0 -C 'ft/t_wrapper_context.vl41n27texprpagev_expr/topo((counter >= 32'sh5)==0) => 0htop0.top' 0 -C 'ft/t_wrapper_context.vl41n27texprpagev_expr/topo((counter >= 32'sh5)==1 && stop==1) => 1htop0.top' 0 -C 'ft/t_wrapper_context.vl41n27texprpagev_expr/topo(stop==0) => 0htop0.top' 0 -C 'ft/t_wrapper_context.vl47n10tbranchpagev_branch/topoifS47-49htop0.top' 1 -C 'ft/t_wrapper_context.vl47n11tbranchpagev_branch/topoelsehtop0.top' 33 +C 'ft/t_wrapper_context.vl22n4tlinepagev_line/topoblockS22,25,29,31-33htop0.top' 1 +C 'ft/t_wrapper_context.vl36n4tlinepagev_line/topoblockS36htop0.top' 11 +C 'ft/t_wrapper_context.vl37n7tbranchpagev_branch/topoifS37-38htop0.top' 1 +C 'ft/t_wrapper_context.vl37n8tbranchpagev_branch/topoelseS40htop0.top' 10 +C 'ft/t_wrapper_context.vl42n4tlinepagev_line/topoblockS42-43htop0.top' 34 +C 'ft/t_wrapper_context.vl44n7tbranchpagev_branch/topoifS44htop0.top' 0 +C 'ft/t_wrapper_context.vl44n8tbranchpagev_branch/topoelseS50htop0.top' 34 +C 'ft/t_wrapper_context.vl45n11tlinepagev_line/topoelsehtop0.top' 0 +C 'ft/t_wrapper_context.vl45n27texprpagev_expr/topo((counter >= 32'sh5)==0) => 0htop0.top' 0 +C 'ft/t_wrapper_context.vl45n27texprpagev_expr/topo((counter >= 32'sh5)==1 && stop==1) => 1htop0.top' 0 +C 'ft/t_wrapper_context.vl45n27texprpagev_expr/topo(stop==0) => 0htop0.top' 0 +C 'ft/t_wrapper_context.vl51n10tbranchpagev_branch/topoifS51-53htop0.top' 1 +C 'ft/t_wrapper_context.vl51n11tbranchpagev_branch/topoelsehtop0.top' 33 diff --git a/test_regress/t/t_wrapper_context__top1.dat.out b/test_regress/t/t_wrapper_context__top1.dat.out index c4f90612a..dc2e16ccd 100644 --- a/test_regress/t/t_wrapper_context__top1.dat.out +++ b/test_regress/t/t_wrapper_context__top1.dat.out @@ -135,16 +135,16 @@ C 'ft/t_wrapper_context.vl18n22ttogglepagev_toggle/topocounter[9]:0- C 'ft/t_wrapper_context.vl18n22ttogglepagev_toggle/topocounter[9]:1->0htop1.top' 0 C 'ft/t_wrapper_context.vl19n22ttogglepagev_toggle/topodone_o:0->1htop1.top' 1 C 'ft/t_wrapper_context.vl19n22ttogglepagev_toggle/topodone_o:1->0htop1.top' 0 -C 'ft/t_wrapper_context.vl22n4tlinepagev_line/topoblockS22,25-29htop1.top' 1 -C 'ft/t_wrapper_context.vl32n4tlinepagev_line/topoblockS32htop1.top' 6 -C 'ft/t_wrapper_context.vl33n7tbranchpagev_branch/topoifS33-34htop1.top' 1 -C 'ft/t_wrapper_context.vl33n8tbranchpagev_branch/topoelseS36htop1.top' 5 -C 'ft/t_wrapper_context.vl38n4tlinepagev_line/topoblockS38-39htop1.top' 19 -C 'ft/t_wrapper_context.vl40n7tbranchpagev_branch/topoifS40htop1.top' 19 -C 'ft/t_wrapper_context.vl40n8tbranchpagev_branch/topoelseS46htop1.top' 0 -C 'ft/t_wrapper_context.vl41n11tlinepagev_line/topoelsehtop1.top' 18 -C 'ft/t_wrapper_context.vl41n27texprpagev_expr/topo((counter >= 32'sh5)==0) => 0htop1.top' 18 -C 'ft/t_wrapper_context.vl41n27texprpagev_expr/topo((counter >= 32'sh5)==1 && stop==1) => 1htop1.top' 1 -C 'ft/t_wrapper_context.vl41n27texprpagev_expr/topo(stop==0) => 0htop1.top' 0 -C 'ft/t_wrapper_context.vl47n10tbranchpagev_branch/topoifS47-49htop1.top' 0 -C 'ft/t_wrapper_context.vl47n11tbranchpagev_branch/topoelsehtop1.top' 0 +C 'ft/t_wrapper_context.vl22n4tlinepagev_line/topoblockS22,25,29,31-33htop1.top' 1 +C 'ft/t_wrapper_context.vl36n4tlinepagev_line/topoblockS36htop1.top' 6 +C 'ft/t_wrapper_context.vl37n7tbranchpagev_branch/topoifS37-38htop1.top' 1 +C 'ft/t_wrapper_context.vl37n8tbranchpagev_branch/topoelseS40htop1.top' 5 +C 'ft/t_wrapper_context.vl42n4tlinepagev_line/topoblockS42-43htop1.top' 19 +C 'ft/t_wrapper_context.vl44n7tbranchpagev_branch/topoifS44htop1.top' 19 +C 'ft/t_wrapper_context.vl44n8tbranchpagev_branch/topoelseS50htop1.top' 0 +C 'ft/t_wrapper_context.vl45n11tlinepagev_line/topoelsehtop1.top' 18 +C 'ft/t_wrapper_context.vl45n27texprpagev_expr/topo((counter >= 32'sh5)==0) => 0htop1.top' 18 +C 'ft/t_wrapper_context.vl45n27texprpagev_expr/topo((counter >= 32'sh5)==1 && stop==1) => 1htop1.top' 1 +C 'ft/t_wrapper_context.vl45n27texprpagev_expr/topo(stop==0) => 0htop1.top' 0 +C 'ft/t_wrapper_context.vl51n10tbranchpagev_branch/topoifS51-53htop1.top' 0 +C 'ft/t_wrapper_context.vl51n11tbranchpagev_branch/topoelsehtop1.top' 0 diff --git a/test_regress/t/t_wrapper_context_fst.py b/test_regress/t/t_wrapper_context_fst.py index 16290df42..414ff4ea2 100755 --- a/test_regress/t/t_wrapper_context_fst.py +++ b/test_regress/t/t_wrapper_context_fst.py @@ -17,7 +17,7 @@ test.compile( make_top_shell=False, make_main=False, # link threads library, add custom .cpp code, add tracing & coverage support - verilator_flags2=["--exe", test.pli_filename, "--trace-fst --coverage -cc"], + verilator_flags2=["--exe", test.pli_filename, "--trace-fst --coverage -cc +define+TRACE_FST"], threads=1, make_flags=['CPPFLAGS_ADD=-DVL_NO_LEGACY'])