diff --git a/Changes b/Changes index 23f12f353..90a982632 100644 --- a/Changes +++ b/Changes @@ -36,6 +36,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix creating implicit variables for expressions, bug196. [Byron Bradley] +**** Fix tracing with --pins-bv 1, bug195. [Michael S] + **** Fix MinGW compilation, bug184. [by Shankar Giri] **** Fix `define argument mis-replacing system task of same name, bug191. diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index c137c348f..95979310c 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -1989,7 +1989,7 @@ class EmitCTrace : EmitCStmts { + ((arrayindex<0) ? 0 : (arrayindex*nodep->declp()->widthWords())))); puts(","); emitTraceValue(nodep, arrayindex); - if (nodep->declp()->msbEndianed() || nodep->declp()->lsbEndianed()) { + if (nodep->declp()->msbEndianed() || nodep->declp()->lsbEndianed() || emitTraceIsScBv(nodep)) { puts(","+cvtToStr(nodep->declp()->widthMin())); } puts(");\n"); diff --git a/test_regress/t/t_var_pins_sc1.pl b/test_regress/t/t_var_pins_sc1.pl index 005661fa3..4c2b488e4 100755 --- a/test_regress/t/t_var_pins_sc1.pl +++ b/test_regress/t/t_var_pins_sc1.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_var_pinsizes.v"); compile ( - v_flags2 => ["-sp -pins-bv 1 --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + v_flags2 => ["-sp -pins-bv 1 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], make_main => 0, ) if $Self->{v3}; @@ -30,5 +30,7 @@ if ($Self->{v3}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.sp", qr/sc_out\s> \s+ o65;/x); } +execute(); + ok(1); 1; diff --git a/test_regress/t/t_var_pins_sc2.pl b/test_regress/t/t_var_pins_sc2.pl index cd870c081..36624e1b8 100755 --- a/test_regress/t/t_var_pins_sc2.pl +++ b/test_regress/t/t_var_pins_sc2.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_var_pinsizes.v"); compile ( - v_flags2 => ["-sp -pins-bv 2 --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + v_flags2 => ["-sp -pins-bv 2 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], make_main => 0, ) if $Self->{v3}; @@ -30,5 +30,7 @@ if ($Self->{v3}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.sp", qr/sc_out\s> \s+ o65;/x); } +execute(); + ok(1); 1; diff --git a/test_regress/t/t_var_pins_sc32.pl b/test_regress/t/t_var_pins_sc32.pl index f4eefe593..c65cdc125 100755 --- a/test_regress/t/t_var_pins_sc32.pl +++ b/test_regress/t/t_var_pins_sc32.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_var_pinsizes.v"); compile ( - v_flags2 => ["-sp -no-pins64 --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + v_flags2 => ["-sp -no-pins64 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], make_main => 0, ) if $Self->{v3}; @@ -30,5 +30,7 @@ if ($Self->{v3}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.sp", qr/sc_out\s> \s+ o65;/x); } +execute(); + ok(1); 1; diff --git a/test_regress/t/t_var_pins_sc64.pl b/test_regress/t/t_var_pins_sc64.pl index 39fe3e83d..a22da2328 100755 --- a/test_regress/t/t_var_pins_sc64.pl +++ b/test_regress/t/t_var_pins_sc64.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_var_pinsizes.v"); compile ( - v_flags2 => ["-sp -pins64 --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + v_flags2 => ["-sp -pins64 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], make_main => 0, ) if $Self->{v3}; @@ -30,5 +30,7 @@ if ($Self->{v3}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.sp", qr/sc_out\s> \s+ o65;/x); } +execute(); + ok(1); 1; diff --git a/test_regress/t/t_var_pins_scui.pl b/test_regress/t/t_var_pins_scui.pl index 0da7d2519..0958273f1 100755 --- a/test_regress/t/t_var_pins_scui.pl +++ b/test_regress/t/t_var_pins_scui.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_var_pinsizes.v"); compile ( - v_flags2 => ["--trace -sp -pins-uint8 --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + v_flags2 => ["-sp -pins-uint8 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], make_main => 0, ) if $Self->{v3}; @@ -30,5 +30,7 @@ if ($Self->{v3}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.sp", qr/sc_out\s> \s+ o65;/x); } +execute(); + ok(1); 1;