From 314c9de84514aeef7fe5d85b5cf27feb4888da74 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 24 Nov 2008 21:38:45 -0500 Subject: [PATCH] Make test_regress now places each test result in unique obj_dir --- test_regress/driver.pl | 82 ++++++++++++-------- test_regress/t/t_alw_split.pl | 4 +- test_regress/t/t_alw_splitord.pl | 4 +- test_regress/t/t_assert_basic.pl | 2 +- test_regress/t/t_assert_basic_cover.pl | 8 +- test_regress/t/t_assert_basic_fail.pl | 4 +- test_regress/t/t_assert_cover.pl | 22 +++--- test_regress/t/t_assert_synth.pl | 2 +- test_regress/t/t_assert_synth_full.pl | 2 +- test_regress/t/t_assert_synth_parallel.pl | 2 +- test_regress/t/t_case_huge.pl | 6 +- test_regress/t/t_case_huge.v | 2 - test_regress/t/t_case_huge_sub.v | 1 - test_regress/t/t_case_huge_sub2.v | 1 - test_regress/t/t_case_huge_sub3.v | 1 - test_regress/t/t_case_huge_sub4.v | 1 - test_regress/t/t_case_write1.pl | 7 +- test_regress/t/t_case_write1.v | 4 +- test_regress/t/t_case_write2.pl | 6 +- test_regress/t/t_case_write2.v | 4 +- test_regress/t/t_clk_condflop.pl | 2 +- test_regress/t/t_clk_latch.pl | 2 +- test_regress/t/t_clk_latch_edgestyle.pl | 2 +- test_regress/t/t_clk_powerdn.pl | 2 +- test_regress/t/t_delay.pl | 2 +- test_regress/t/t_delay_stmtdly_bad.pl | 2 +- test_regress/t/t_display_noopt.pl | 2 +- test_regress/t/t_display_signed_noopt.pl | 2 +- test_regress/t/t_display_time.pl | 2 +- test_regress/t/t_dist_manifest.pl | 4 +- test_regress/t/t_emit_constw.pl | 2 +- test_regress/t/t_extend_class.pl | 4 +- test_regress/t/t_flag_nomod_bad.pl | 4 +- test_regress/t/t_flag_skipidentical.pl | 8 +- test_regress/t/t_flag_topmodule.pl | 4 +- test_regress/t/t_flag_topmodule.v | 1 - test_regress/t/t_flag_topmodule_bad.pl | 4 +- test_regress/t/t_flag_topmodule_bad2.pl | 4 +- test_regress/t/t_flag_werror_bad1.pl | 4 +- test_regress/t/t_flag_werror_bad2.pl | 4 +- test_regress/t/t_func_bad2.pl | 2 +- test_regress/t/t_func_bad_width.pl | 2 +- test_regress/t/t_func_check.pl | 2 +- test_regress/t/t_func_lib.v | 1 - test_regress/t/t_func_outp.v | 1 - test_regress/t/t_func_public.pl | 2 +- test_regress/t/t_func_public_trace.pl | 2 +- test_regress/t/t_func_rand.pl | 6 +- test_regress/t/t_gate_elim.v | 1 - test_regress/t/t_gen_assign.pl | 2 +- test_regress/t/t_gen_for1.v | 1 - test_regress/t/t_gen_if.pl | 2 +- test_regress/t/t_gen_intdot.v | 3 +- test_regress/t/t_gen_intdot2.v | 3 +- test_regress/t/t_help.pl | 8 +- test_regress/t/t_inst_overwide_bad.pl | 2 +- test_regress/t/t_inst_tree_inl0_pub1.pl | 4 +- test_regress/t/t_leak.pl | 6 +- test_regress/t/t_lint_implicit.pl | 2 +- test_regress/t/t_lint_implicit_bad.pl | 2 +- test_regress/t/t_lint_inherit.v | 1 - test_regress/t/t_lint_only.pl | 6 +- test_regress/t/t_lint_restore_bad.pl | 2 +- test_regress/t/t_math_imm.v | 1 - test_regress/t/t_math_imm2.pl | 2 +- test_regress/t/t_math_imm2.v | 1 - test_regress/t/t_math_svl.pl | 4 +- test_regress/t/t_mem_multi_io_bad.pl | 2 +- test_regress/t/t_mem_multi_io_bad.v | 1 - test_regress/t/t_mem_multi_ref_bad.pl | 2 +- test_regress/t/t_mem_multi_ref_bad.v | 1 - test_regress/t/t_mem_multidim_Ox.pl | 2 +- test_regress/t/t_mem_multidim_trace.pl | 2 +- test_regress/t/t_mem_shift.pl | 4 +- test_regress/t/t_mem_slot.pl | 6 +- test_regress/t/t_mod_dup_bad.pl | 4 +- test_regress/t/t_order_clkinst.pl | 2 +- test_regress/t/t_order_doubleloop.pl | 2 +- test_regress/t/t_order_wireloop.pl | 2 +- test_regress/t/t_pp_dupdef.pl | 2 +- test_regress/t/t_pp_dupdef_bad.pl | 2 +- test_regress/t/t_pp_misdef_bad.pl | 2 +- test_regress/t/t_preproc.pl | 16 ++-- test_regress/t/t_preproc_dos.pl | 12 +-- test_regress/t/t_preproc_psl_off.pl | 6 +- test_regress/t/t_preproc_psl_on.pl | 6 +- test_regress/t/t_psl_basic.pl | 2 +- test_regress/t/t_psl_basic_cover.pl | 8 +- test_regress/t/t_select_bad_msb.pl | 2 +- test_regress/t/t_select_bad_range.pl | 2 +- test_regress/t/t_select_bad_range2.pl | 2 +- test_regress/t/t_sys_file_basic.pl | 4 +- test_regress/t/t_sys_file_basic.v | 7 +- test_regress/t/t_sys_file_scan.pl | 4 +- test_regress/t/t_sys_file_scan.v | 2 +- test_regress/t/t_sys_readmem_bad_addr.pl | 2 +- test_regress/t/t_sys_readmem_bad_digit.pl | 2 +- test_regress/t/t_sys_readmem_bad_end.pl | 2 +- test_regress/t/t_sys_readmem_bad_notfound.pl | 2 +- test_regress/t/t_trace_ena_cc.pl | 10 +-- test_regress/t/t_trace_ena_sc.pl | 6 +- test_regress/t/t_trace_ena_sp.pl | 6 +- test_regress/t/t_trace_off_cc.pl | 6 +- test_regress/t/t_trace_off_sc.pl | 6 +- test_regress/t/t_trace_off_sp.pl | 6 +- test_regress/t/t_trace_public_func.cpp | 2 +- test_regress/t/t_trace_public_func.pl | 8 +- test_regress/t/t_trace_public_sig.cpp | 2 +- test_regress/t/t_trace_public_sig.pl | 8 +- test_regress/t/t_unopt_combo_bad.pl | 4 +- test_regress/t/t_unopt_combo_isolate.pl | 4 +- test_regress/t/t_unopt_converge_print_bad.pl | 4 +- test_regress/t/t_unopt_converge_run_bad.pl | 2 +- test_regress/t/t_unopt_converge_unopt_bad.pl | 2 +- test_regress/t/t_var_bad_hide.pl | 2 +- test_regress/t/t_var_bad_rsvd.pl | 2 +- test_regress/t/t_var_escape.pl | 8 +- test_regress/t/t_var_escape.v | 2 +- test_regress/t/t_var_in_assign_bad.pl | 4 +- test_regress/t/t_var_life.pl | 6 +- test_regress/t/t_var_pins_cc.pl | 28 +++---- test_regress/t/t_var_pins_sc32.pl | 28 +++---- test_regress/t/t_var_pins_sc64.pl | 28 +++---- 123 files changed, 297 insertions(+), 301 deletions(-) mode change 100644 => 100755 test_regress/t/t_trace_ena_cc.pl diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 9709ace43..57dd3a742 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -113,6 +113,7 @@ sub one_test { my $test = new VTest(@params); $test->oprint("="x50,"\n"); unlink $test->{status_filename}; + $test->prep; $test->read; if ($test->ok) { $test->oprint("Test PASSED\n"); @@ -205,12 +206,18 @@ use Data::Dumper; use Carp; use Cwd; -use vars qw ($Last_Self); +use vars qw ($Self $Self); use strict; sub new { my $class = shift; - my $self = { + my $self = {@_}; + + $self->{name} ||= $1 if $self->{pl_filename} =~ m!.*/([^/]*)\.pl$!; + $self->{obj_dir} ||= "obj_dir/$self->{name}"; + $self->{t_dir} ||= cwd()."/t"; # Used both absolutely and under obj_dir + + $self = { name => undef, # Set below, name of this test mode => "", pl_filename => undef, # Name of .pl file to get setup from @@ -222,6 +229,7 @@ sub new { v_flags => [split(/\s+/,(" -f input.vc --debug-check" .($opt_verbose ? " +define+TEST_VERBOSE=1":"") .($opt_benchmark ? " +define+TEST_BENCHMARK=$opt_benchmark":"") + ." -Mdir $self->{obj_dir}" ))], v_flags2 => [], # Overridden in some sim files v_other_filenames => [], # After the filename so we can spec multiple files @@ -241,22 +249,22 @@ sub new { verilator_make_gcc => 1, verilated_debug => $Opt_Verilated_Debug, stdout_filename => undef, # Redirect stdout - @_}; + %$self}; bless $self, $class; - $self->{name} ||= $1 if $self->{pl_filename} =~ m!.*/([^/]*)\.pl$!; $self->{mode} ||= "vcs" if $self->{vcs}; $self->{mode} ||= "v3" if $self->{v3}; $self->{mode} ||= "nc" if $self->{nc}; $self->{VM_PREFIX} ||= "V".$self->{name}; - $self->{stats} ||= "obj_dir/V".$self->{name}."__stats.txt"; - $self->{status_filename} ||= "obj_dir/V".$self->{name}.".status"; - $self->{coverage_filename} ||= "obj_dir/V".$self->{name}."_coverage.pl"; + $self->{stats} ||= "$self->{obj_dir}/V".$self->{name}."__stats.txt"; + $self->{status_filename} ||= "$self->{obj_dir}/V".$self->{name}.".status"; + $self->{run_log_filename} ||= "$self->{obj_dir}/vl_sim.log"; + $self->{coverage_filename} ||= "$self->{obj_dir}/V".$self->{name}."_coverage.pl"; ($self->{top_filename} = $self->{pl_filename}) =~ s/\.pl$/\.v/; if (!$self->{make_top_shell}) { $self->{top_shell_filename} = $self->{top_filename}; } else { - $self->{top_shell_filename} = "obj_dir/$self->{VM_PREFIX}__top.v"; + $self->{top_shell_filename} = "$self->{obj_dir}/$self->{VM_PREFIX}__top.v"; } return $self; } @@ -287,12 +295,18 @@ sub skip { $self->{errors} ||= "Skip: ".$msg; } +sub prep { + my $self = shift; + mkdir $self->{obj_dir}; # Ok if already exists +} + sub read { my $self = shift; # Read the control file (-r $self->{pl_filename}) or return $self->error("Can't open $self->{pl_filename}\n"); - $Last_Self = $self; + $Self = $self; + $Self = $self; delete $INC{$self->{pl_filename}}; require $self->{pl_filename}; } @@ -319,7 +333,7 @@ sub read_status { # Methods invoked by tests sub compile { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); my %param = (%{$self}, @_); # Default arguments are from $self return 1 if $self->errors; $self->oprint("Compile\n"); @@ -331,7 +345,7 @@ sub compile { if ($param{vcs}) { $self->_make_top(); - $self->_run(logfile=>"obj_dir/".$self->{name}."__vcs_compile.log", + $self->_run(logfile=>"$self->{obj_dir}/vcs_compile.log", fails=>$param{fails}, cmd=>[($ENV{VERILATOR_VCS}||"vcs"), @{$param{vcs_flags}}, @@ -345,7 +359,7 @@ sub compile { } if ($param{nc}) { $self->_make_top(); - $self->_run(logfile=>"obj_dir/".$self->{name}."__nc_compile.log", + $self->_run(logfile=>"$self->{obj_dir}/nc_compile.log", fails=>$param{fails}, cmd=>[($ENV{VERILATOR_NCVERILOG}||"ncverilog"), @{$param{nc_flags}}, @@ -393,7 +407,7 @@ sub compile { return 1; } - $self->_run(logfile=>"obj_dir/".$self->{name}."__simx_compile.log", + $self->_run(logfile=>"$self->{obj_dir}/vl_compile.log", fails=>$param{fails}, expect=>$param{expect}, cmd=>\@v3args); @@ -407,8 +421,8 @@ sub compile { $self->_sp_preproc(%param); } $self->oprint("GCC\n"); - $self->_run(logfile=>"obj_dir/".$self->{name}."__simx_gcc.log", - cmd=>["cd obj_dir && ", + $self->_run(logfile=>"$self->{obj_dir}/vl_gcc.log", + cmd=>["cd $self->{obj_dir} && ", "make", "-f".getcwd()."/Makefile_obj", "VM_PREFIX=$self->{VM_PREFIX}", ($param{make_main}?"":"MAKE_MAIN=0"), @@ -421,12 +435,12 @@ sub compile { } sub execute { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); return 1 if $self->errors; my %param = (%{$self}, @_); # Default arguments are from $self $self->oprint("Run\n"); if ($param{nc}) { - $self->_run(logfile=>"obj_dir/".$self->{name}."__simnc.log", + $self->_run(logfile=>"$self->{obj_dir}/nc_sim.log", fails=>$param{fails}, cmd=>[($ENV{VERILATOR_NCVERILOG}||"ncverilog"), @{$param{ncrun_flags}}, @@ -435,7 +449,7 @@ sub execute { if ($param{vcs}) { #my $fh = IO::File->new(">simv.key") or die "%Error: $! simv.key,"; #$fh->print("quit\n"); $fh->close; - $self->_run(logfile=>"obj_dir/".$self->{name}."__simv.log", + $self->_run(logfile=>"$self->{obj_dir}/vcs_sim.log", cmd=>["./simv",], %param, expect=>undef, # vcs expect isn't the same @@ -444,8 +458,8 @@ sub execute { if ($param{v3} #&& (!$param{needs_v4} || -r "$ENV{VERILATOR_ROOT}/src/V3Gate.cpp") ) { - $self->_run(logfile=>"obj_dir/".$self->{name}."__simx.log", - cmd=>["obj_dir/$param{VM_PREFIX}", + $self->_run(logfile=>"$self->{obj_dir}/vl_sim.log", + cmd=>["$self->{obj_dir}/$param{VM_PREFIX}", ], %param, ); @@ -456,30 +470,30 @@ sub execute { # Accessors sub ok { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); $self->{ok} = $_[0] if defined $_[0]; $self->{ok} = 0 if $self->{errors}; return $self->{ok}; } sub errors { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); return $self->{errors}; } sub top_filename { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); $self->{top_filename} = shift if defined $_[0]; return $self->{top_filename}; } sub sp { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); return $self->{sp}; } sub sc { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); return $self->{sc}; } @@ -490,7 +504,7 @@ sub sc_or_sp { #---------------------------------------------------------------------- sub _run { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); my %param = (tee=>1, @_); my $command = join(' ',@{$param{cmd}}); @@ -584,7 +598,7 @@ sub _make_main { $self->_read_inputs(); - my $filename = "obj_dir/$self->{VM_PREFIX}__main.cpp"; + my $filename = "$self->{obj_dir}/$self->{VM_PREFIX}__main.cpp"; my $fh = IO::File->new(">$filename") or die "%Error: $! $filename,"; print $fh "// Test defines\n"; @@ -646,7 +660,7 @@ sub _make_main { $fh->print(" SpTraceVcdCFile* tfp = new SpTraceVcdCFile;\n"); } $fh->print(" topp->trace (tfp, 99);\n"); - $fh->print(" tfp->open (\"obj_dir/".$self->{name}."__simx.vcd\");\n"); + $fh->print(" tfp->open (\"$self->{obj_dir}/simx.vcd\");\n"); $fh->print("#endif\n"); } @@ -743,7 +757,7 @@ sub _sp_preproc { $self->_run(logfile=>"simx.log", fails=>0, - cmd=>["cd obj_dir ; sp_preproc", + cmd=>["cd $self->{obj_dir} ; sp_preproc", "--preproc", "$self->{VM_PREFIX}.sp", ]); @@ -805,7 +819,7 @@ sub files_identical { } sub vcd_identical { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); my $fn1 = shift; my $fn2 = shift; if (!-r $fn1) { $self->error("File does not exist $fn1\n"); return 0; } @@ -822,7 +836,7 @@ sub vcd_identical { } sub file_grep_not { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); my $filename = shift; my $regexp = shift; @@ -834,7 +848,7 @@ sub file_grep_not { } sub file_grep { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); my $filename = shift; my $regexp = shift; @@ -848,7 +862,7 @@ sub file_grep { my %_File_Contents_Cache; sub file_contents { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); my $filename = shift; if (!$_File_Contents_Cache{$filename}) { @@ -868,7 +882,7 @@ sub file_contents { } sub write_wholefile { - my $self = (ref $_[0]? shift : $Last_Self); + my $self = (ref $_[0]? shift : $Self); my $filename = shift; my $contents = shift; my $fh = IO::File->new(">$filename") or die "%Error: $! writing $filename,"; diff --git a/test_regress/t/t_alw_split.pl b/test_regress/t/t_alw_split.pl index 16b524d7a..877086994 100755 --- a/test_regress/t/t_alw_split.pl +++ b/test_regress/t/t_alw_split.pl @@ -10,8 +10,8 @@ compile ( v_flags2 => ["--stats"], ); -if ($Last_Self->{v3}) { - file_grep ($Last_Self->{stats}, qr/Optimizations, Split always\s+6/i); +if ($Self->{v3}) { + file_grep ($Self->{stats}, qr/Optimizations, Split always\s+6/i); } execute ( diff --git a/test_regress/t/t_alw_splitord.pl b/test_regress/t/t_alw_splitord.pl index 6238bf2b1..91ff4a7a0 100755 --- a/test_regress/t/t_alw_splitord.pl +++ b/test_regress/t/t_alw_splitord.pl @@ -10,8 +10,8 @@ compile ( v_flags2 => ["--stats"], ); -if ($Last_Self->{v3}) { - file_grep ($Last_Self->{stats}, qr/Optimizations, Split always\s+0/i); +if ($Self->{v3}) { + file_grep ($Self->{stats}, qr/Optimizations, Split always\s+0/i); } execute ( diff --git a/test_regress/t/t_assert_basic.pl b/test_regress/t/t_assert_basic.pl index 95181eb3e..4a444b956 100755 --- a/test_regress/t/t_assert_basic.pl +++ b/test_regress/t/t_assert_basic.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')], + v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')], ); execute ( diff --git a/test_regress/t/t_assert_basic_cover.pl b/test_regress/t/t_assert_basic_cover.pl index f7c908d81..ba23ecd90 100755 --- a/test_regress/t/t_assert_basic_cover.pl +++ b/test_regress/t/t_assert_basic_cover.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_assert_basic.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'--assert --sp --coverage-user':''], + v_flags2 => [$Self->{v3}?'--assert --sp --coverage-user':''], ); execute ( @@ -18,9 +18,9 @@ execute ( #Needs work print "-Info: NOT checking for coverage\n"; -#file_grep ($Last_Self->{coverage_filename}, qr/t=>'psl_cover',o=>'cover',c=>2\);/); -#file_grep ($Last_Self->{coverage_filename}, qr/DefaultClock.*,c=>1\);/); -#file_grep ($Last_Self->{coverage_filename}, qr/ToggleLogIf.*,c=>9\);/); +#file_grep ($Self->{coverage_filename}, qr/t=>'psl_cover',o=>'cover',c=>2\);/); +#file_grep ($Self->{coverage_filename}, qr/DefaultClock.*,c=>1\);/); +#file_grep ($Self->{coverage_filename}, qr/ToggleLogIf.*,c=>9\);/); ok(1); 1; diff --git a/test_regress/t/t_assert_basic_fail.pl b/test_regress/t/t_assert_basic_fail.pl index 0ef5854c6..5b330cc61 100755 --- a/test_regress/t/t_assert_basic_fail.pl +++ b/test_regress/t/t_assert_basic_fail.pl @@ -10,8 +10,8 @@ top_filename("t/t_assert_basic.v"); compile ( v_flags2 => ['+define+FAILING_ASSERTIONS', - $Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')], - fails => $Last_Self->{nc}, + $Self->{v3}?'--assert':($Self->{nc}?'+assert':'')], + fails => $Self->{nc}, ); execute ( diff --git a/test_regress/t/t_assert_cover.pl b/test_regress/t/t_assert_cover.pl index f92de1038..2cc9483b2 100755 --- a/test_regress/t/t_assert_cover.pl +++ b/test_regress/t/t_assert_cover.pl @@ -9,36 +9,36 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_assert_cover.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'--assert --sp --coverage-user':''], - nc_flags2 => ["+nccovoverwrite +nccoverage+all +nccovtest+$Last_Self->{name}"] + v_flags2 => [$Self->{v3}?'--assert --sp --coverage-user':''], + nc_flags2 => ["+nccovoverwrite +nccoverage+all +nccovtest+$Self->{name}"] ); execute ( check_finished=>1, ); -if ($Last_Self->{nc}) { - my $name = $Last_Self->{name}; - my $cf = "obj_dir/${name}__nccover.cf"; +if ($Self->{nc}) { + my $name = $Self->{name}; + my $cf = "$Self->{obj_dir}/${name}__nccover.cf"; { my $fh = IO::File->new(">$cf") or die "%Error: $! writing $cf,"; $fh->printf("report_summary -module *\n"); $fh->printf("report_detail -both -instance *\n"); - $fh->printf("report_html -both -instance * > obj_dir/${name}__nccover.html\n"); + $fh->printf("report_html -both -instance * > $Self->{obj_dir}/${name}__nccover.html\n"); $fh->close; } - $Last_Self->_run (logfile=>"obj_dir/${name}__nccover.log", + $Self->_run (logfile=>"$Self->{obj_dir}/${name}__nccover.log", tee=>0, cmd=>[($ENV{VERILATOR_ICCR}||'iccr'), "-test ${name} ${cf}"]); } -file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==4/); -file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==5/); -file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==6/); +file_grep ($Self->{run_log_filename}, qr/COVER: Cyc==4/); +file_grep ($Self->{run_log_filename}, qr/COVER: Cyc==5/); +file_grep ($Self->{run_log_filename}, qr/COVER: Cyc==6/); # Allow old Perl format dump, or new binary dump -file_grep ($Last_Self->{coverage_filename}, qr/(cyc_eq_5.*,c=>[^0]|cyc_eq_5.* [1-9][0-9]*\n)/); +file_grep ($Self->{coverage_filename}, qr/(cyc_eq_5.*,c=>[^0]|cyc_eq_5.* [1-9][0-9]*\n)/); ok(1); 1; diff --git a/test_regress/t/t_assert_synth.pl b/test_regress/t/t_assert_synth.pl index 95181eb3e..4a444b956 100755 --- a/test_regress/t/t_assert_synth.pl +++ b/test_regress/t/t_assert_synth.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')], + v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')], ); execute ( diff --git a/test_regress/t/t_assert_synth_full.pl b/test_regress/t/t_assert_synth_full.pl index a834109e0..e091a8581 100755 --- a/test_regress/t/t_assert_synth_full.pl +++ b/test_regress/t/t_assert_synth_full.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_assert_synth.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':''), + v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':''), '+define+FAILING_FULL',], ); diff --git a/test_regress/t/t_assert_synth_parallel.pl b/test_regress/t/t_assert_synth_parallel.pl index c49a1af63..0b5a7c1c0 100755 --- a/test_regress/t/t_assert_synth_parallel.pl +++ b/test_regress/t/t_assert_synth_parallel.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_assert_synth.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':''), + v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':''), '+define+FAILING_PARALLEL',], ); diff --git a/test_regress/t/t_case_huge.pl b/test_regress/t/t_case_huge.pl index 820d487a0..d4a6fa4ff 100755 --- a/test_regress/t/t_case_huge.pl +++ b/test_regress/t/t_case_huge.pl @@ -10,9 +10,9 @@ compile ( verilator_flags2 => ["--stats --profile-cfuncs"], ); -if ($Last_Self->{v3}) { - file_grep ($Last_Self->{stats}, qr/Optimizations, Tables created\s+10/i); - file_grep ($Last_Self->{stats}, qr/Optimizations, Combined CFuncs\s+10/i); +if ($Self->{v3}) { + file_grep ($Self->{stats}, qr/Optimizations, Tables created\s+10/i); + file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+10/i); } execute ( diff --git a/test_regress/t/t_case_huge.v b/test_regress/t/t_case_huge.v index 2ddc88e6d..4eeaee866 100644 --- a/test_regress/t/t_case_huge.v +++ b/test_regress/t/t_case_huge.v @@ -207,5 +207,3 @@ module t (/*AUTOARG*/ end end endmodule - - diff --git a/test_regress/t/t_case_huge_sub.v b/test_regress/t/t_case_huge_sub.v index 6d6d48e79..c0118f1c2 100644 --- a/test_regress/t/t_case_huge_sub.v +++ b/test_regress/t/t_case_huge_sub.v @@ -288,4 +288,3 @@ module t_case_huge_sub (/*AUTOARG*/ endcase end endmodule - diff --git a/test_regress/t/t_case_huge_sub2.v b/test_regress/t/t_case_huge_sub2.v index 45498013f..2dec19bbb 100644 --- a/test_regress/t/t_case_huge_sub2.v +++ b/test_regress/t/t_case_huge_sub2.v @@ -288,4 +288,3 @@ module t_case_huge_sub2 (/*AUTOARG*/ endcase end endmodule - diff --git a/test_regress/t/t_case_huge_sub3.v b/test_regress/t/t_case_huge_sub3.v index 3afb2c86d..0c6374982 100644 --- a/test_regress/t/t_case_huge_sub3.v +++ b/test_regress/t/t_case_huge_sub3.v @@ -289,4 +289,3 @@ module t_case_huge_sub3 (/*AUTOARG*/ endcase end endmodule - diff --git a/test_regress/t/t_case_huge_sub4.v b/test_regress/t/t_case_huge_sub4.v index 4f36da8a9..831995502 100644 --- a/test_regress/t/t_case_huge_sub4.v +++ b/test_regress/t/t_case_huge_sub4.v @@ -60,4 +60,3 @@ module t_case_huge_sub4 (/*AUTOARG*/ endcase end endmodule - diff --git a/test_regress/t/t_case_write1.pl b/test_regress/t/t_case_write1.pl index f7adee9c7..aa23ad89b 100755 --- a/test_regress/t/t_case_write1.pl +++ b/test_regress/t/t_case_write1.pl @@ -6,16 +6,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -$golden_out ||= "t/$Last_Self->{name}.out"; +$golden_out ||= "t/$Self->{name}.out"; compile ( - v_flags2 => [$Last_Self->{v3}?"--stats --O3 -x-assign fast":""], + v_flags2 => [$Self->{v3}?"--stats --O3 -x-assign fast":""], ); execute ( check_finished=>1, ); -ok(files_identical("obj_dir/$Last_Self->{name}_logger.log", $golden_out)); - +ok(files_identical("$Self->{obj_dir}/$Self->{name}_logger.log", $golden_out)); 1; diff --git a/test_regress/t/t_case_write1.v b/test_regress/t/t_case_write1.v index 60375f247..aa2d1d09b 100644 --- a/test_regress/t/t_case_write1.v +++ b/test_regress/t/t_case_write1.v @@ -31,8 +31,8 @@ module t (/*AUTOARG*/ crc <= {crc[62:0], crc[63]^crc[2]^crc[0]}; if (cyc==1) begin crc <= 64'h00000000_00000097; - $write("Open obj_dir/t_case_write1_logger.log\n"); - fd = $fopen("obj_dir/t_case_write1_logger.log", "w"); + $write("Open obj_dir/t_case_write1/t_case_write1_logger.log\n"); + fd = $fopen("obj_dir/t_case_write1/t_case_write1_logger.log", "w"); end if (cyc==90) begin $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_case_write2.pl b/test_regress/t/t_case_write2.pl index f7adee9c7..d3bdd1980 100755 --- a/test_regress/t/t_case_write2.pl +++ b/test_regress/t/t_case_write2.pl @@ -6,16 +6,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -$golden_out ||= "t/$Last_Self->{name}.out"; +$golden_out ||= "t/$Self->{name}.out"; compile ( - v_flags2 => [$Last_Self->{v3}?"--stats --O3 -x-assign fast":""], + v_flags2 => [$Self->{v3}?"--stats --O3 -x-assign fast":""], ); execute ( check_finished=>1, ); -ok(files_identical("obj_dir/$Last_Self->{name}_logger.log", $golden_out)); +ok(files_identical("$Self->{obj_dir}/$Self->{name}_logger.log", $golden_out)); 1; diff --git a/test_regress/t/t_case_write2.v b/test_regress/t/t_case_write2.v index 05f1adee6..9f69750f2 100644 --- a/test_regress/t/t_case_write2.v +++ b/test_regress/t/t_case_write2.v @@ -31,8 +31,8 @@ module t (/*AUTOARG*/ crc <= {crc[62:0], crc[63]^crc[2]^crc[0]}; if (cyc==1) begin crc <= 64'h00000000_00000097; - $write("Open obj_dir/t_case_write2_logger.log\n"); - fd = $fopen("obj_dir/t_case_write2_logger.log", "w"); + $write("Open obj_dir/t_case_write2/t_case_write2_logger.log\n"); + fd = $fopen("obj_dir/t_case_write2/t_case_write2_logger.log", "w"); end if (cyc==90) begin $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_clk_condflop.pl b/test_regress/t/t_clk_condflop.pl index f67e7f17a..2f43c2b82 100755 --- a/test_regress/t/t_clk_condflop.pl +++ b/test_regress/t/t_clk_condflop.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/); +my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); compile ( ); diff --git a/test_regress/t/t_clk_latch.pl b/test_regress/t/t_clk_latch.pl index f67e7f17a..2f43c2b82 100755 --- a/test_regress/t/t_clk_latch.pl +++ b/test_regress/t/t_clk_latch.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/); +my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); compile ( ); diff --git a/test_regress/t/t_clk_latch_edgestyle.pl b/test_regress/t/t_clk_latch_edgestyle.pl index add4cda02..eda40a2c6 100755 --- a/test_regress/t/t_clk_latch_edgestyle.pl +++ b/test_regress/t/t_clk_latch_edgestyle.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_clk_latch.v"); -my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/); +my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); compile ( v_flags2 => ['+define+EDGE_DETECT_STYLE'], diff --git a/test_regress/t/t_clk_powerdn.pl b/test_regress/t/t_clk_powerdn.pl index f67e7f17a..2f43c2b82 100755 --- a/test_regress/t/t_clk_powerdn.pl +++ b/test_regress/t/t_clk_powerdn.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/); +my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); compile ( ); diff --git a/test_regress/t/t_delay.pl b/test_regress/t/t_delay.pl index 224beca44..e777cd83b 100755 --- a/test_regress/t/t_delay.pl +++ b/test_regress/t/t_delay.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - v_flags2 => [$Last_Self->{v3}?'-Wno-STMTDLY':''], + v_flags2 => [$Self->{v3}?'-Wno-STMTDLY':''], ); execute ( diff --git a/test_regress/t/t_delay_stmtdly_bad.pl b/test_regress/t/t_delay_stmtdly_bad.pl index 328dcf25d..229383044 100755 --- a/test_regress/t/t_delay_stmtdly_bad.pl +++ b/test_regress/t/t_delay_stmtdly_bad.pl @@ -13,7 +13,7 @@ compile ( expect=> '%Warning-STMTDLY: t/t_delay.v:\d+: Ignoring delay on this delayed statement. .*%Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_display_noopt.pl b/test_regress/t/t_display_noopt.pl index 3ae7d5dff..34b86b7a5 100755 --- a/test_regress/t/t_display_noopt.pl +++ b/test_regress/t/t_display_noopt.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_display.v"); compile ( - v_flags2 => [$Last_Self->{v3}?"-O0":""], + v_flags2 => [$Self->{v3}?"-O0":""], ); execute ( diff --git a/test_regress/t/t_display_signed_noopt.pl b/test_regress/t/t_display_signed_noopt.pl index 72261a7c8..fc52b5cb6 100755 --- a/test_regress/t/t_display_signed_noopt.pl +++ b/test_regress/t/t_display_signed_noopt.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_display_signed.v"); compile ( - v_flags2 => [$Last_Self->{v3}?"-O0":""], + v_flags2 => [$Self->{v3}?"-O0":""], ); execute ( diff --git a/test_regress/t/t_display_time.pl b/test_regress/t/t_display_time.pl index 3dfe3cc72..779743252 100755 --- a/test_regress/t/t_display_time.pl +++ b/test_regress/t/t_display_time.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -$Last_Self->{vl_time_multiplier} = 1000; +$Self->{vl_time_multiplier} = 1000; compile ( verilator_flags2 => ['-DVL_TIME_MULTIPLER=1000'], diff --git a/test_regress/t/t_dist_manifest.pl b/test_regress/t/t_dist_manifest.pl index c5fbea7d7..486305b8d 100755 --- a/test_regress/t/t_dist_manifest.pl +++ b/test_regress/t/t_dist_manifest.pl @@ -48,9 +48,9 @@ foreach my $file (sort keys %files) { ." $file\n") if $Debug; if ($dir && !$tar && !$skip) { - $Last_Self->error("File not in manifest or MANIFEST.SKIP: $file"); + $Self->error("File not in manifest or MANIFEST.SKIP: $file"); } elsif (!$dir && $tar && !$skip) { - $Last_Self->error("File in manifest, but not directory: $file"); + $Self->error("File in manifest, but not directory: $file"); } } diff --git a/test_regress/t/t_emit_constw.pl b/test_regress/t/t_emit_constw.pl index f0a033741..d68273ba4 100755 --- a/test_regress/t/t_emit_constw.pl +++ b/test_regress/t/t_emit_constw.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - v_flags2 => [$Last_Self->{v3}?'--Ox':''], + v_flags2 => [$Self->{v3}?'--Ox':''], ); execute ( diff --git a/test_regress/t/t_extend_class.pl b/test_regress/t/t_extend_class.pl index 67b5ae4b8..9bc91e2b0 100755 --- a/test_regress/t/t_extend_class.pl +++ b/test_regress/t/t_extend_class.pl @@ -6,9 +6,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -if ($Last_Self->{v3}) { +if ($Self->{v3}) { compile ( - make_flags => 'CPPFLAGS_ADD=-I../t', + make_flags => "CPPFLAGS_ADD=-I$Self->{t_dir}", ); execute ( check_finished=>1, diff --git a/test_regress/t/t_flag_nomod_bad.pl b/test_regress/t/t_flag_nomod_bad.pl index 97ef490c5..4faae9630 100755 --- a/test_regress/t/t_flag_nomod_bad.pl +++ b/test_regress/t/t_flag_nomod_bad.pl @@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["--lint-only"], - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: No top level module found %Error: Exiting due to', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_flag_skipidentical.pl b/test_regress/t/t_flag_skipidentical.pl index 4889b1358..2cd83cd42 100755 --- a/test_regress/t/t_flag_skipidentical.pl +++ b/test_regress/t/t_flag_skipidentical.pl @@ -6,13 +6,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -if ($Last_Self->{v3}) { +if ($Self->{v3}) { compile (); - my $outfile = "obj_dir/V".$Last_Self->{name}.".cpp"; + my $outfile = "$Self->{obj_dir}/V".$Self->{name}.".cpp"; my @oldstats = stat($outfile); print "Old mtime=",$oldstats[9],"\n"; - $oldstats[9] or $Last_Self->error("No output file found: $outfile\n"); + $oldstats[9] or $Self->error("No output file found: $outfile\n"); sleep (1); # Or else it might take < 1 second to compile and see no diff. @@ -22,7 +22,7 @@ if ($Last_Self->{v3}) { print "New mtime=",$newstats[9],"\n"; ($oldstats[9] == $newstats[9]) - or $Last_Self->error("--skip-identical was ignored -- recompiled\n"); + or $Self->error("--skip-identical was ignored -- recompiled\n"); } ok(1); diff --git a/test_regress/t/t_flag_topmodule.pl b/test_regress/t/t_flag_topmodule.pl index 9441cd8b6..da2d5fe95 100755 --- a/test_regress/t/t_flag_topmodule.pl +++ b/test_regress/t/t_flag_topmodule.pl @@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["--top-module b"], - ) if $Last_Self->{v3}; + ) if $Self->{v3}; execute ( check_finished=>1, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_flag_topmodule.v b/test_regress/t/t_flag_topmodule.v index d17cfee20..9b0282d3f 100644 --- a/test_regress/t/t_flag_topmodule.v +++ b/test_regress/t/t_flag_topmodule.v @@ -28,4 +28,3 @@ module d; $finish; end endmodule - diff --git a/test_regress/t/t_flag_topmodule_bad.pl b/test_regress/t/t_flag_topmodule_bad.pl index 1c6dc54c1..f29f63419 100755 --- a/test_regress/t/t_flag_topmodule_bad.pl +++ b/test_regress/t/t_flag_topmodule_bad.pl @@ -9,13 +9,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_flag_topmodule.v"); compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, nc=>0, # Need to get it not to give the prompt expect=> '%Error-MULTITOP: t/t_flag_topmodule.v:\d+: Unsupported: Multiple top level modules: .* %Error-MULTITOP: t/t_flag_topmodule.v:\d+: Fix, or use --top-module option to select which you want. %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_flag_topmodule_bad2.pl b/test_regress/t/t_flag_topmodule_bad2.pl index 44f16f14d..c3ec6e001 100755 --- a/test_regress/t/t_flag_topmodule_bad2.pl +++ b/test_regress/t/t_flag_topmodule_bad2.pl @@ -9,13 +9,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_flag_topmodule.v"); compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, v_flags2 => ["--top-module notfound"], nc=>0, # Need to get it not to give the prompt expect=> '%Error: Specified --top-module \'notfound\' was not found in design. %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_flag_werror_bad1.pl b/test_regress/t/t_flag_werror_bad1.pl index 930cfc129..9cfef7ea5 100755 --- a/test_regress/t/t_flag_werror_bad1.pl +++ b/test_regress/t/t_flag_werror_bad1.pl @@ -10,12 +10,12 @@ top_filename("t/t_flag_werror.v"); compile ( v_flags2 => ["--lint-only"], - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Warning-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST generates 6 bits. %Warning-WIDTH: Use .* and lint_on around source to disable this message. %Error: Exiting due to', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_flag_werror_bad2.pl b/test_regress/t/t_flag_werror_bad2.pl index cc5a40cd3..d2baeb4cd 100755 --- a/test_regress/t/t_flag_werror_bad2.pl +++ b/test_regress/t/t_flag_werror_bad2.pl @@ -10,12 +10,12 @@ top_filename("t/t_flag_werror.v"); compile ( v_flags2 => ["--lint-only"], - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, verilator_flags=> [qw(-sp -Werror-WIDTH)], expect=> '%Error-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST generates 6 bits. %Error: Exiting due to', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_func_bad2.pl b/test_regress/t/t_func_bad2.pl index 87cd4d4cc..bd093d5ff 100755 --- a/test_regress/t/t_func_bad2.pl +++ b/test_regress/t/t_func_bad2.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_func_bad2.v:\d+: Unsupported: Recursive function or task call %Error: Exiting due to', diff --git a/test_regress/t/t_func_bad_width.pl b/test_regress/t/t_func_bad_width.pl index 9d7a54aab..479ab0c53 100755 --- a/test_regress/t/t_func_bad_width.pl +++ b/test_regress/t/t_func_bad_width.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["--lint-only"], - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Warning-WIDTH: t/t_func_bad_width.v:\d+: Operator FUNCREF expects 40 bits on the Function Argument, but Function Argument.s VARREF generates 39 bits. %Warning-WIDTH: Use [^\n]+ diff --git a/test_regress/t/t_func_check.pl b/test_regress/t/t_func_check.pl index 2f842ccca..fa5901a8e 100755 --- a/test_regress/t/t_func_check.pl +++ b/test_regress/t/t_func_check.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -$Last_Self->{verilated_randReset} = 1; +$Self->{verilated_randReset} = 1; compile ( ); diff --git a/test_regress/t/t_func_lib.v b/test_regress/t/t_func_lib.v index 6686d7352..cd5d55591 100644 --- a/test_regress/t/t_func_lib.v +++ b/test_regress/t/t_func_lib.v @@ -9,4 +9,3 @@ module t; $finish; end endmodule - diff --git a/test_regress/t/t_func_outp.v b/test_regress/t/t_func_outp.v index 46051ddb1..ce6a42e5c 100644 --- a/test_regress/t/t_func_outp.v +++ b/test_regress/t/t_func_outp.v @@ -92,4 +92,3 @@ module mytop ( ftest u0( a, b, clk, z ); endmodule // mytop - diff --git a/test_regress/t/t_func_public.pl b/test_regress/t/t_func_public.pl index cfb9597ad..1d878e727 100755 --- a/test_regress/t/t_func_public.pl +++ b/test_regress/t/t_func_public.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - v_flags2 => [$Last_Self->{v3}?'+define+VERILATOR_PUBLIC_TASKS':''], + v_flags2 => [$Self->{v3}?'+define+VERILATOR_PUBLIC_TASKS':''], fails => $fail, ); diff --git a/test_regress/t/t_func_public_trace.pl b/test_regress/t/t_func_public_trace.pl index 1821f9abf..e2bb4791e 100755 --- a/test_regress/t/t_func_public_trace.pl +++ b/test_regress/t/t_func_public_trace.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $pubtask = ($Last_Self->{v3} && verilator_version() =~ /\(public_tasks\)/); # TBD +my $pubtask = ($Self->{v3} && verilator_version() =~ /\(public_tasks\)/); # TBD top_filename("t/t_func_public.v"); diff --git a/test_regress/t/t_func_rand.pl b/test_regress/t/t_func_rand.pl index 6dbb66e44..d1ed9cf68 100755 --- a/test_regress/t/t_func_rand.pl +++ b/test_regress/t/t_func_rand.pl @@ -9,12 +9,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( make_top_shell => 0, make_main => 0, - v_flags2 => ["--exe t/$Last_Self->{name}.cpp"], - ) if $Last_Self->{v3}; + v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + ) if $Self->{v3}; execute ( check_finished=>1, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_gate_elim.v b/test_regress/t/t_gate_elim.v index fbb327380..2a145bea4 100644 --- a/test_regress/t/t_gate_elim.v +++ b/test_regress/t/t_gate_elim.v @@ -119,4 +119,3 @@ module te ( q <= qmid; end endmodule - diff --git a/test_regress/t/t_gen_assign.pl b/test_regress/t/t_gen_assign.pl index 8d4291d0e..b5f7814f5 100755 --- a/test_regress/t/t_gen_assign.pl +++ b/test_regress/t/t_gen_assign.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_gen_for1.v b/test_regress/t/t_gen_for1.v index 17bc0b134..469817e73 100644 --- a/test_regress/t/t_gen_for1.v +++ b/test_regress/t/t_gen_for1.v @@ -81,4 +81,3 @@ module fnxtclk (u, reset, clk, w ); end endmodule - diff --git a/test_regress/t/t_gen_if.pl b/test_regress/t/t_gen_if.pl index 062a6aa9a..05ef9312a 100755 --- a/test_regress/t/t_gen_if.pl +++ b/test_regress/t/t_gen_if.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_gen_intdot.v b/test_regress/t/t_gen_intdot.v index 1218bf9dc..ef99ae743 100644 --- a/test_regress/t/t_gen_intdot.v +++ b/test_regress/t/t_gen_intdot.v @@ -40,7 +40,7 @@ module t (/*AUTOARG*/ //`define WAVES `ifdef WAVES initial begin - $dumpfile("obj_dir/t_gen_intdot.vcd"); + $dumpfile("obj_dir/t_gen_intdot/t_gen_intdot.vcd"); $dumpvars(12, t); end `endif @@ -103,4 +103,3 @@ module Genit (clk, value, result); end endmodule - diff --git a/test_regress/t/t_gen_intdot2.v b/test_regress/t/t_gen_intdot2.v index f67053f8e..41c0f23fc 100644 --- a/test_regress/t/t_gen_intdot2.v +++ b/test_regress/t/t_gen_intdot2.v @@ -33,7 +33,7 @@ module t (/*AUTOARG*/ //`define WAVES `ifdef WAVES initial begin - $dumpfile("obj_dir/t_gen_intdot.vcd"); + $dumpfile("obj_dir/t_gen_intdot2/t_gen_intdot.vcd"); $dumpvars(12, t); end `endif @@ -162,4 +162,3 @@ module Genit ( `endif endmodule - diff --git a/test_regress/t/t_help.pl b/test_regress/t/t_help.pl index f49027604..c02c1e003 100755 --- a/test_regress/t/t_help.pl +++ b/test_regress/t/t_help.pl @@ -6,14 +6,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -$Last_Self->_run(fails=>1, +$Self->_run(fails=>1, cmd=>["perl","../bin/verilator", "--help"], - logfile=>"obj_dir/t_help.log", + logfile=>"$Self->{obj_dir}/t_help.log", tee=>0, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; -file_grep ("obj_dir/t_help.log", qr/DISTRIBUTION/i); +file_grep ("$Self->{obj_dir}/t_help.log", qr/DISTRIBUTION/i); ok(1); 1; diff --git a/test_regress/t/t_inst_overwide_bad.pl b/test_regress/t/t_inst_overwide_bad.pl index 04f982af3..0325da237 100755 --- a/test_regress/t/t_inst_overwide_bad.pl +++ b/test_regress/t/t_inst_overwide_bad.pl @@ -13,7 +13,7 @@ compile ( make_top_shell=>0, verilator_flags=> [qw(-sp)], verilator_make_gcc=>0, - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Warning-WIDTH: t/t_inst_overwide.v:\d+: Output port connection outy_w92 expects 92 bits but connection\'s VARREF generates 30 bits. %Warning-WIDTH: Use .* to disable this message. diff --git a/test_regress/t/t_inst_tree_inl0_pub1.pl b/test_regress/t/t_inst_tree_inl0_pub1.pl index f3bd1a35c..dfd34998d 100755 --- a/test_regress/t/t_inst_tree_inl0_pub1.pl +++ b/test_regress/t/t_inst_tree_inl0_pub1.pl @@ -12,8 +12,8 @@ compile ( v_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats'], ); -if ($Last_Self->{v3}) { - file_grep ($Last_Self->{stats}, qr/Optimizations, Combined CFuncs\s+16/i); +if ($Self->{v3}) { + file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+16/i); } execute ( diff --git a/test_regress/t/t_leak.pl b/test_regress/t/t_leak.pl index 333fa3e94..15b2356ed 100755 --- a/test_regress/t/t_leak.pl +++ b/test_regress/t/t_leak.pl @@ -9,11 +9,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( make_top_shell => 0, make_main => 0, - v_flags2 => ["--exe t/$Last_Self->{name}.cpp"], - ) if $Last_Self->{v3}; + v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + ) if $Self->{v3}; execute ( check_finished=>1, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_lint_implicit.pl b/test_regress/t/t_lint_implicit.pl index 0c259513c..cba4ec098 100755 --- a/test_regress/t/t_lint_implicit.pl +++ b/test_regress/t/t_lint_implicit.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["-Wno-IMPLICIT"], - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_lint_implicit_bad.pl b/test_regress/t/t_lint_implicit_bad.pl index 8975e389f..9cc555c18 100755 --- a/test_regress/t/t_lint_implicit_bad.pl +++ b/test_regress/t/t_lint_implicit_bad.pl @@ -16,7 +16,7 @@ compile ( %Warning-IMPLICIT: Use .* to disable this message. %Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: nt0 %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_lint_inherit.v b/test_regress/t/t_lint_inherit.v index 170d0b926..24757da6a 100644 --- a/test_regress/t/t_lint_inherit.v +++ b/test_regress/t/t_lint_inherit.v @@ -57,4 +57,3 @@ module m2 end endmodule - diff --git a/test_regress/t/t_lint_only.pl b/test_regress/t/t_lint_only.pl index cb18259ba..128d227a9 100755 --- a/test_regress/t/t_lint_only.pl +++ b/test_regress/t/t_lint_only.pl @@ -11,11 +11,11 @@ compile ( make_main => 0, v_flags2 => ["--lint-only"], verilator_make_gcc => 0, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; -foreach my $file (glob("obj_dir/*t_lint_only*")) { +foreach my $file (glob("$Self->{obj_dir}/*t_lint_only*")) { next if $file =~ /simx_compile.log/; # Made by driver.pl, not Verilator - $Last_Self->error("%Error: Created $file, but --lint-only shouldn't create files"); + $Self->error("%Error: Created $file, but --lint-only shouldn't create files"); } ok(1); diff --git a/test_regress/t/t_lint_restore_bad.pl b/test_regress/t/t_lint_restore_bad.pl index 7a3260d1b..9a46179ca 100755 --- a/test_regress/t/t_lint_restore_bad.pl +++ b/test_regress/t/t_lint_restore_bad.pl @@ -13,7 +13,7 @@ compile ( '.*%Warning-WIDTH: t/t_lint_restore_bad.v:\d+: Operator ASSIGN expects 5 bits on the Assign RHS, but Assign RHS\'s CONST generates 64 bits. %Warning-WIDTH: Use .* %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_math_imm.v b/test_regress/t/t_math_imm.v index 9c178ec39..709fcae81 100644 --- a/test_regress/t/t_math_imm.v +++ b/test_regress/t/t_math_imm.v @@ -111,4 +111,3 @@ module example (/*AUTOARG*/ assign LogicImm = LowLogicImm & HighLogicImm; endmodule - diff --git a/test_regress/t/t_math_imm2.pl b/test_regress/t/t_math_imm2.pl index 8ff5bdb62..0af51ad9d 100755 --- a/test_regress/t/t_math_imm2.pl +++ b/test_regress/t/t_math_imm2.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( make_top_shell => 0, make_main => 0, - v_flags2 => ["--exe t/$Last_Self->{name}.cpp"], + v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], ); execute ( diff --git a/test_regress/t/t_math_imm2.v b/test_regress/t/t_math_imm2.v index 3e31ad724..a14b9d83d 100644 --- a/test_regress/t/t_math_imm2.v +++ b/test_regress/t/t_math_imm2.v @@ -40,4 +40,3 @@ module t_math_imm2 (/*AUTOARG*/ assign LogicImm = LowLogicImm & HighLogicImm; endmodule - diff --git a/test_regress/t/t_math_svl.pl b/test_regress/t/t_math_svl.pl index 0f04c038e..25b12418d 100755 --- a/test_regress/t/t_math_svl.pl +++ b/test_regress/t/t_math_svl.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - ) if $Last_Self->{v3}; + ) if $Self->{v3}; execute ( check_finished=>1, @@ -15,7 +15,7 @@ execute ( expect=> '\*-\* All Finished \*-\* Goodbye world, at cycle \d+.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_mem_multi_io_bad.pl b/test_regress/t/t_mem_multi_io_bad.pl index 716a604b5..7eb55a7ee 100755 --- a/test_regress/t/t_mem_multi_io_bad.pl +++ b/test_regress/t/t_mem_multi_io_bad.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, nc=>0, expect=> '%Error: t/t_mem_multi_io_bad.v:\d+: Arrayed variables may not be inputs nor outputs diff --git a/test_regress/t/t_mem_multi_io_bad.v b/test_regress/t/t_mem_multi_io_bad.v index 1e651f688..a66ef1186 100644 --- a/test_regress/t/t_mem_multi_io_bad.v +++ b/test_regress/t/t_mem_multi_io_bad.v @@ -10,4 +10,3 @@ module t (/*AUTOARG*/ reg [1:0] dim1 [1:0]; output dim1; // Bad, can't output multi-dim endmodule - diff --git a/test_regress/t/t_mem_multi_ref_bad.pl b/test_regress/t/t_mem_multi_ref_bad.pl index 9fc3ad0db..abd85ef12 100755 --- a/test_regress/t/t_mem_multi_ref_bad.pl +++ b/test_regress/t/t_mem_multi_ref_bad.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, nc=>0, # Need to get it not to give the prompt expect=> '%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit select; variable already selected, or bad dimension diff --git a/test_regress/t/t_mem_multi_ref_bad.v b/test_regress/t/t_mem_multi_ref_bad.v index a9c33df26..389aefe2f 100644 --- a/test_regress/t/t_mem_multi_ref_bad.v +++ b/test_regress/t/t_mem_multi_ref_bad.v @@ -19,4 +19,3 @@ module t (/*AUTOARG*/); end endmodule - diff --git a/test_regress/t/t_mem_multidim_Ox.pl b/test_regress/t/t_mem_multidim_Ox.pl index 7b1b3214e..edaacf8a4 100755 --- a/test_regress/t/t_mem_multidim_Ox.pl +++ b/test_regress/t/t_mem_multidim_Ox.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_mem_multidim.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'--Ox':''], + v_flags2 => [$Self->{v3}?'--Ox':''], ); execute ( diff --git a/test_regress/t/t_mem_multidim_trace.pl b/test_regress/t/t_mem_multidim_trace.pl index 5b34ad9aa..6b9c21c04 100755 --- a/test_regress/t/t_mem_multidim_trace.pl +++ b/test_regress/t/t_mem_multidim_trace.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_mem_multidim.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'--sp --trace':''], + v_flags2 => [$Self->{v3}?'--sp --trace':''], ); execute ( diff --git a/test_regress/t/t_mem_shift.pl b/test_regress/t/t_mem_shift.pl index eadb9bb87..202ffdbb9 100755 --- a/test_regress/t/t_mem_shift.pl +++ b/test_regress/t/t_mem_shift.pl @@ -10,8 +10,8 @@ compile ( v_flags2 => ["--stats"], ); -if ($Last_Self->{v3}) { - file_grep ($Last_Self->{stats}, qr/Optimizations, Delayed shared-sets\s+14/i); +if ($Self->{v3}) { + file_grep ($Self->{stats}, qr/Optimizations, Delayed shared-sets\s+14/i); } execute ( diff --git a/test_regress/t/t_mem_slot.pl b/test_regress/t/t_mem_slot.pl index 333fa3e94..15b2356ed 100755 --- a/test_regress/t/t_mem_slot.pl +++ b/test_regress/t/t_mem_slot.pl @@ -9,11 +9,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( make_top_shell => 0, make_main => 0, - v_flags2 => ["--exe t/$Last_Self->{name}.cpp"], - ) if $Last_Self->{v3}; + v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + ) if $Self->{v3}; execute ( check_finished=>1, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_mod_dup_bad.pl b/test_regress/t/t_mod_dup_bad.pl index 66d47f0ae..3d8502ea4 100755 --- a/test_regress/t/t_mod_dup_bad.pl +++ b/test_regress/t/t_mod_dup_bad.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, nc=>0, # Need to get it not to give the prompt expect=> '%Error: t/t_mod_dup_bad.v:\d+: Duplicate declaration of module: a %Error: t/t_mod_dup_bad.v:\d+: ... Location of original declaration .* %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_order_clkinst.pl b/test_regress/t/t_order_clkinst.pl index f67e7f17a..2f43c2b82 100755 --- a/test_regress/t/t_order_clkinst.pl +++ b/test_regress/t/t_order_clkinst.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/); +my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); compile ( ); diff --git a/test_regress/t/t_order_doubleloop.pl b/test_regress/t/t_order_doubleloop.pl index f67e7f17a..2f43c2b82 100755 --- a/test_regress/t/t_order_doubleloop.pl +++ b/test_regress/t/t_order_doubleloop.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/); +my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); compile ( ); diff --git a/test_regress/t/t_order_wireloop.pl b/test_regress/t/t_order_wireloop.pl index c0105af60..3c1f56a1c 100755 --- a/test_regress/t/t_order_wireloop.pl +++ b/test_regress/t/t_order_wireloop.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_order_wireloop.v:\d+: Wire inputs its own output, creating circular logic .wire x=x. ', diff --git a/test_regress/t/t_pp_dupdef.pl b/test_regress/t/t_pp_dupdef.pl index 2b02e86f1..3ac408867 100755 --- a/test_regress/t/t_pp_dupdef.pl +++ b/test_regress/t/t_pp_dupdef.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["-Wno-REDEFMACRO"], - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_pp_dupdef_bad.pl b/test_regress/t/t_pp_dupdef_bad.pl index 45ced157c..d83784426 100755 --- a/test_regress/t/t_pp_dupdef_bad.pl +++ b/test_regress/t/t_pp_dupdef_bad.pl @@ -18,7 +18,7 @@ compile ( %Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Redefining existing define: DUPP, with different value: .* %Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Previous definition is here, with value: .* %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_pp_misdef_bad.pl b/test_regress/t/t_pp_misdef_bad.pl index 185557d4a..d5fb279ad 100755 --- a/test_regress/t/t_pp_misdef_bad.pl +++ b/test_regress/t/t_pp_misdef_bad.pl @@ -12,7 +12,7 @@ compile ( expect=> '%Error: t/t_pp_misdef_bad.v:\d+: Define or directive not defined: `NOTDEF %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_preproc.pl b/test_regress/t/t_preproc.pl index 93833c1b7..4c26c4f43 100755 --- a/test_regress/t/t_preproc.pl +++ b/test_regress/t/t_preproc.pl @@ -6,10 +6,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -$golden_out ||= "t/$Last_Self->{name}.out"; -my $stdout_filename = "obj_dir/$Last_Self->{name}__test.vpp"; +$golden_out ||= "t/$Self->{name}.out"; +my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; -if (!$Last_Self->{v3}) { +if (!$Self->{v3}) { ok(1); } else { compile ( @@ -17,7 +17,7 @@ if (!$Last_Self->{v3}) { verilator_make_gcc=>0, stdout_filename => $stdout_filename, ); - ok(preproc_check($Last_Self->{top_filename}, $stdout_filename) + ok(preproc_check($Self->{top_filename}, $stdout_filename) && files_identical($stdout_filename, $golden_out)); } @@ -46,14 +46,14 @@ sub preproc_check { if ($line =~ /^Line_Preproc_Check\s+(\d+)/) { my $linecmt = $1; my $check = shift @Line_Checks; - if (!$check) { $Last_Self->error("$filename2:$.: Extra Line_Preproc_Check\n"); } - if ($linecmt != $check) { $Last_Self->error("$filename2:$.: __LINE__ inserted $linecmt, exp=$check\n"); } - if ($lineno != $check) { $Last_Self->error("$filename2:$.: __LINE__ on `line $lineno, exp=$check\n"); } + if (!$check) { $Self->error("$filename2:$.: Extra Line_Preproc_Check\n"); } + if ($linecmt != $check) { $Self->error("$filename2:$.: __LINE__ inserted $linecmt, exp=$check\n"); } + if ($lineno != $check) { $Self->error("$filename2:$.: __LINE__ on `line $lineno, exp=$check\n"); } } } $fh->close; } - if ($Line_Checks[0]) { $Last_Self->error("$filename2: Missing a Line_Preproc_Check\n"); } + if ($Line_Checks[0]) { $Self->error("$filename2: Missing a Line_Preproc_Check\n"); } return 1; } diff --git a/test_regress/t/t_preproc_dos.pl b/test_regress/t/t_preproc_dos.pl index b6b3fc0ff..8ee793d61 100755 --- a/test_regress/t/t_preproc_dos.pl +++ b/test_regress/t/t_preproc_dos.pl @@ -6,21 +6,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -top_filename("obj_dir/$Last_Self->{name}.v"); +top_filename("$Self->{obj_dir}/$Self->{name}.v"); # Rather then having to maintain a new .v and .out, simply add returns # to all lines of the existing t_preproc test. -$golden_out ||= "obj_dir/$Last_Self->{name}.out"; +$golden_out ||= "$Self->{obj_dir}/$Self->{name}.out"; { - my $wholefile = file_contents("t/t_preproc.v"); + my $wholefile = file_contents("$Self->{t_dir}/t_preproc.v"); $wholefile =~ s/\n/\r\n/og; - write_wholefile("obj_dir/$Last_Self->{name}.v", $wholefile); + write_wholefile("$Self->{obj_dir}/$Self->{name}.v", $wholefile); } { - my $wholefile = file_contents("t/t_preproc.out"); - $wholefile =~ s!t/t_preproc.v!obj_dir/t_preproc_dos.v!og; # Fix `line's + my $wholefile = file_contents("$Self->{t_dir}/t_preproc.out"); + $wholefile =~ s!t/t_preproc.v!$Self->{obj_dir}/t_preproc_dos.v!og; # Fix `line's write_wholefile($golden_out, $wholefile); } diff --git a/test_regress/t/t_preproc_psl_off.pl b/test_regress/t/t_preproc_psl_off.pl index 3c4c19040..b4a6d055f 100755 --- a/test_regress/t/t_preproc_psl_off.pl +++ b/test_regress/t/t_preproc_psl_off.pl @@ -6,11 +6,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $stdout_filename = "obj_dir/$Last_Self->{name}__test.vpp"; +my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; top_filename("t/t_preproc_psl.v"); -if (!$Last_Self->{v3}) { +if (!$Self->{v3}) { ok(1); } else { compile ( @@ -18,7 +18,7 @@ if (!$Last_Self->{v3}) { verilator_make_gcc=>0, stdout_filename => $stdout_filename, ); - ok(files_identical($stdout_filename, "t/$Last_Self->{name}.out")); + ok(files_identical($stdout_filename, "t/$Self->{name}.out")); } 1; diff --git a/test_regress/t/t_preproc_psl_on.pl b/test_regress/t/t_preproc_psl_on.pl index 79ad44862..cfbd3f736 100755 --- a/test_regress/t/t_preproc_psl_on.pl +++ b/test_regress/t/t_preproc_psl_on.pl @@ -6,11 +6,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -my $stdout_filename = "obj_dir/$Last_Self->{name}__test.vpp"; +my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; top_filename("t/t_preproc_psl.v"); -if (!$Last_Self->{v3}) { +if (!$Self->{v3}) { ok(1); } else { compile ( @@ -18,7 +18,7 @@ if (!$Last_Self->{v3}) { verilator_make_gcc=>0, stdout_filename => $stdout_filename, ); - ok(files_identical($stdout_filename, "t/$Last_Self->{name}.out")); + ok(files_identical($stdout_filename, "t/$Self->{name}.out")); } 1; diff --git a/test_regress/t/t_psl_basic.pl b/test_regress/t/t_psl_basic.pl index 95181eb3e..4a444b956 100755 --- a/test_regress/t/t_psl_basic.pl +++ b/test_regress/t/t_psl_basic.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')], + v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')], ); execute ( diff --git a/test_regress/t/t_psl_basic_cover.pl b/test_regress/t/t_psl_basic_cover.pl index 020609993..2cfee0330 100755 --- a/test_regress/t/t_psl_basic_cover.pl +++ b/test_regress/t/t_psl_basic_cover.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_psl_basic.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'--psl --sp --coverage-user':''], + v_flags2 => [$Self->{v3}?'--psl --sp --coverage-user':''], ); execute ( @@ -17,9 +17,9 @@ execute ( ); # Allow old Perl format dump, or new binary dump -file_grep ($Last_Self->{coverage_filename}, qr/(,o=>'cover'.*,c=>2\)|o.cover.* 2\n)/); -file_grep ($Last_Self->{coverage_filename}, qr/(DefaultClock.*,c=>1\)|DefaultClock.* 1\n)/); -file_grep ($Last_Self->{coverage_filename}, qr/(ToggleLogIf.*,c=>9\)|ToggleLogIf.* 9\n)/); +file_grep ($Self->{coverage_filename}, qr/(,o=>'cover'.*,c=>2\)|o.cover.* 2\n)/); +file_grep ($Self->{coverage_filename}, qr/(DefaultClock.*,c=>1\)|DefaultClock.* 1\n)/); +file_grep ($Self->{coverage_filename}, qr/(ToggleLogIf.*,c=>9\)|ToggleLogIf.* 9\n)/); ok(1); 1; diff --git a/test_regress/t/t_select_bad_msb.pl b/test_regress/t/t_select_bad_msb.pl index a9aa3cba1..ada323c33 100755 --- a/test_regress/t/t_select_bad_msb.pl +++ b/test_regress/t/t_select_bad_msb.pl @@ -12,7 +12,7 @@ compile ( '%Error: t/t_select_bad_msb.v:\d+: Unsupported: MSB < LSB of bit range: 0<22 %Error: t/t_select_bad_msb.v:\d+: Unsupported: MSB < LSB of bit extract: 1<4 %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_select_bad_range.pl b/test_regress/t/t_select_bad_range.pl index 26663736d..c45401b38 100755 --- a/test_regress/t/t_select_bad_range.pl +++ b/test_regress/t/t_select_bad_range.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["--lint-only"], - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_select_bad_range.v:\d+: Selection index out of range: 44:44 outside 43:0 %Error: t/t_select_bad_range.v:\d+: Selection index out of range: 44:41 outside 43:0 diff --git a/test_regress/t/t_select_bad_range2.pl b/test_regress/t/t_select_bad_range2.pl index c4dec149c..ee4b4221b 100755 --- a/test_regress/t/t_select_bad_range2.pl +++ b/test_regress/t/t_select_bad_range2.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["--lint-only"], - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_select_bad_range2.v:\d+: Selection index out of range: 3:2 outside 1:0 %Error: Exiting due to.*', diff --git a/test_regress/t/t_sys_file_basic.pl b/test_regress/t/t_sys_file_basic.pl index ff8557f3b..7bb690b23 100755 --- a/test_regress/t/t_sys_file_basic.pl +++ b/test_regress/t/t_sys_file_basic.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -unlink("obj_dir/t_sys_file_basic_test.log"); +unlink("$Self->{obj_dir}/t_sys_file_basic_test.log"); compile ( v_flags2 => ['+incdir+../include'], @@ -16,7 +16,7 @@ execute ( check_finished=>1, ); -file_grep ("obj_dir/t_sys_file_basic_test.log", +file_grep ("$Self->{obj_dir}/t_sys_file_basic_test.log", qr/\[0\] hello v=12345667 \[0\] Hello2 /); diff --git a/test_regress/t/t_sys_file_basic.v b/test_regress/t/t_sys_file_basic.v index 00f2eaed1..aee517339 100644 --- a/test_regress/t/t_sys_file_basic.v +++ b/test_regress/t/t_sys_file_basic.v @@ -30,10 +30,10 @@ module t; `ifdef AUTOFLUSH // The "w" is required so we get a FD not a MFD - file = $fopen("obj_dir/t_sys_file_autoflush.log","w"); + file = $fopen("obj_dir/t_sys_file_basic/t_sys_file_autoflush.log","w"); `else // The "w" is required so we get a FD not a MFD - file = $fopen("obj_dir/t_sys_file_basic_test.log","w"); + file = $fopen("obj_dir/t_sys_file_basic/t_sys_file_basic_test.log","w"); `endif if ($feof(file)) $stop; @@ -49,7 +49,8 @@ module t; begin // Check for opening errors - file = $fopen("obj_dir/DOES_NOT_EXIST","r"); // The "r" is required so we get a FD not a MFD + // The "r" is required so we get a FD not a MFD + file = $fopen("obj_dir/t_sys_file_basic/DOES_NOT_EXIST","r"); if (|file) $stop; // Should not exist, IE must return 0 end diff --git a/test_regress/t/t_sys_file_scan.pl b/test_regress/t/t_sys_file_scan.pl index fdec0f569..f7de51f12 100755 --- a/test_regress/t/t_sys_file_scan.pl +++ b/test_regress/t/t_sys_file_scan.pl @@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # redistribute it and/or modify it under the terms of either the GNU # General Public License or the Perl Artistic License. -unlink("obj_dir/t_sys_file_scan_test.log"); +unlink("$Self->{obj_dir}/t_sys_file_scan_test.log"); compile ( ); @@ -15,7 +15,7 @@ execute ( check_finished=>1, ); -file_grep ("obj_dir/t_sys_file_scan_test.log", +file_grep ("$Self->{obj_dir}/t_sys_file_scan_test.log", "# a 1 "); diff --git a/test_regress/t/t_sys_file_scan.v b/test_regress/t/t_sys_file_scan.v index f86bfb7dd..79aa0073e 100644 --- a/test_regress/t/t_sys_file_scan.v +++ b/test_regress/t/t_sys_file_scan.v @@ -11,7 +11,7 @@ module t; initial begin infile = $fopen("t/t_sys_file_scan_input.dat", "r"); - outfile = $fopen("obj_dir/t_sys_file_scan_test.log", "w"); + outfile = $fopen("obj_dir/t_sys_file_scan/t_sys_file_scan_test.log", "w"); count = 1234; $display("count == %d, infile %d, outfile %d", count, infile, outfile); diff --git a/test_regress/t/t_sys_readmem_bad_addr.pl b/test_regress/t/t_sys_readmem_bad_addr.pl index 1bca74fab..d44bf2fa5 100755 --- a/test_regress/t/t_sys_readmem_bad_addr.pl +++ b/test_regress/t/t_sys_readmem_bad_addr.pl @@ -10,7 +10,7 @@ compile ( ); execute ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_sys_readmem_bad_addr.mem:\d+: \$readmem file address beyond bounds of array', ); diff --git a/test_regress/t/t_sys_readmem_bad_digit.pl b/test_regress/t/t_sys_readmem_bad_digit.pl index 14f275da9..4d7f44e6a 100755 --- a/test_regress/t/t_sys_readmem_bad_digit.pl +++ b/test_regress/t/t_sys_readmem_bad_digit.pl @@ -10,7 +10,7 @@ compile ( ); execute ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_sys_readmem_bad_digit.mem:\d+: \$readmemb \(binary\) file contains hex characters', ); diff --git a/test_regress/t/t_sys_readmem_bad_end.pl b/test_regress/t/t_sys_readmem_bad_end.pl index e7bec9aa7..e3c7b8f24 100755 --- a/test_regress/t/t_sys_readmem_bad_end.pl +++ b/test_regress/t/t_sys_readmem_bad_end.pl @@ -10,7 +10,7 @@ compile ( ); execute ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_sys_readmem_bad_end.mem:\d+: \$readmem file ended before specified ending-address', ); diff --git a/test_regress/t/t_sys_readmem_bad_notfound.pl b/test_regress/t/t_sys_readmem_bad_notfound.pl index fa22507e4..45b1669a8 100755 --- a/test_regress/t/t_sys_readmem_bad_notfound.pl +++ b/test_regress/t/t_sys_readmem_bad_notfound.pl @@ -10,7 +10,7 @@ compile ( ); execute ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_sys_readmem_bad_NOTFOUND.mem:\d+: \$readmem file not found', ); diff --git a/test_regress/t/t_trace_ena_cc.pl b/test_regress/t/t_trace_ena_cc.pl old mode 100644 new mode 100755 index b97e58951..0d625bcf4 --- a/test_regress/t/t_trace_ena_cc.pl +++ b/test_regress/t/t_trace_ena_cc.pl @@ -9,17 +9,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_ena.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'-trace':''], + v_flags2 => [$Self->{v3}?'-trace':''], ); execute ( check_finished=>1, ); -if ($Last_Self->{v3}) { - file_grep ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/c_trace_on\"/x); - file_grep_not ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/_trace_off\"/x); - file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x); +if ($Self->{v3}) { + file_grep ("$Self->{obj_dir}/V$Self->{name}__Trace__Slow.cpp", qr/c_trace_on\"/x); + file_grep_not ("$Self->{obj_dir}/V$Self->{name}__Trace__Slow.cpp", qr/_trace_off\"/x); + file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); } ok(1); diff --git a/test_regress/t/t_trace_ena_sc.pl b/test_regress/t/t_trace_ena_sc.pl index 067a7da60..841e6eeb9 100755 --- a/test_regress/t/t_trace_ena_sc.pl +++ b/test_regress/t/t_trace_ena_sc.pl @@ -9,16 +9,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_ena.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'-trace -sc':''], + v_flags2 => [$Self->{v3}?'-trace -sc':''], ); execute ( check_finished=>1, ); -if ($Last_Self->{v3}) { +if ($Self->{v3}) { # Note more checks in _cc.pl - file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x); + file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); } ok(1); diff --git a/test_regress/t/t_trace_ena_sp.pl b/test_regress/t/t_trace_ena_sp.pl index 8a27293da..9889d4b5d 100755 --- a/test_regress/t/t_trace_ena_sp.pl +++ b/test_regress/t/t_trace_ena_sp.pl @@ -9,16 +9,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_ena.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'-trace -sp':''], + v_flags2 => [$Self->{v3}?'-trace -sp':''], ); execute ( check_finished=>1, ); -if ($Last_Self->{v3}) { +if ($Self->{v3}) { # Note more checks in _cc.pl - file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x); + file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); } ok(1); diff --git a/test_regress/t/t_trace_off_cc.pl b/test_regress/t/t_trace_off_cc.pl index 32377debc..54a03a5e0 100755 --- a/test_regress/t/t_trace_off_cc.pl +++ b/test_regress/t/t_trace_off_cc.pl @@ -9,15 +9,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_ena.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'-notrace':''], + v_flags2 => [$Self->{v3}?'-notrace':''], ); execute ( check_finished=>1, ); -if ($Last_Self->{v3}) { - !-r "obj_dir/$Last_Self->{name}__simx.vcd" or $Last_Self->error("Tracing should be off\n"); +if ($Self->{v3}) { + !-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n"); } ok(1); diff --git a/test_regress/t/t_trace_off_sc.pl b/test_regress/t/t_trace_off_sc.pl index d564b6777..20ea8727f 100755 --- a/test_regress/t/t_trace_off_sc.pl +++ b/test_regress/t/t_trace_off_sc.pl @@ -9,15 +9,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_ena.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'-notrace -sc':''], + v_flags2 => [$Self->{v3}?'-notrace -sc':''], ); execute ( check_finished=>1, ); -if ($Last_Self->{v3}) { - !-r "obj_dir/$Last_Self->{name}__simx.vcd" or $Last_Self->error("Tracing should be off\n"); +if ($Self->{v3}) { + !-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n"); } ok(1); diff --git a/test_regress/t/t_trace_off_sp.pl b/test_regress/t/t_trace_off_sp.pl index b678c2c07..ce3b9afde 100755 --- a/test_regress/t/t_trace_off_sp.pl +++ b/test_regress/t/t_trace_off_sp.pl @@ -9,15 +9,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_ena.v"); compile ( - v_flags2 => [$Last_Self->{v3}?'-notrace -sp':''], + v_flags2 => [$Self->{v3}?'-notrace -sp':''], ); execute ( check_finished=>1, ); -if ($Last_Self->{v3}) { - !-r "obj_dir/$Last_Self->{name}__simx.vcd" or $Last_Self->error("Tracing should be off\n"); +if ($Self->{v3}) { + !-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n"); } ok(1); diff --git a/test_regress/t/t_trace_public_func.cpp b/test_regress/t/t_trace_public_func.cpp index 77e372a4a..cd184e5d4 100644 --- a/test_regress/t/t_trace_public_func.cpp +++ b/test_regress/t/t_trace_public_func.cpp @@ -25,7 +25,7 @@ int main(int argc, char **argv, char **env) { SpTraceVcdCFile* tfp = new SpTraceVcdCFile; top->trace(tfp,99); - tfp->open("obj_dir/t_trace_public_func__simx.vcd"); + tfp->open("obj_dir/t_trace_public_func/simx.vcd"); while (main_time <= 20) { top->CLK = (main_time/dt_2)%2; diff --git a/test_regress/t/t_trace_public_func.pl b/test_regress/t/t_trace_public_func.pl index fe545537f..f51b4e60f 100755 --- a/test_regress/t/t_trace_public_func.pl +++ b/test_regress/t/t_trace_public_func.pl @@ -8,19 +8,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_public.v"); -if ($Last_Self->{v3}) { +if ($Self->{v3}) { compile ( make_top_shell => 0, make_main => 0, - v_flags2 => ["-DPUB_FUNC --trace --exe t/$Last_Self->{name}.cpp"], + v_flags2 => ["-DPUB_FUNC --trace --exe $Self->{t_dir}/$Self->{name}.cpp"], ); execute ( check_finished=>1, ); - ok(vcd_identical ("obj_dir/$Last_Self->{name}__simx.vcd", - "t/$Last_Self->{name}.out")); + ok(vcd_identical ("$Self->{obj_dir}/simx.vcd", + "t/$Self->{name}.out")); } else { ok(1); diff --git a/test_regress/t/t_trace_public_sig.cpp b/test_regress/t/t_trace_public_sig.cpp index e89dbb0ed..0523f3b93 100644 --- a/test_regress/t/t_trace_public_sig.cpp +++ b/test_regress/t/t_trace_public_sig.cpp @@ -25,7 +25,7 @@ int main(int argc, char **argv, char **env) { SpTraceVcdCFile* tfp = new SpTraceVcdCFile; top->trace(tfp,99); - tfp->open("obj_dir/t_trace_public_sig__simx.vcd"); + tfp->open("obj_dir/t_trace_public_sig/simx.vcd"); while (main_time <= 20) { top->CLK = (main_time/dt_2)%2; diff --git a/test_regress/t/t_trace_public_sig.pl b/test_regress/t/t_trace_public_sig.pl index c2edec50a..1441a8cfd 100755 --- a/test_regress/t/t_trace_public_sig.pl +++ b/test_regress/t/t_trace_public_sig.pl @@ -8,19 +8,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_trace_public.v"); -if ($Last_Self->{v3}) { +if ($Self->{v3}) { compile ( make_top_shell => 0, make_main => 0, - v_flags2 => ["--trace --exe t/$Last_Self->{name}.cpp"], + v_flags2 => ["--trace --exe $Self->{t_dir}/$Self->{name}.cpp"], ); execute ( check_finished=>1, ); - ok(vcd_identical ("obj_dir/$Last_Self->{name}__simx.vcd", - "t/$Last_Self->{name}.out")); + ok(vcd_identical ("$Self->{obj_dir}/simx.vcd", + "t/$Self->{name}.out")); } else { ok(1); diff --git a/test_regress/t/t_unopt_combo_bad.pl b/test_regress/t/t_unopt_combo_bad.pl index 60adff046..51dbc13fd 100755 --- a/test_regress/t/t_unopt_combo_bad.pl +++ b/test_regress/t/t_unopt_combo_bad.pl @@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_unopt_combo.v"); compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Warning-UNOPTFLAT: t/t_unopt_combo.v:\d+: Signal unoptimizable: Feedback to clock or circular logic: TOP->v.c %Warning-UNOPTFLAT: Use "/\* verilator lint_off UNOPTFLAT \*/" and lint_on around source to disable this message. @@ -22,7 +22,7 @@ compile ( ); execute ( - ) if !$Last_Self->{v3}; + ) if !$Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_unopt_combo_isolate.pl b/test_regress/t/t_unopt_combo_isolate.pl index f06717699..6eeb8c576 100755 --- a/test_regress/t/t_unopt_combo_isolate.pl +++ b/test_regress/t/t_unopt_combo_isolate.pl @@ -12,8 +12,8 @@ compile ( v_flags2 => ['+define+ISOLATE --stats'], ); -if ($Last_Self->{v3}) { - file_grep ($Last_Self->{stats}, qr/Optimizations, isolate_assignments blocks\s+5/i); +if ($Self->{v3}) { + file_grep ($Self->{stats}, qr/Optimizations, isolate_assignments blocks\s+5/i); } execute ( diff --git a/test_regress/t/t_unopt_converge_print_bad.pl b/test_regress/t/t_unopt_converge_print_bad.pl index 54513180e..da356da80 100755 --- a/test_regress/t/t_unopt_converge_print_bad.pl +++ b/test_regress/t/t_unopt_converge_print_bad.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. top_filename("t/t_unopt_converge.v"); -#$Last_Self->{verilated_debug} = 1; +#$Self->{verilated_debug} = 1; compile ( v_flags2 => ['+define+ALLOW_UNOPT'], @@ -17,7 +17,7 @@ compile ( execute ( fails=>1, expect=> '%Error: \S+:\d+: Verilated model didn\'t converge', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_unopt_converge_run_bad.pl b/test_regress/t/t_unopt_converge_run_bad.pl index 98fe0e811..63afc29a9 100755 --- a/test_regress/t/t_unopt_converge_run_bad.pl +++ b/test_regress/t/t_unopt_converge_run_bad.pl @@ -15,7 +15,7 @@ compile ( execute ( fails=>1, expect=> '%Error: \S+:\d+: Verilated model didn\'t converge', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_unopt_converge_unopt_bad.pl b/test_regress/t/t_unopt_converge_unopt_bad.pl index f283587e3..406da83ab 100755 --- a/test_regress/t/t_unopt_converge_unopt_bad.pl +++ b/test_regress/t/t_unopt_converge_unopt_bad.pl @@ -13,7 +13,7 @@ compile ( expect=> '%Warning-UNOPT: t/t_unopt_converge.v:\d+: Signal unoptimizable: Feedback to public clock or circular logic: TOP->x .* %Error: Exiting due to ' - ) if $Last_Self->{v3}; + ) if $Self->{v3}; ok(1); 1; diff --git a/test_regress/t/t_var_bad_hide.pl b/test_regress/t/t_var_bad_hide.pl index dc6e0e01f..2b7ffcd7e 100755 --- a/test_regress/t/t_var_bad_hide.pl +++ b/test_regress/t/t_var_bad_hide.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( v_flags2 => ["--lint-only"], - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Warning-VARHIDDEN: t/t_var_bad_hide.v:\d+: Declaration of signal hides declaration in upper scope: top .* diff --git a/test_regress/t/t_var_bad_rsvd.pl b/test_regress/t/t_var_bad_rsvd.pl index 1ec7bcac1..cfaea753c 100755 --- a/test_regress/t/t_var_bad_rsvd.pl +++ b/test_regress/t/t_var_bad_rsvd.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # General Public License or the Perl Artistic License. compile ( - fails=>$Last_Self->{v3}, + fails=>$Self->{v3}, expect=> '%Error: t/t_var_bad_rsvd.v:\d+: Unsupported: C\+\+ common word: bool %Error: t/t_var_bad_rsvd.v:\d+: Unsupported: C\+\+ reserved word: switch diff --git a/test_regress/t/t_var_escape.pl b/test_regress/t/t_var_escape.pl index 7113b662f..541973391 100755 --- a/test_regress/t/t_var_escape.pl +++ b/test_regress/t/t_var_escape.pl @@ -8,17 +8,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di compile ( # Access is so we can dump waves - v_flags2 => [$Last_Self->{v3}?'-trace':' +access+rwc'], + v_flags2 => [$Self->{v3}?'-trace':' +access+rwc'], ); execute ( check_finished=>1, ); -if ($Last_Self->{v3}) { - file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x); +if ($Self->{v3}) { + file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); my $sig = quotemeta("bra[ket]slash/dash-colon:9"); - file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/$sig/); + file_grep ("$Self->{obj_dir}/simx.vcd", qr/$sig/); } ok(1); diff --git a/test_regress/t/t_var_escape.v b/test_regress/t/t_var_escape.v index ad841f7bf..69a779687 100644 --- a/test_regress/t/t_var_escape.v +++ b/test_regress/t/t_var_escape.v @@ -33,7 +33,7 @@ module t (/*AUTOARG*/ `ifndef verilator initial begin - $dumpfile("obj_dir/t_var_escape_dump.vcd"); + $dumpfile("obj_dir/t_var_escape/t_var_escape_dump.vcd"); $dumpvars( 0, t ); $dumpon; end diff --git a/test_regress/t/t_var_in_assign_bad.pl b/test_regress/t/t_var_in_assign_bad.pl index 63695f21e..2a5eaa730 100755 --- a/test_regress/t/t_var_in_assign_bad.pl +++ b/test_regress/t/t_var_in_assign_bad.pl @@ -13,8 +13,8 @@ compile ( '%Error: t/t_var_in_assign_bad.v:\d+: Assigning to input variable: value %Error: t/t_var_in_assign_bad.v:\d+: Assigning to input variable: valueSub %Error: Exiting due to.*', - ) if $Last_Self->{v3}; + ) if $Self->{v3}; -(!-d "obj_lint_only") or $Last_Self->error("%Error: lint-only shouldn't make output directory"); +(!-d "obj_lint_only") or $Self->error("%Error: lint-only shouldn't make output directory"); ok(1); 1; diff --git a/test_regress/t/t_var_life.pl b/test_regress/t/t_var_life.pl index b2d532b9f..c9d1211c0 100755 --- a/test_regress/t/t_var_life.pl +++ b/test_regress/t/t_var_life.pl @@ -10,9 +10,9 @@ compile ( v_flags2 => ["--stats"], ); -if ($Last_Self->{v3}) { - file_grep ($Last_Self->{stats}, qr/Optimizations, Lifetime assign deletions\s+4/i); - file_grep ($Last_Self->{stats}, qr/Optimizations, Lifetime constant prop\s+2/i); +if ($Self->{v3}) { + file_grep ($Self->{stats}, qr/Optimizations, Lifetime assign deletions\s+4/i); + file_grep ($Self->{stats}, qr/Optimizations, Lifetime constant prop\s+2/i); } execute ( diff --git a/test_regress/t/t_var_pins_cc.pl b/test_regress/t/t_var_pins_cc.pl index d1984eddc..e4a6c9a4e 100755 --- a/test_regress/t/t_var_pins_cc.pl +++ b/test_regress/t/t_var_pins_cc.pl @@ -11,22 +11,22 @@ top_filename("t/t_var_pinsizes.v"); compile ( v_flags2 => ['-cc'], verilator_make_gcc => 0, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; -if ($Last_Self->{v3}) { - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_IN8 \(i1,0,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_IN8 \(i8,7,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_IN16 \(i16,15,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_IN \(i32,31,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_IN64 \(i64,63,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_INW \(i65,64,0,3\);/x); +if ($Self->{v3}) { + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_IN8 \(i1,0,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_IN8 \(i8,7,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_IN16 \(i16,15,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_IN \(i32,31,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_IN64 \(i64,63,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_INW \(i65,64,0,3\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_OUT8 \(o1,0,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_OUT8 \(o8,7,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_OUT16\(o16,15,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_OUT \(o32,31,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_OUT64\(o64,63,0\);/x); - file_grep ("obj_dir/Vt_var_pins_cc.h", qr/VL_OUTW \(o65,64,0,3\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_OUT8 \(o1,0,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_OUT8 \(o8,7,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_OUT16\(o16,15,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_OUT \(o32,31,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_OUT64\(o64,63,0\);/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_OUTW \(o65,64,0,3\);/x); } ok(1); diff --git a/test_regress/t/t_var_pins_sc32.pl b/test_regress/t/t_var_pins_sc32.pl index 5e60212c5..e76bf2761 100755 --- a/test_regress/t/t_var_pins_sc32.pl +++ b/test_regress/t/t_var_pins_sc32.pl @@ -11,22 +11,22 @@ top_filename("t/t_var_pinsizes.v"); compile ( v_flags2 => ['-sp -no-pins64'], verilator_make_gcc => 0, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; -if ($Last_Self->{v3}) { - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_in \s+ i1;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_in \s+ i8;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_in \s+ i16;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_in \s+ i32;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_in\s> \s+ i64;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_in\s> \s+ i65;/x); +if ($Self->{v3}) { + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_in \s+ i1;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_in \s+ i8;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_in \s+ i16;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_in \s+ i32;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_in\s> \s+ i64;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_in\s> \s+ i65;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_out \s+ o1;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_out \s+ o8;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_out \s+ o16;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_out \s+ o32;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_out\s> \s+ o64;/x); - file_grep ("obj_dir/Vt_var_pins_sc32.sp", qr/sc_out\s> \s+ o65;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_out \s+ o1;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_out \s+ o8;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_out \s+ o16;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_out \s+ o32;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_out\s> \s+ o64;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc32.sp", qr/sc_out\s> \s+ o65;/x); } ok(1); diff --git a/test_regress/t/t_var_pins_sc64.pl b/test_regress/t/t_var_pins_sc64.pl index d03fcc28b..4e58b89d7 100755 --- a/test_regress/t/t_var_pins_sc64.pl +++ b/test_regress/t/t_var_pins_sc64.pl @@ -11,22 +11,22 @@ top_filename("t/t_var_pinsizes.v"); compile ( v_flags2 => ['-sp -pins64'], verilator_make_gcc => 0, - ) if $Last_Self->{v3}; + ) if $Self->{v3}; -if ($Last_Self->{v3}) { - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_in \s+ i1;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_in \s+ i8;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_in \s+ i16;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_in \s+ i32;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_in \s+ i64;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_in\s> \s+ i65;/x); +if ($Self->{v3}) { + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_in \s+ i1;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_in \s+ i8;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_in \s+ i16;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_in \s+ i32;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_in \s+ i64;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_in\s> \s+ i65;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_out \s+ o1;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_out \s+ o8;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_out \s+ o16;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_out \s+ o32;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_out \s+ o64;/x); - file_grep ("obj_dir/Vt_var_pins_sc64.sp", qr/sc_out\s> \s+ o65;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_out \s+ o1;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_out \s+ o8;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_out \s+ o16;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_out \s+ o32;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_out \s+ o64;/x); + file_grep ("$Self->{obj_dir}/Vt_var_pins_sc64.sp", qr/sc_out\s> \s+ o65;/x); } ok(1);