diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 4e602ed87..4259ac3df 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -16,6 +16,8 @@ /obj_dir/ /obj_dbg/ /obj_opt/ +/obj_vlt/ +/obj_dist/ /INCA_libs/ /cov_work/ /logs/ diff --git a/bin/verilator b/bin/verilator index 3a2a81734..5465f6265 100755 --- a/bin/verilator +++ b/bin/verilator @@ -545,7 +545,7 @@ functions to avoid error C1061. =back -=item --converge-limit +=item --converge-limit I Rarely needed. Specifies the maximum number of runtime iterations before creating a model failed to converge error. Defaults to 100. @@ -654,9 +654,9 @@ when Verilating large models in --debug mode. Outside of --debug mode, AstNode's should never be leaked and this option has no effect. -=item --debugi +=item --debugi I -=item --debugi- +=item --debugi-I I Rarely needed - for developer use. Set internal debugging level globally to the specified debug level (1-10) or set the specified Verilator source @@ -698,9 +698,9 @@ the Verilator Internals manual. --dump-tree is enabled automatically with --debug, so "--debug --no-dump-tree" may be useful if the dump files are large and not desired. -=item --dump-treei +=item --dump-treei I -=item --dump-treei- +=item --dump-treei-I I Rarely needed - for developer use. Set internal tree dumping level globally to a specific dumping level or set the specified Verilator source @@ -714,7 +714,7 @@ Preprocess the source code, but do not compile, as with 'gcc -E'. Output is written to standard out. Beware of enabling debugging messages, as they will also go to standard out. -=item --error-limit +=item --error-limit I After this number of errors or warnings are encountered, exit. Defaults to 50. @@ -741,7 +741,7 @@ The file may contain // comments which are ignored to the end of the line. Any $VAR, $(VAR), or ${VAR} will be replaced with the specified environment variable. -=item -FI +=item -FI I Force include of the specified C++ header file. All generated C++ files will insert a #include of the specified file before any other includes. The @@ -773,7 +773,7 @@ Double literals must contain a dot (.) and/or an exponent (e). =item Strings -String must in double quotes ("). On the command line it is required to escape +String must in double quotes (""). On the command line it is required to escape them properly, e.g. as -GSTR="\"My String\"" or -GSTR='"My String"'. =back @@ -899,7 +899,7 @@ otherwise manually create the Mdir before calling Verilator. Specifies the name to prepend to all lower level classes. Defaults to the same as --prefix. -=item --no-clk +=item --no-clk I Prevent the specified signal from being marked as clock. See C<--clk>. @@ -958,7 +958,7 @@ disables an optimization, an upper case letter enables it. This is intended for debugging use only; see the source code for version-dependent mappings of optimizations to -O letters. -=item -o +=item -o I Specify the name for the final executable built if using --exe. Defaults to the --prefix if not specified. diff --git a/test_regress/.gitignore b/test_regress/.gitignore index 105d838e2..78bd52977 100644 --- a/test_regress/.gitignore +++ b/test_regress/.gitignore @@ -1,5 +1,6 @@ *.old obj_dir +obj_* vcs.key csrc cov_work diff --git a/test_regress/Makefile b/test_regress/Makefile index 34cc1a5ee..84ed472bb 100644 --- a/test_regress/Makefile +++ b/test_regress/Makefile @@ -33,8 +33,6 @@ ifneq ($(NC_ROOT),) #PRODUCTS += --nc endif -PRODUCTS += --vlt - # Run tests in parallel. Requires Parallel::Forker to be installed. ifeq ($(CFG_WITH_LONGTESTS),yes) DRIVER_FLAGS += -j 0 @@ -46,7 +44,7 @@ endif .PHONY: test test: - $(PERL) driver.pl $(DRIVER_FLAGS) $(PRODUCTS) + $(PERL) driver.pl $(DRIVER_FLAGS) --vlt --dist ###################################################################### @@ -82,4 +80,4 @@ print-cxx-version: ###################################################################### maintainer-copy:: clean mostlyclean distclean maintainer-clean:: - -rm -rf obj_dir simv* simx* csrc cov_work INCA_libs *.log *.key logs vc_hdrs.h + -rm -rf obj_* simv* simx* csrc cov_work INCA_libs *.log *.key logs vc_hdrs.h diff --git a/test_regress/Makefile_obj b/test_regress/Makefile_obj index ce202f7cb..1536a77e7 100644 --- a/test_regress/Makefile_obj +++ b/test_regress/Makefile_obj @@ -34,6 +34,7 @@ CPPFLAGS += -DVL_DEBUG=1 #CPPFLAGS += -D_GLIBCXX_DEBUG # Needed by tracing routines +CPPFLAGS += -DTEST_OBJ_DIR=$(TEST_OBJ_DIR) CPPFLAGS += -DVM_PREFIX=$(VM_PREFIX) CPPFLAGS += -DVM_PREFIX_INCLUDE="<$(VM_PREFIX).h>" CPPFLAGS += $(CPPFLAGS_DRIVER) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index d05c6aa96..d8ec59486 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -33,6 +33,18 @@ $SIG{TERM} = sub { $Fork->kill_tree_all('TERM') if $Fork; die "Quitting...\n"; } #====================================================================== +# Map of all scenarios, with the names used to enable them +our %All_Scenarios + = (dist => [ "dist"], + atsim => ["simulator", "atsim"], + ghdl => ["simulator", "ghdl"], + iv => ["simulator", "iv"], + ms => ["simulator", "ms"], + nc => ["simulator", "nc"], + vcs => ["simulator", "vcs"], + vlt => ["simulator", "vlt_all", "vlt"], + ); + #====================================================================== # main @@ -44,23 +56,18 @@ our @Orig_ARGV_Sw; foreach (@Orig_ARGV) { push @Orig_ARGV_Sw, $_ if /^-/ && !/^ our $Start = time(); $Debug = 0; -my $opt_atsim; my $opt_benchmark; my @opt_tests; +my $opt_dist; my $opt_gdb; my $opt_gdbbt; my $opt_gdbsim; -my $opt_ghdl; -my $opt_iv; my $opt_jobs = 1; -my $opt_ms; -my $opt_nc; my $opt_optimize; +my %opt_scenarios; my $opt_site; my $opt_stop; my $opt_trace; -my $opt_vlt; -my $opt_vcs; my $opt_verbose; my $Opt_Verilated_Debug; our $Opt_Unsupported; @@ -69,35 +76,35 @@ our @Opt_Driver_Verilator_Flags; Getopt::Long::config ("pass_through"); if (! GetOptions ( - "benchmark:i" => sub { $opt_benchmark = $_[1] ? $_[1] : 1; }, - "debug" => \&debug, - #debugi see parameter() - "atsim|athdl!"=> \$opt_atsim, - "gdb!" => \$opt_gdb, - "gdbbt!" => \$opt_gdbbt, - "gdbsim!" => \$opt_gdbsim, - "ghdl!" => \$opt_ghdl, - "golden!" => sub { $ENV{HARNESS_UPDATE_GOLDEN} = 1; }, - "help" => \&usage, - "iverilog!" => \$opt_iv, - "j=i" => \$opt_jobs, - "ms!" => \$opt_ms, - "nc!" => \$opt_nc, - "optimize:s" => \$opt_optimize, - "site!" => \$opt_site, - "stop!" => \$opt_stop, - "trace!" => \$opt_trace, - "unsupported!"=> \$Opt_Unsupported, - "v3!" => \$opt_vlt, # Old - "vl!" => \$opt_vlt, # Old - "vlt!" => \$opt_vlt, - "vcs!" => \$opt_vcs, - "verbose!" => \$opt_verbose, - "verilation!" => \$Opt_Verilation, # Undocumented debugging - "verilated_debug!" => \$Opt_Verilated_Debug, - #W see parameter() - "<>" => \¶meter, - )) { + "benchmark:i" => sub { $opt_benchmark = $_[1] ? $_[1] : 1; }, + "debug" => \&debug, + #debugi see parameter() + "gdb!" => \$opt_gdb, + "gdbbt!" => \$opt_gdbbt, + "gdbsim!" => \$opt_gdbsim, + "golden!" => sub { $ENV{HARNESS_UPDATE_GOLDEN} = 1; }, + "help" => \&usage, + "j=i" => \$opt_jobs, + "optimize:s" => \$opt_optimize, + "site!" => \$opt_site, + "stop!" => \$opt_stop, + "trace!" => \$opt_trace, + "unsupported!"=> \$Opt_Unsupported, + "verbose!" => \$opt_verbose, + "verilation!" => \$Opt_Verilation, # Undocumented debugging + "verilated_debug!" => \$Opt_Verilated_Debug, + #W see parameter() + # Scenarios + "atsim|athdl!"=> sub { $opt_scenarios{atsim} = $_[1]; }, + "dist!" => sub { $opt_scenarios{dist} = $_[1]; }, + "ghdl!" => sub { $opt_scenarios{ghdl} = $_[1]; }, + "iverilog!" => sub { $opt_scenarios{iverilog} = $_[1]; }, + "ms!" => sub { $opt_scenarios{ms} = $_[1]; }, + "nc!" => sub { $opt_scenarios{nc} = $_[1]; }, + "vlt!" => sub { $opt_scenarios{vlt} = $_[1]; }, + "vcs!" => sub { $opt_scenarios{vcs} = $_[1]; }, + "<>" => \¶meter, + )) { die "%Error: Bad usage, try '$0 --help'\n"; } @@ -105,8 +112,9 @@ $opt_jobs = calc_jobs() if defined $opt_jobs && $opt_jobs==0; $Fork->max_proc($opt_jobs); -if (!$opt_atsim && !$opt_ghdl && !$opt_iv && !$opt_vcs && !$opt_ms && !$opt_nc && !$opt_vlt) { - $opt_vlt = 1; +if ((scalar keys %opt_scenarios) < 1) { + $opt_scenarios{dist} = 1; + $opt_scenarios{vlt} = 1; } our @Test_Dirs = "t"; @@ -128,20 +136,17 @@ if ($#opt_tests>=2 && $opt_jobs>=2) { open(STDIN, "+>/dev/null"); } -mkdir "obj_dir"; -our $Log_Filename = "obj_dir/driver_".strftime("%Y%m%d_%H%M%S.log", localtime); +mkdir "obj_dist"; +our $Log_Filename = "obj_dist/driver_".strftime("%Y%m%d_%H%M%S.log", localtime); my $LeftCnt=0; my $OkCnt=0; my $FailCnt=0; my $SkipCnt=0; my $UnsupCnt=0; my @fails; foreach my $testpl (@opt_tests) { - one_test(pl_filename => $testpl, atsim=>1) if $opt_atsim; - one_test(pl_filename => $testpl, ghdl=>1) if $opt_ghdl; - one_test(pl_filename => $testpl, iv=>1) if $opt_iv; - one_test(pl_filename => $testpl, ms=>1) if $opt_ms; - one_test(pl_filename => $testpl, nc=>1) if $opt_nc; - one_test(pl_filename => $testpl, vcs=>1) if $opt_vcs; - one_test(pl_filename => $testpl, vlt=>1, 'v3'=>1) if $opt_vlt; + foreach my $scenario (sort keys %opt_scenarios) { + next if !$opt_scenarios{$scenario}; + one_test(pl_filename => $testpl, $scenario=>1); + } } $Fork->wait_all(); # Wait for all children to finish @@ -159,25 +164,18 @@ sub one_test { my $test = VTest->new(@params); $test->oprint("="x50,"\n"); unlink $test->{status_filename}; - $test->prep; - $test->read; - if ($test->ok) { - $test->oprint("Test PASSED\n"); - } elsif ($test->skips && !$test->errors) { - $test->oprint("%Skip: $test->{skips}\n"); - } elsif ($test->unsupporteds && !$test->errors) { - $test->oprint("%Unsupported: $test->{unsupporteds}\n"); - } else { - $test->error("Missing ok\n") if !$test->errors; - $test->oprint("%Error: $test->{errors}\n"); - } - $test->write_status; + $test->_prep; + $test->_read; + # Don't put anything other than _exit after _read, + # as may call _exit via another path + $test->_exit; }, run_on_finish => sub { my $test = VTest->new(@params); - $test->read_status; + $test->_read_status; if ($test->ok) { $OkCnt++; + } elsif ($test->scenario_off && !$test->errors) { } elsif ($test->skips && !$test->errors) { $SkipCnt++; } elsif ($test->unsupporteds && !$test->errors) { @@ -187,7 +185,9 @@ sub one_test { my $j = ($opt_jobs>1?" -j":""); push @fails, ("\t#".$test->soprint("%Error: $test->{errors}\n") ."\t\tmake$j && test_regress/" - .$test->{pl_filename}." ".join(' ',@Orig_ARGV_Sw)."\n"); + .$test->{pl_filename} + ." ".join(' ', _args_scenario()) + ." --".$test->{scenario}."\n"); $FailCnt++; report(\@fails, $Log_Filename); my $other = ""; @@ -278,6 +278,21 @@ sub report { int($delta/60),$delta%60); } +sub _args_scenario { + # Return command line with scenarios stripped + my @out; + arg: + foreach my $arg (@Orig_ARGV_Sw) { + foreach my $allsc (keys %All_Scenarios) { + foreach my $allscarg (@{$All_Scenarios{$allsc}}) { + next arg if ("--$allscarg" eq $arg); + } + } + push @out, $arg; + } + return @out; +} + ####################################################################### ####################################################################### ####################################################################### @@ -299,18 +314,19 @@ sub new { $self->{name} ||= $2 if $self->{pl_filename} =~ m!^(.*/)?([^/]*)\.pl$!; - $self->{mode} = ""; - $self->{mode} ||= "atsim" if $self->{atsim}; - $self->{mode} ||= "ghdl" if $self->{ghdl}; - $self->{mode} ||= "vcs" if $self->{vcs}; - $self->{mode} ||= "vlt" if $self->{vlt}; - $self->{mode} ||= "nc" if $self->{nc}; - $self->{mode} ||= "ms" if $self->{ms}; - $self->{mode} ||= "iv" if $self->{iv}; + $self->{scenario} = ""; + $self->{scenario} ||= "dist" if $self->{dist}; + $self->{scenario} ||= "atsim" if $self->{atsim}; + $self->{scenario} ||= "ghdl" if $self->{ghdl}; + $self->{scenario} ||= "vcs" if $self->{vcs}; + $self->{scenario} ||= "vlt" if $self->{vlt}; + $self->{scenario} ||= "nc" if $self->{nc}; + $self->{scenario} ||= "ms" if $self->{ms}; + $self->{scenario} ||= "iv" if $self->{iv}; # For backward compatibility, the verilator tests have no prefix - $self->{obj_dir} ||= ("obj_dir/".($self->{mode} eq 'vlt' ? "" : $self->{mode}."_") - ."$self->{name}"); + mkdir "obj_$self->{scenario}"; + $self->{obj_dir} ||= ("obj_$self->{scenario}/$self->{name}"); foreach my $dir (@::Test_Dirs) { # t_dir used both absolutely and under obj_dir @@ -339,6 +355,7 @@ sub new { v_flags => [split(/\s+/,(" -f input.vc " .($self->{t_dir} !~ m!/test_regress! # Don't include standard dir, only site's ? " +incdir+$self->{t_dir} -y $self->{t_dir}" : "") + . " +define+TEST_OBJ_DIR=$self->{obj_dir}" .($opt_verbose ? " +define+TEST_VERBOSE=1":"") .($opt_benchmark ? " +define+TEST_BENCHMARK=$opt_benchmark":"") .($opt_trace ? " +define+WAVES=1":"") @@ -425,46 +442,82 @@ sub new { } sub soprint { - my $self = shift; - my $str = "$self->{mode}/$self->{name}: ".join('',@_); + my $self = (ref $_[0] ? shift : $Self); + my $str = "$self->{scenario}/$self->{name}: ".join('',@_); $str =~ s/\n\n+$/\n/s; return $str; } sub oprint { - my $self = shift; + my $self = (ref $_[0] ? shift : $Self); print $self->soprint(@_); } sub error { - my $self = shift; + my $self = (ref $_[0] ? shift : $Self); my $msg = join('',@_); - warn "%Warning: $self->{mode}/$self->{name}: ".$msg."\n"; + # Called from tests as: error("Reason message"[, ...]); + warn "%Warning: $self->{scenario}/$self->{name}: ".$msg."\n"; $self->{errors} ||= $msg; } sub skip { - my $self = shift; + my $self = (ref $_[0] ? shift : $Self); my $msg = join('',@_); - warn "%Skip: $self->{mode}/$self->{name}: ".$msg."\n"; + # Called from tests as: skip("Reason message"[, ...]); + warn "-Skip: $self->{scenario}/$self->{name}: ".$msg."\n"; $self->{skips} ||= "Skip: ".$msg; } sub unsupported { - my $self = shift; + my $self = (ref $_[0] ? shift : $Self); my $msg = join('',@_); - warn "%Unsupported: $self->{mode}/$self->{name}: ".$msg."\n"; + # Called from tests as: unsupported("Reason message"[, ...]); + warn "-Unsupported: $self->{scenario}/$self->{name}: ".$msg."\n"; if (!$::Opt_Unsupported) { $self->{unsupporteds} ||= "Unsupported: ".$msg; } } -sub prep { +sub scenarios { + my $self = (ref $_[0] ? shift : $Self); + my %params = (@_); + # Called from tests as: scenarios(...); + # to specify which scenarios this test runs under. + # Where ... is one cases listed in All_Scenarios + if ((scalar keys %params) < 1) { + $params{simulators} = 1; + } + my %enabled_scenarios; + foreach my $scenario (keys %params) { + my $value = $params{$scenario}; + my $hit = 0; + foreach my $allsc (keys %All_Scenarios) { + foreach my $allscarg (@{$All_Scenarios{$allsc}}) { + if ($scenario eq $allscarg) { + $hit = 1; + $enabled_scenarios{$allsc} = 1; + } + } + } + if (!$hit) { + $self->error("scenarios('$scenario' => ...) has unknown scenario '$scenario',"); + } + } + + if (!$enabled_scenarios{$self->{scenario}}) { + $self->skip("scenario '$self->{scenario}' not enabled for test"); + $self->{scenario_off} ||= 1; + $self->_exit(); + } +} + +sub _prep { my $self = shift; mkdir $self->{obj_dir}; # Ok if already exists } -sub read { +sub _read { my $self = shift; # Read the control file (-r $self->{pl_filename}) @@ -474,7 +527,23 @@ sub read { require $self->{pl_filename}; } -sub write_status { +sub _exit { + my $self = shift; + if ($self->ok) { + $self->oprint("Self PASSED\n"); + } elsif ($self->skips && !$self->errors) { + $self->oprint("%Skip: $self->{skips}\n"); + } elsif ($self->unsupporteds && !$self->errors) { + $self->oprint("%Unsupported: $self->{unsupporteds}\n"); + } else { + $self->error("Missing ok\n") if !$self->errors; + $self->oprint("%Error: $self->{errors}\n"); + } + $self->_write_status; + exit(0); +} + +sub _write_status { my $self = shift; my $filename = $self->{status_filename}; my $fh = IO::File->new(">$filename") or die "%Error: $! $filename,"; @@ -483,7 +552,7 @@ sub write_status { $fh->close(); } -sub read_status { +sub _read_status { my $self = shift; my $filename = $self->{status_filename}; use vars qw($VAR1); @@ -686,6 +755,7 @@ sub compile { "-C ".$self->{obj_dir}, "-f ".getcwd()."/Makefile_obj", "VM_PREFIX=$self->{VM_PREFIX}", + "TEST_OBJ_DIR=$self->{obj_dir}", "CPPFLAGS_DRIVER=-D".uc($self->{name}), ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1":""), ($param{make_main}?"":"MAKE_MAIN=0"), @@ -696,7 +766,7 @@ sub compile { } } else { - $self->error("No compile step for this simulator"); + $self->error("No compile step defined for '$self->{scenario}' scenario"); } if ($param{make_pli}) { @@ -875,6 +945,11 @@ sub errors { return $self->{errors}; } +sub scenario_off { + my $self = (ref $_[0]? shift : $Self); + return $self->{scenario_off}; +} + sub skips { my $self = (ref $_[0]? shift : $Self); return $self->{skips}; @@ -1529,8 +1604,8 @@ sub cxx_version { our $_Cfg_With_Threaded; sub cfg_with_threaded { - my $out = `make -f ../Makefile print-cfg-with-threaded`; - return ($out =~ /yes/i) ? 1:0; + $_Cfg_With_Threaded ||= `make -f ../Makefile print-cfg-with-threaded`; + return ($_Cfg_With_Threaded =~ /yes/i) ? 1:0; } sub file_grep_not { @@ -1844,10 +1919,6 @@ not matter. This makes it easier to extend or modify the test in future. =over 4 -=item --atsim - -Run using ATSIM simulator. - =item --benchmark [] Show execution times of each step. If an optional number is given, @@ -1885,10 +1956,6 @@ print backtrace information. Requires --debug. Run Verilator generated executable under the debugger. -=item --ghdl - -Run using GHDL simulator. - =item --golden Update golden files, equivalent to setting HARNESS_UPDATE_GOLDEN=1. @@ -1897,23 +1964,11 @@ Update golden files, equivalent to setting HARNESS_UPDATE_GOLDEN=1. Displays this message and program version and exits. -=item --iverilog - -Run using Icarus Verilog simulator. - =item --j # Run number of parallel tests, or 0 to determine the count based on the number of cores installed. Requires Perl's Parallel::Forker package. -=item --ms - -Run using ModelSim simulator. - -=item --nc - -Run using Cadence NC-Verilog simulator. - =item --optimize Randomly turn on/off different optimizations. With specific flags, @@ -1935,18 +1990,52 @@ Set the simulator specific flags to request waveform tracing. Run tests even if marked as unsupported. -=item --vcs - -Run using Synopsys VCS simulator. - =item --verbose Compile and run the test in verbose mode. This means C will be defined for the test (Verilog and any C++/SystemC wrapper). +=back + +=head1 SCENARIO ARGUMENTS + +The following options control which simulator is used, and which tests are +run. Multiple flags may be used to run multiple simulators/scenarios +simultaneously. + +=over 4 + +=item --atsim + +Run ATSIM simulator tests. + +=item --dist + +Run simulator-agnostic distribution tests. + +=item --ghdl + +Run GHDL simulator tests. + +=item --iverilog + +Run Icarus Verilog simulator tests. + +=item --ms + +Run ModelSim simulator tests. + +=item --nc + +Run Cadence NC-Verilog simulator tests. + +=item --vcs + +Run Synopsys VCS simulator tests. + =item --vlt -Run using Verilator. Defaults set unless another simulator is requested. +Run Verilator tests. Default unless another scenario flag is provided. =back diff --git a/test_regress/t/bootstrap.pl b/test_regress/t/bootstrap.pl index c910b407a..a057f813c 100755 --- a/test_regress/t/bootstrap.pl +++ b/test_regress/t/bootstrap.pl @@ -19,4 +19,4 @@ $ENV{PWD} = Cwd::getcwd(); # Else chdir leaves the .. which confuses later comm @args = map { s!.*test_regress/!!; $_; } @args; exec("./driver.pl", @args); -die; +die "$!, in exec"; diff --git a/test_regress/t/t_EXAMPLE.pl b/test_regress/t/t_EXAMPLE.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_EXAMPLE.pl +++ b/test_regress/t/t_EXAMPLE.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_a_first_cc.pl b/test_regress/t/t_a_first_cc.pl index db757b56d..3ec02ecfd 100755 --- a/test_regress/t/t_a_first_cc.pl +++ b/test_regress/t/t_a_first_cc.pl @@ -11,16 +11,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # after building so we make sure to run with --gdbbt, so if it dumps we'll # get a trace. +scenarios(simulator => 1); + $DEBUG_QUIET = "--debug --debugi 0 --gdbbt --no-dump-tree"; -$Self->run(cmd=>["perl", "../bin/verilator", $DEBUG_QUIET, "-V"]); +run(cmd => ["perl", "../bin/verilator", $DEBUG_QUIET, "-V"]); -compile ( +compile( verilator_flags2 => [$DEBUG_QUIET, "--trace"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_a_first_sc.pl b/test_regress/t/t_a_first_sc.pl index 164c9122e..b09f932f0 100755 --- a/test_regress/t/t_a_first_sc.pl +++ b/test_regress/t/t_a_first_sc.pl @@ -11,16 +11,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # after building so we make sure to run with --gdbbt, so if it dumps we'll # get a trace. +scenarios(simulator => 1); + top_filename("t/t_a_first_cc.v"); $DEBUG_QUIET = "--debug --debugi 0 --gdbbt --no-dump-tree"; -compile ( +compile( verilator_flags2 => [$DEBUG_QUIET, "-sc --trace"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_altera_lpm_abs.pl b/test_regress/t/t_altera_lpm_abs.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_abs.pl +++ b/test_regress/t/t_altera_lpm_abs.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_add_sub.pl b/test_regress/t/t_altera_lpm_add_sub.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_add_sub.pl +++ b/test_regress/t/t_altera_lpm_add_sub.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_and.pl b/test_regress/t/t_altera_lpm_and.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_and.pl +++ b/test_regress/t/t_altera_lpm_and.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_bustri.pl b/test_regress/t/t_altera_lpm_bustri.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_bustri.pl +++ b/test_regress/t/t_altera_lpm_bustri.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_clshift.pl b/test_regress/t/t_altera_lpm_clshift.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_clshift.pl +++ b/test_regress/t/t_altera_lpm_clshift.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_compare.pl b/test_regress/t/t_altera_lpm_compare.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_compare.pl +++ b/test_regress/t/t_altera_lpm_compare.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_constant.pl b/test_regress/t/t_altera_lpm_constant.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_constant.pl +++ b/test_regress/t/t_altera_lpm_constant.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_counter.pl b/test_regress/t/t_altera_lpm_counter.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_counter.pl +++ b/test_regress/t/t_altera_lpm_counter.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_decode.pl b/test_regress/t/t_altera_lpm_decode.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_decode.pl +++ b/test_regress/t/t_altera_lpm_decode.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_divide.pl b/test_regress/t/t_altera_lpm_divide.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_divide.pl +++ b/test_regress/t/t_altera_lpm_divide.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_ff.pl b/test_regress/t/t_altera_lpm_ff.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_ff.pl +++ b/test_regress/t/t_altera_lpm_ff.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_fifo.pl b/test_regress/t/t_altera_lpm_fifo.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_fifo.pl +++ b/test_regress/t/t_altera_lpm_fifo.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_fifo_dc.pl b/test_regress/t/t_altera_lpm_fifo_dc.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_fifo_dc.pl +++ b/test_regress/t/t_altera_lpm_fifo_dc.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_inv.pl b/test_regress/t/t_altera_lpm_inv.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_inv.pl +++ b/test_regress/t/t_altera_lpm_inv.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_latch.pl b/test_regress/t/t_altera_lpm_latch.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_latch.pl +++ b/test_regress/t/t_altera_lpm_latch.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_mult.pl b/test_regress/t/t_altera_lpm_mult.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_mult.pl +++ b/test_regress/t/t_altera_lpm_mult.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_mux.pl b/test_regress/t/t_altera_lpm_mux.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_mux.pl +++ b/test_regress/t/t_altera_lpm_mux.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_or.pl b/test_regress/t/t_altera_lpm_or.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_or.pl +++ b/test_regress/t/t_altera_lpm_or.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_ram_dp.pl b/test_regress/t/t_altera_lpm_ram_dp.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_ram_dp.pl +++ b/test_regress/t/t_altera_lpm_ram_dp.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_ram_dq.pl b/test_regress/t/t_altera_lpm_ram_dq.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_ram_dq.pl +++ b/test_regress/t/t_altera_lpm_ram_dq.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_ram_io.pl b/test_regress/t/t_altera_lpm_ram_io.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_ram_io.pl +++ b/test_regress/t/t_altera_lpm_ram_io.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_rom.pl b/test_regress/t/t_altera_lpm_rom.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_rom.pl +++ b/test_regress/t/t_altera_lpm_rom.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_shiftreg.pl b/test_regress/t/t_altera_lpm_shiftreg.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_shiftreg.pl +++ b/test_regress/t/t_altera_lpm_shiftreg.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_altera_lpm_xor.pl b/test_regress/t/t_altera_lpm_xor.pl index 52a4f89f5..20782a400 100755 --- a/test_regress/t/t_altera_lpm_xor.pl +++ b/test_regress/t/t_altera_lpm_xor.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_altera_lpm.v"); (my $module = $Self->{name}) =~ s/.*t_altera_//; -compile ( +compile( verilator_flags2 => ["--top-module ${module}"] ); diff --git a/test_regress/t/t_alw_combdly.pl b/test_regress/t/t_alw_combdly.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_alw_combdly.pl +++ b/test_regress/t/t_alw_combdly.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_alw_dly.pl b/test_regress/t/t_alw_dly.pl index 2ca3a9b9a..a83c168ba 100755 --- a/test_regress/t/t_alw_dly.pl +++ b/test_regress/t/t_alw_dly.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["-Wno-CLKDATA"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["-Wno-CLKDATA"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_alw_noreorder.pl b/test_regress/t/t_alw_noreorder.pl old mode 100644 new mode 100755 index cce730af7..e7f37da92 --- a/test_regress/t/t_alw_noreorder.pl +++ b/test_regress/t/t_alw_noreorder.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_alw_reorder.v"); compile ( diff --git a/test_regress/t/t_alw_nosplit.pl b/test_regress/t/t_alw_nosplit.pl old mode 100644 new mode 100755 index 2fcd2aee3..8ee968a0e --- a/test_regress/t/t_alw_nosplit.pl +++ b/test_regress/t/t_alw_nosplit.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + compile ( verilator_flags2 => ["--stats"], ); diff --git a/test_regress/t/t_alw_reorder.pl b/test_regress/t/t_alw_reorder.pl old mode 100644 new mode 100755 index 9d4beca3e..223be40a2 --- a/test_regress/t/t_alw_reorder.pl +++ b/test_regress/t/t_alw_reorder.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); compile ( verilator_flags2 => ["--stats"], diff --git a/test_regress/t/t_alw_split.pl b/test_regress/t/t_alw_split.pl index 63469761f..c78009c95 100755 --- a/test_regress/t/t_alw_split.pl +++ b/test_regress/t/t_alw_split.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--stats"], - ); +scenarios(simulator => 1); + +compile( + verilator_flags2 => ["--stats"], + ); if ($Self->{vlt}) { file_grep ($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/i, 3); } -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_alw_split_rst.pl b/test_regress/t/t_alw_split_rst.pl index 2fcd2aee3..5dbeceba1 100755 --- a/test_regress/t/t_alw_split_rst.pl +++ b/test_regress/t/t_alw_split_rst.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--stats"], ); @@ -15,8 +17,8 @@ if ($Self->{vlt}) { file_grep ($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/i, 0); } -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_alw_splitord.pl b/test_regress/t/t_alw_splitord.pl index e858e241e..5dbeceba1 100755 --- a/test_regress/t/t_alw_splitord.pl +++ b/test_regress/t/t_alw_splitord.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--stats"], - ); +scenarios(simulator => 1); + +compile( + verilator_flags2 => ["--stats"], + ); if ($Self->{vlt}) { file_grep ($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/i, 0); } -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_array_backw_index_bad.pl b/test_regress/t/t_array_backw_index_bad.pl index ee69233a3..a4cdf3295 100755 --- a/test_regress/t/t_array_backw_index_bad.pl +++ b/test_regress/t/t_array_backw_index_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => q{%Error: t/t_array_backw_index_bad.v:\d+: Slice selection '\[1:3\]' has backward indexing versus data type's '\[3:0\]' %Error: t/t_array_backw_index_bad.v:\d+: Slice selection '\[3:1\]' has backward indexing versus data type's '\[0:3\]' %Error: t/t_array_backw_index_bad.v:\d+: Slice selection index '\[4:3\]' outside data type's '\[3:0\]' diff --git a/test_regress/t/t_array_compare.pl b/test_regress/t/t_array_compare.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_compare.pl +++ b/test_regress/t/t_array_compare.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_interface.pl b/test_regress/t/t_array_interface.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_interface.pl +++ b/test_regress/t/t_array_interface.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_interface_noinl.pl b/test_regress/t/t_array_interface_noinl.pl index e5d1dc50a..1fa90dabe 100755 --- a/test_regress/t/t_array_interface_noinl.pl +++ b/test_regress/t/t_array_interface_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_array_interface.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_packed_sysfunct.pl b/test_regress/t/t_array_packed_sysfunct.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_array_packed_sysfunct.pl +++ b/test_regress/t/t_array_packed_sysfunct.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_array_packed_write_read.pl b/test_regress/t/t_array_packed_write_read.pl index fe649af5b..928ac00f2 100755 --- a/test_regress/t/t_array_packed_write_read.pl +++ b/test_regress/t/t_array_packed_write_read.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug446"); +scenarios(simulator => 1); -compile ( - ); +$Self->{vlt} and unsupported("Verilator unsupported, bug446"); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_array_pattern_2d.pl b/test_regress/t/t_array_pattern_2d.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_pattern_2d.pl +++ b/test_regress/t/t_array_pattern_2d.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_pattern_packed.pl b/test_regress/t/t_array_pattern_packed.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_pattern_packed.pl +++ b/test_regress/t/t_array_pattern_packed.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_pattern_unpacked.pl b/test_regress/t/t_array_pattern_unpacked.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_pattern_unpacked.pl +++ b/test_regress/t/t_array_pattern_unpacked.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_query.pl b/test_regress/t/t_array_query.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_query.pl +++ b/test_regress/t/t_array_query.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_rev.pl b/test_regress/t/t_array_rev.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_rev.pl +++ b/test_regress/t/t_array_rev.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_array_type_methods.pl b/test_regress/t/t_array_type_methods.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_array_type_methods.pl +++ b/test_regress/t/t_array_type_methods.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_arraysel_wide.pl b/test_regress/t/t_arraysel_wide.pl index 385b6a57e..5c448de7c 100755 --- a/test_regress/t/t_arraysel_wide.pl +++ b/test_regress/t/t_arraysel_wide.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); ok(1); diff --git a/test_regress/t/t_assert_basic.pl b/test_regress/t/t_assert_basic.pl index ef9866039..f97a8c4aa 100755 --- a/test_regress/t/t_assert_basic.pl +++ b/test_regress/t/t_assert_basic.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['--assert'], - nc_flags2 => ['+assert'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['--assert'], + nc_flags2 => ['+assert'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_assert_basic_cover.pl b/test_regress/t/t_assert_basic_cover.pl index a14ea162d..a92304bcf 100755 --- a/test_regress/t/t_assert_basic_cover.pl +++ b/test_regress/t/t_assert_basic_cover.pl @@ -7,21 +7,23 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_basic.v"); -compile ( - verilator_flags2 => ['--assert --cc --coverage-user'], - ); +compile( + verilator_flags2 => ['--assert --cc --coverage-user'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); #Needs work print "-Info: NOT checking for coverage\n"; -#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\);/); +#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 7f32d9b12..1cdff439e 100755 --- a/test_regress/t/t_assert_basic_fail.pl +++ b/test_regress/t/t_assert_basic_fail.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_basic.v"); -compile ( - v_flags2 => ['+define+FAILING_ASSERTIONS', - $Self->{v3}?'--assert':($Self->{nc}?'+assert':'')], - fails => $Self->{nc}, - ); +compile( + v_flags2 => ['+define+FAILING_ASSERTIONS', + $Self->{vlt}?'--assert':($Self->{nc}?'+assert':'')], + fails => $Self->{nc}, + ); -execute ( - fails => $Self->{vlt}, - ); +execute( + fails => $Self->{vlt}, + ); ok(1); 1; diff --git a/test_regress/t/t_assert_basic_off.pl b/test_regress/t/t_assert_basic_off.pl index cea1820f6..4945cc73c 100755 --- a/test_regress/t/t_assert_basic_off.pl +++ b/test_regress/t/t_assert_basic_off.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_basic.v"); -compile ( - v_flags2 => [], - ); +compile( + v_flags2 => [], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_assert_casez.pl b/test_regress/t/t_assert_casez.pl index b57b2dea8..be109d263 100755 --- a/test_regress/t/t_assert_casez.pl +++ b/test_regress/t/t_assert_casez.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--assert'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_assert_comp.pl b/test_regress/t/t_assert_comp.pl index 4eada89db..f97a8c4aa 100755 --- a/test_regress/t/t_assert_comp.pl +++ b/test_regress/t/t_assert_comp.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--assert'], nc_flags2 => ['+assert'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_assert_comp_bad.pl b/test_regress/t/t_assert_comp_bad.pl index 5733a2bcc..f332531a3 100755 --- a/test_regress/t/t_assert_comp_bad.pl +++ b/test_regress/t/t_assert_comp_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--assert'], nc_flags2 => ['+assert'], ); -execute ( - check_finished=>0, +execute( + check_finished => 0, fails => 1, expect => '.*%Warning: t_assert_comp_bad.v:\d+: Assertion failed in top.t.genblk1: User compile-time warning diff --git a/test_regress/t/t_assert_cover.pl b/test_regress/t/t_assert_cover.pl index 04072a897..929ab0cc1 100755 --- a/test_regress/t/t_assert_cover.pl +++ b/test_regress/t/t_assert_cover.pl @@ -7,39 +7,41 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_cover.v"); -compile ( - verilator_flags2 => ['--assert --cc --coverage-user'], - nc_flags2 => ["+nccovoverwrite +nccoverage+all +nccovtest+$Self->{name}"] - ); +compile( + verilator_flags2 => ['--assert --cc --coverage-user'], + nc_flags2 => ["+nccovoverwrite +nccoverage+all +nccovtest+$Self->{name}"] + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); 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 * > $Self->{obj_dir}/${name}__nccover.html\n"); - $fh->close; + 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 * > $Self->{obj_dir}/${name}__nccover.html\n"); + $fh->close; } - $Self->run(logfile=>"$Self->{obj_dir}/${name}__nccover.log", - tee=>0, - cmd=>[($ENV{VERILATOR_ICCR}||'iccr'), - "-test ${name} ${cf}"]); + run(logfile => "$Self->{obj_dir}/${name}__nccover.log", + tee => 0, + cmd => [($ENV{VERILATOR_ICCR}||'iccr'), + "-test ${name} ${cf}"]); } -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/); +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 ($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_cover_off.pl b/test_regress/t/t_assert_cover_off.pl index 232bf5fc5..5b0c97c27 100755 --- a/test_regress/t/t_assert_cover_off.pl +++ b/test_regress/t/t_assert_cover_off.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_cover.v"); -compile ( - v_flags2 => [], - ); +compile( + v_flags2 => [], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_assert_dup_bad.pl b/test_regress/t/t_assert_dup_bad.pl index ffa642fc2..622515a19 100755 --- a/test_regress/t/t_assert_dup_bad.pl +++ b/test_regress/t/t_assert_dup_bad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_assert_dup_bad.v:\d+: Duplicate declaration of block: covlabel %Error: t/t_assert_dup_bad.v:\d+: ... Location of original declaration %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_assert_elab.pl b/test_regress/t/t_assert_elab.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_assert_elab.pl +++ b/test_regress/t/t_assert_elab.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_assert_elab_bad.pl b/test_regress/t/t_assert_elab_bad.pl index 341a150e1..93975dc6c 100755 --- a/test_regress/t/t_assert_elab_bad.pl +++ b/test_regress/t/t_assert_elab_bad.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_elab.v"); unlink("$Self->{obj_dir}/t_assert_elab_bad.log"); -compile ( +compile( v_flags2 => ['+define+FAILING_ASSERTIONS', - $Self->{v3}?'--assert':($Self->{nc}?'+assert':'')], + $Self->{vlt}?'--assert':($Self->{nc}?'+assert':'')], fails => 1, ); -execute ( +execute( fails => $Self->{vlt}, ); diff --git a/test_regress/t/t_assert_property.pl b/test_regress/t/t_assert_property.pl index 5dc691360..fd994540c 100755 --- a/test_regress/t/t_assert_property.pl +++ b/test_regress/t/t_assert_property.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--assert --cc'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_assert_property_fail_1.pl b/test_regress/t/t_assert_property_fail_1.pl index 69035746b..ae67a4a1b 100755 --- a/test_regress/t/t_assert_property_fail_1.pl +++ b/test_regress/t/t_assert_property_fail_1.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_property.v"); -compile ( +compile( v_flags2 => ['+define+FAIL_ASSERT_1'], verilator_flags2 => ['--assert --cc'], ); -execute ( +execute( fails => 1 ); diff --git a/test_regress/t/t_assert_property_fail_2.pl b/test_regress/t/t_assert_property_fail_2.pl index c348e60ab..c5df8f7c3 100755 --- a/test_regress/t/t_assert_property_fail_2.pl +++ b/test_regress/t/t_assert_property_fail_2.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_property.v"); -compile ( +compile( v_flags2 => ['+define+FAIL_ASSERT_2'], verilator_flags2 => ['--assert --cc'], ); -execute ( +execute( fails => 1 ); diff --git a/test_regress/t/t_assert_question.pl b/test_regress/t/t_assert_question.pl index b57b2dea8..be109d263 100755 --- a/test_regress/t/t_assert_question.pl +++ b/test_regress/t/t_assert_question.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--assert'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_assert_synth.pl b/test_regress/t/t_assert_synth.pl index d4c469bb8..f97a8c4aa 100755 --- a/test_regress/t/t_assert_synth.pl +++ b/test_regress/t/t_assert_synth.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['--assert'], - nc_flags2 => ['+assert'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['--assert'], + nc_flags2 => ['+assert'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_assert_synth_full.pl b/test_regress/t/t_assert_synth_full.pl index 30093da53..a9b59a51a 100755 --- a/test_regress/t/t_assert_synth_full.pl +++ b/test_regress/t/t_assert_synth_full.pl @@ -7,20 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_synth.v"); -compile ( - v_flags2 => ['+define+FAILING_FULL'], - verilator_flags2 => ['--assert'], - nc_flags2 => ['+assert'], - ); +compile( + v_flags2 => ['+define+FAILING_FULL'], + verilator_flags2 => ['--assert'], + nc_flags2 => ['+assert'], + ); -execute ( - check_finished=>0, - fails=> $Self->{vlt}, - expect=> +execute( + check_finished => 0, + fails => $Self->{vlt}, + expect => '%Error: t_assert_synth.v:\d+: Assertion failed in top.t: synthesis full_case' - ); + ); ok(1); 1; diff --git a/test_regress/t/t_assert_synth_off.pl b/test_regress/t/t_assert_synth_off.pl index 1b3aee62e..173ff7ad5 100755 --- a/test_regress/t/t_assert_synth_off.pl +++ b/test_regress/t/t_assert_synth_off.pl @@ -7,19 +7,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_synth.v"); -compile ( - v_flags2 => ['+define+FAILING_FULL', - '+define+FAILING_PARALLEL', - '+define+FAILING_OH', - '+define+FAILING_OC', - ], - ); +compile( + v_flags2 => ['+define+FAILING_FULL', + '+define+FAILING_PARALLEL', + '+define+FAILING_OH', + '+define+FAILING_OC', + ], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_assert_synth_parallel.pl b/test_regress/t/t_assert_synth_parallel.pl index b6776f9c4..5a8a53857 100755 --- a/test_regress/t/t_assert_synth_parallel.pl +++ b/test_regress/t/t_assert_synth_parallel.pl @@ -7,20 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_assert_synth.v"); -compile ( - v_flags2 => ['+define+FAILING_PARALLEL'], - verilator_flags2 => ['--assert'], - nc_flags2 => ['+assert'], - ); +compile( + v_flags2 => ['+define+FAILING_PARALLEL'], + verilator_flags2 => ['--assert'], + nc_flags2 => ['+assert'], + ); -execute ( - check_finished=>0, - fails => $Self->{v3}, - expect=> +execute( + check_finished => 0, + fails => $Self->{vlt}, + expect => '%Error: t_assert_synth.v:\d+: Assertion failed in top.t: synthesis parallel_case' - ); + ); ok(1); 1; diff --git a/test_regress/t/t_assign_inline.pl b/test_regress/t/t_assign_inline.pl index a433bb067..4a4b40f3b 100755 --- a/test_regress/t/t_assign_inline.pl +++ b/test_regress/t/t_assign_inline.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["-O0 -OG"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_attr_parenstar.pl b/test_regress/t/t_attr_parenstar.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_attr_parenstar.pl +++ b/test_regress/t/t_attr_parenstar.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_bench_mux4k.pl b/test_regress/t/t_bench_mux4k.pl index ea52a0ee4..af1ac5c7a 100755 --- a/test_regress/t/t_bench_mux4k.pl +++ b/test_regress/t/t_bench_mux4k.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--stats"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bench_synmul.pl b/test_regress/t/t_bench_synmul.pl index 91f01db79..3073a4cf7 100755 --- a/test_regress/t/t_bench_synmul.pl +++ b/test_regress/t/t_bench_synmul.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_math_synmul.v"); $Self->{cycles} = $Self->{benchmark}||0; @@ -14,12 +16,12 @@ $Self->{cycles} = 100 if $Self->{cycles}<100; $Self->{sim_time} = $Self->{cycles}*100; -compile ( +compile( v_flags2 => ["+define+SIM_CYCLES=$Self->{cycles} --stats"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bind.pl b/test_regress/t/t_bind.pl index 30da50378..b1acebe26 100755 --- a/test_regress/t/t_bind.pl +++ b/test_regress/t/t_bind.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bind2.pl b/test_regress/t/t_bind2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_bind2.pl +++ b/test_regress/t/t_bind2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bitsel_const_bad.pl b/test_regress/t/t_bitsel_const_bad.pl index 5e7afe281..a6b950c20 100755 --- a/test_regress/t/t_bitsel_const_bad.pl +++ b/test_regress/t/t_bitsel_const_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_bitsel_const_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic .*%Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_bitsel_enum.pl b/test_regress/t/t_bitsel_enum.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_bitsel_enum.pl +++ b/test_regress/t/t_bitsel_enum.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bitsel_slice.pl b/test_regress/t/t_bitsel_slice.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_bitsel_slice.pl +++ b/test_regress/t/t_bitsel_slice.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bitsel_struct.pl b/test_regress/t/t_bitsel_struct.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_bitsel_struct.pl +++ b/test_regress/t/t_bitsel_struct.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bitsel_struct2.pl b/test_regress/t/t_bitsel_struct2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_bitsel_struct2.pl +++ b/test_regress/t/t_bitsel_struct2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bitsel_struct3.pl b/test_regress/t/t_bitsel_struct3.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_bitsel_struct3.pl +++ b/test_regress/t/t_bitsel_struct3.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_bitsel_wire_array_bad.pl b/test_regress/t/t_bitsel_wire_array_bad.pl index 3a68ce074..7a410958c 100755 --- a/test_regress/t/t_bitsel_wire_array_bad.pl +++ b/test_regress/t/t_bitsel_wire_array_bad.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Comple time only test -compile ( +compile( verilator_flags2 => ["--lint-only"], - fails=>1, - expect=> + fails => 1, + expect => '.*%Error: t/t_bitsel_wire_array_bad.v:\d+: Illegal assignment of constant to unpacked array %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_blocking.pl b/test_regress/t/t_blocking.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_blocking.pl +++ b/test_regress/t/t_blocking.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_66bits.pl b/test_regress/t/t_case_66bits.pl index 33c58e257..89a4e77d9 100755 --- a/test_regress/t/t_case_66bits.pl +++ b/test_regress/t/t_case_66bits.pl @@ -1,12 +1,20 @@ #!/usr/bin/perl if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_auto1.pl b/test_regress/t/t_case_auto1.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_case_auto1.pl +++ b/test_regress/t/t_case_auto1.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_deep.pl b/test_regress/t/t_case_deep.pl index dccd4cf50..803dca735 100755 --- a/test_regress/t/t_case_deep.pl +++ b/test_regress/t/t_case_deep.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_default_bad.pl b/test_regress/t/t_case_default_bad.pl index 5099227eb..da769e338 100755 --- a/test_regress/t/t_case_default_bad.pl +++ b/test_regress/t/t_case_default_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_case_default_bad.v:\d+: Multiple default statements in case statement. %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_case_dupitems.pl b/test_regress/t/t_case_dupitems.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_case_dupitems.pl +++ b/test_regress/t/t_case_dupitems.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_genx_bad.pl b/test_regress/t/t_case_genx_bad.pl index 85ef7978d..4e0e02d6a 100755 --- a/test_regress/t/t_case_genx_bad.pl +++ b/test_regress/t/t_case_genx_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_case_genx_bad.v:\d+: Use of x/\? constant in generate case statement, \(no such thing as \'generate casez\'\) %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_case_group.pl b/test_regress/t/t_case_group.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_case_group.pl +++ b/test_regress/t/t_case_group.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_case_huge.pl b/test_regress/t/t_case_huge.pl index 05c89e922..2dfb9cdc0 100755 --- a/test_regress/t/t_case_huge.pl +++ b/test_regress/t/t_case_huge.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--stats"], ); @@ -16,8 +18,8 @@ if ($Self->{vlt}) { file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+(\d+)/i, 8); } -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_case_huge_prof.pl b/test_regress/t/t_case_huge_prof.pl index 19d62b5a6..4e34a208b 100755 --- a/test_regress/t/t_case_huge_prof.pl +++ b/test_regress/t/t_case_huge_prof.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_case_huge.v"); -compile ( +compile( verilator_flags2 => ["--stats --profile-cfuncs -CFLAGS '-pg' -LDFLAGS '-pg'"], ); @@ -23,20 +23,20 @@ if ($Self->{vlt}) { unlink $_ foreach (glob "$Self->{obj_dir}/gmon.out.*"); $ENV{GMON_OUT_PREFIX} = "$Self->{obj_dir}/gmon.out"; -execute ( - check_finished=>1, +execute( + check_finished => 1, ); my $gmon_path; $gmon_path = $_ foreach (glob "$Self->{obj_dir}/gmon.out.*"); -$gmon_path or $Self->error("Profiler did not create a gmon.out"); +$gmon_path or error("Profiler did not create a gmon.out"); (my $gmon_base = $gmon_path) =~ s!.*[/\\]!!; -$Self->run(cmd=>["cd $Self->{obj_dir} && gprof $Self->{VM_PREFIX} $gmon_base > gprof.out"], - check_finished=>0); +run(cmd => ["cd $Self->{obj_dir} && gprof $Self->{VM_PREFIX} $gmon_base > gprof.out"], + check_finished => 0); -$Self->run(cmd=>["cd $Self->{obj_dir} && $ENV{VERILATOR_ROOT}/bin/verilator_profcfunc gprof.out > cfuncs.out"], - check_finished=>0); +run(cmd => ["cd $Self->{obj_dir} && $ENV{VERILATOR_ROOT}/bin/verilator_profcfunc gprof.out > cfuncs.out"], + check_finished => 0); file_grep ("$Self->{obj_dir}/cfuncs.out", qr/Overall summary by/); diff --git a/test_regress/t/t_case_inside.pl b/test_regress/t/t_case_inside.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_case_inside.pl +++ b/test_regress/t/t_case_inside.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_case_itemwidth.pl b/test_regress/t/t_case_itemwidth.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_case_itemwidth.pl +++ b/test_regress/t/t_case_itemwidth.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_nest.pl b/test_regress/t/t_case_nest.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_case_nest.pl +++ b/test_regress/t/t_case_nest.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_onehot.pl b/test_regress/t/t_case_onehot.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_case_onehot.pl +++ b/test_regress/t/t_case_onehot.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_orig.pl b/test_regress/t/t_case_orig.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_case_orig.pl +++ b/test_regress/t/t_case_orig.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_reducer.pl b/test_regress/t/t_case_reducer.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_case_reducer.pl +++ b/test_regress/t/t_case_reducer.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_case_wild.pl b/test_regress/t/t_case_wild.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_case_wild.pl +++ b/test_regress/t/t_case_wild.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_write1.pl b/test_regress/t/t_case_write1.pl index b0a0163c6..50b2ba9d1 100755 --- a/test_regress/t/t_case_write1.pl +++ b/test_regress/t/t_case_write1.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{golden_out} ||= "t/$Self->{name}.out"; -compile ( - verilator_flags2 => ["--stats --O3 -x-assign fast"], - ); +compile( + verilator_flags2 => ["--stats --O3 -x-assign fast"], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(files_identical("$Self->{obj_dir}/$Self->{name}_logger.log", $Self->{golden_out})); 1; diff --git a/test_regress/t/t_case_write1.v b/test_regress/t/t_case_write1.v index aa2d1d09b..a5856066c 100644 --- a/test_regress/t/t_case_write1.v +++ b/test_regress/t/t_case_write1.v @@ -5,6 +5,8 @@ `include "verilated.v" +`define STRINGIFY(x) `"x`" + module t (/*AUTOARG*/ // Inputs clk @@ -14,6 +16,7 @@ module t (/*AUTOARG*/ reg [63:0] crc; `verilator_file_descriptor fd; + `verilator_file_descriptor fdtmp; t_case_write1_tasks tasks (); @@ -31,8 +34,9 @@ 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/t_case_write1_logger.log\n"); - fd = $fopen("obj_dir/t_case_write1/t_case_write1_logger.log", "w"); + $write("%s", {"Open ", `STRINGIFY(`TEST_OBJ_DIR), "/t_case_write1_logger.log\n"}); + fdtmp = $fopen({`STRINGIFY(`TEST_OBJ_DIR), "/t_case_write1_logger.log"}, "w"); + fd <= fdtmp; 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 0d5c0beb2..104eba11b 100755 --- a/test_regress/t/t_case_write2.pl +++ b/test_regress/t/t_case_write2.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{golden_out} ||= "t/$Self->{name}.out"; -compile ( - verilator_flags2 => ["--stats --O3 -x-assign fast"], - ); +compile( + verilator_flags2 => ["--stats --O3 -x-assign fast"], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(files_identical("$Self->{obj_dir}/$Self->{name}_logger.log", $Self->{golden_out})); diff --git a/test_regress/t/t_case_write2.v b/test_regress/t/t_case_write2.v index 9f69750f2..07215dd6d 100644 --- a/test_regress/t/t_case_write2.v +++ b/test_regress/t/t_case_write2.v @@ -5,6 +5,8 @@ `include "verilated.v" +`define STRINGIFY(x) `"x`" + module t (/*AUTOARG*/ // Inputs clk @@ -14,6 +16,7 @@ module t (/*AUTOARG*/ reg [63:0] crc; `verilator_file_descriptor fd; + `verilator_file_descriptor fdtmp; t_case_write2_tasks tasks (); @@ -31,8 +34,9 @@ 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/t_case_write2_logger.log\n"); - fd = $fopen("obj_dir/t_case_write2/t_case_write2_logger.log", "w"); + $write("%s", {"Open ", `STRINGIFY(`TEST_OBJ_DIR), "/t_case_write2_logger.log\n"}); + fdtmp = $fopen({`STRINGIFY(`TEST_OBJ_DIR), "/t_case_write2_logger.log"}, "w"); + fd <= fdtmp; end if (cyc==90) begin $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_case_x.pl b/test_regress/t/t_case_x.pl index bbefb98ca..53262ac3e 100755 --- a/test_regress/t/t_case_x.pl +++ b/test_regress/t/t_case_x.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--x-assign 0"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--x-assign 0"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_case_x_bad.pl b/test_regress/t/t_case_x_bad.pl index 2bdad4fba..770624d54 100755 --- a/test_regress/t/t_case_x_bad.pl +++ b/test_regress/t/t_case_x_bad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Warning-CASEX: t/t_case_x_bad.v:\d+: Suggest casez \(with \?\'s\) in place of casex \(with X\'s\) .*%Warning-CASEWITHX: t/t_case_x_bad.v:\d+: Use of x/\? constant in case statement, \(perhaps intended casex/casez\) .*%Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_case_zx_bad.pl b/test_regress/t/t_case_zx_bad.pl index 962fd0a9a..f7d269d18 100755 --- a/test_regress/t/t_case_zx_bad.pl +++ b/test_regress/t/t_case_zx_bad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Warning-CASEWITHX: t/t_case_zx_bad.v:\d+: Use of x constant in casez statement, \(perhaps intended \?/z in constant\) .* %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_cast.pl b/test_regress/t/t_cast.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_cast.pl +++ b/test_regress/t/t_cast.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_cdc_async_bad.pl b/test_regress/t/t_cdc_async_bad.pl index d231e9506..4c7f7e1f0 100755 --- a/test_regress/t/t_cdc_async_bad.pl +++ b/test_regress/t/t_cdc_async_bad.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags => ['--cdc'], - verilator_make_gcc => 0, - fails => 1, - expect=> +scenarios(vlt => 1); + +compile( + v_flags => ['--cdc'], + verilator_make_gcc => 0, + fails => 1, + expect => '%Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:\d+: Logic in path that feeds async reset, via signal: t.rst2_bad_n %Warning-CDCRSTLOGIC: Use "/\* verilator lint_off CDCRSTLOGIC \*/" and lint_on around source to disable this message. -%Warning-CDCRSTLOGIC: See details in obj_dir/t_cdc_async_bad/Vt_cdc_async_bad__cdc.txt +%Warning-CDCRSTLOGIC: See details in obj_vlt/t_cdc_async_bad/Vt_cdc_async_bad__cdc.txt %Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:\d+: Logic in path that feeds async reset, via signal: t.rst6a_bad_n %Warning-CDCRSTLOGIC: t/t_cdc_async_bad.v:\d+: Logic in path that feeds async reset, via signal: t.rst6b_bad_n %Error: Exiting due to.*', - ); + ); file_grep ("$Self->{obj_dir}/V$Self->{name}__cdc.txt", qr/CDC Report/); diff --git a/test_regress/t/t_cellarray.pl b/test_regress/t/t_cellarray.pl index b39a34d2a..804a7e23f 100755 --- a/test_regress/t/t_cellarray.pl +++ b/test_regress/t/t_cellarray.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--stats"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ["--stats"], + ); + +execute( + check_finished => 1, + ); if ($Self->{vlt}) { file_grep ($Self->{stats}, qr/Optimizations, Gate assign merged\s+(\d+)/i, 28); diff --git a/test_regress/t/t_chg_first.pl b/test_regress/t/t_chg_first.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_chg_first.pl +++ b/test_regress/t/t_chg_first.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_2in.pl b/test_regress/t/t_clk_2in.pl index c06cdc013..9189ff808 100755 --- a/test_regress/t/t_clk_2in.pl +++ b/test_regress/t/t_clk_2in.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( make_top_shell => 0, make_main => 0, verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], vcs_flags2 => ['-assert'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_2in_vec.pl b/test_regress/t/t_clk_2in_vec.pl index 7fac6f163..e39511b25 100755 --- a/test_regress/t/t_clk_2in_vec.pl +++ b/test_regress/t/t_clk_2in_vec.pl @@ -7,17 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_clk_2in.v"); -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ["+define+T_CLK_2IN_VEC=1"], - verilator_flags2 => ["--exe $Self->{t_dir}/t_clk_2in.cpp"], - ); +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ["+define+T_CLK_2IN_VEC=1"], + verilator_flags2 => ["--exe $Self->{t_dir}/t_clk_2in.cpp"], + ); + +execute( + check_finished => 1, + ); -execute ( - check_finished=>1, - ); ok(1); 1; diff --git a/test_regress/t/t_clk_concat.pl b/test_regress/t/t_clk_concat.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_clk_concat.pl +++ b/test_regress/t/t_clk_concat.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_concat2.pl b/test_regress/t/t_clk_concat2.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_clk_concat2.pl +++ b/test_regress/t/t_clk_concat2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_concat3.pl b/test_regress/t/t_clk_concat3.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_clk_concat3.pl +++ b/test_regress/t/t_clk_concat3.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_concat4.pl b/test_regress/t/t_clk_concat4.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_clk_concat4.pl +++ b/test_regress/t/t_clk_concat4.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_concat5.pl b/test_regress/t/t_clk_concat5.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_clk_concat5.pl +++ b/test_regress/t/t_clk_concat5.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_concat6.pl b/test_regress/t/t_clk_concat6.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_clk_concat6.pl +++ b/test_regress/t/t_clk_concat6.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_condflop.pl b/test_regress/t/t_clk_condflop.pl index 302562ae9..48b77b922 100755 --- a/test_regress/t/t_clk_condflop.pl +++ b/test_regress/t/t_clk_condflop.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished => 1 - ); +compile( + ); + +execute( + check_finished => 1 + ); ok(1); 1; diff --git a/test_regress/t/t_clk_condflop_nord.pl b/test_regress/t/t_clk_condflop_nord.pl index 15f9af180..7835b7a30 100755 --- a/test_regress/t/t_clk_condflop_nord.pl +++ b/test_regress/t/t_clk_condflop_nord.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2=>["-no-order-clock-delay"], ); -execute ( +execute( check_finished => 1 ); diff --git a/test_regress/t/t_clk_dpulse.pl b/test_regress/t/t_clk_dpulse.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_clk_dpulse.pl +++ b/test_regress/t/t_clk_dpulse.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clk_dsp.pl b/test_regress/t/t_clk_dsp.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_clk_dsp.pl +++ b/test_regress/t/t_clk_dsp.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clk_first.pl b/test_regress/t/t_clk_first.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_clk_first.pl +++ b/test_regress/t/t_clk_first.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_clk_gater.pl b/test_regress/t/t_clk_gater.pl index b8116f631..0acb40826 100755 --- a/test_regress/t/t_clk_gater.pl +++ b/test_regress/t/t_clk_gater.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--stats"], ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); if ($Self->{vlt}) { #Optimization is disabled diff --git a/test_regress/t/t_clk_gen.pl b/test_regress/t/t_clk_gen.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_clk_gen.pl +++ b/test_regress/t/t_clk_gen.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clk_latch.pl b/test_regress/t/t_clk_latch.pl index f6d3de4c4..11b8aeb6b 100755 --- a/test_regress/t/t_clk_latch.pl +++ b/test_regress/t/t_clk_latch.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); +scenarios(simulator => 1); -compile ( - ); +my $fail = ($Self->{vlt} && verilator_version() !~ /\(ord\)/); -execute ( - check_finished => !$fail, - fails => $fail, - ); +compile( + ); + +execute( + check_finished => !$fail, + fails => $fail, + ); ok(1); 1; diff --git a/test_regress/t/t_clk_latch_edgestyle.pl b/test_regress/t/t_clk_latch_edgestyle.pl index 9975c5bdc..59fa5393b 100755 --- a/test_regress/t/t_clk_latch_edgestyle.pl +++ b/test_regress/t/t_clk_latch_edgestyle.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_clk_latch.v"); -my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); +my $fail = ($Self->{vlt} && verilator_version() !~ /\(ord\)/); -compile ( - v_flags2 => ['+define+EDGE_DETECT_STYLE'], - fails => $fail, - ); +compile( + v_flags2 => ['+define+EDGE_DETECT_STYLE'], + fails => $fail, + ); -execute ( - check_finished => !$fail, - ) if !$fail; +execute( + check_finished => !$fail, + ) if !$fail; ok(1); 1; diff --git a/test_regress/t/t_clk_latchgate.pl b/test_regress/t/t_clk_latchgate.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_clk_latchgate.pl +++ b/test_regress/t/t_clk_latchgate.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clk_powerdn.pl b/test_regress/t/t_clk_powerdn.pl index 302562ae9..48b77b922 100755 --- a/test_regress/t/t_clk_powerdn.pl +++ b/test_regress/t/t_clk_powerdn.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished => 1 - ); +compile( + ); + +execute( + check_finished => 1 + ); ok(1); 1; diff --git a/test_regress/t/t_clk_vecgen1.pl b/test_regress/t/t_clk_vecgen1.pl index 1dd4c0942..2605f221a 100755 --- a/test_regress/t/t_clk_vecgen1.pl +++ b/test_regress/t/t_clk_vecgen1.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_clk_vecgen1.v"); -compile ( +compile( v_flags2 => ['+define+T_TEST1',], ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clk_vecgen2.pl b/test_regress/t/t_clk_vecgen2.pl index 7d8054dd9..fce42e49d 100755 --- a/test_regress/t/t_clk_vecgen2.pl +++ b/test_regress/t/t_clk_vecgen2.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_clk_vecgen1.v"); -compile ( +compile( v_flags2 => ['+define+T_TEST2',], ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clk_vecgen3.pl b/test_regress/t/t_clk_vecgen3.pl index 677057029..4cb74b187 100755 --- a/test_regress/t/t_clk_vecgen3.pl +++ b/test_regress/t/t_clk_vecgen3.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_clk_vecgen1.v"); -compile ( +compile( v_flags2 => ['+define+T_TEST3',], ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_clocker.pl b/test_regress/t/t_clocker.pl index 7a1792c6f..8997efa90 100755 --- a/test_regress/t/t_clocker.pl +++ b/test_regress/t/t_clocker.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( # verilator_flags2 => ["-Wno-UNOPTFLAT"] ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_concat_large.pl b/test_regress/t/t_concat_large.pl index 30da50378..b1acebe26 100755 --- a/test_regress/t/t_concat_large.pl +++ b/test_regress/t/t_concat_large.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_concat_large_bad.pl b/test_regress/t/t_concat_large_bad.pl index 5a848e0a2..410c391bf 100755 --- a/test_regress/t/t_concat_large_bad.pl +++ b/test_regress/t/t_concat_large_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], - fails=>1, - expect=> + fails => 1, + expect => '%Warning-WIDTHCONCAT: t/t_concat_large_bad.v:\d+: More than a 8k bit replication is probably wrong: 32768 %Warning-WIDTHCONCAT: Use .* %Error: Exiting due to.*', diff --git a/test_regress/t/t_concat_opt.pl b/test_regress/t/t_concat_opt.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_concat_opt.pl +++ b/test_regress/t/t_concat_opt.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_const_dec_mixed_bad.pl b/test_regress/t/t_const_dec_mixed_bad.pl index f7d0ec546..822214e6c 100755 --- a/test_regress/t/t_const_dec_mixed_bad.pl +++ b/test_regress/t/t_const_dec_mixed_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_const_dec_mixed_bad.v:\d+: Mixing X/Z/\? with digits not legal in decimal constant: x_1 %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_const_overflow_bad.pl b/test_regress/t/t_const_overflow_bad.pl index c40d4c6cb..2fc1f09dd 100755 --- a/test_regress/t/t_const_overflow_bad.pl +++ b/test_regress/t/t_const_overflow_bad.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_const_overflow_bad.v:\d+: Too many digits for 94 bit number: 94\'d123456789012345678901234567890 %Error: t/t_const_overflow_bad.v:\d+: Too many digits for 8 bit number: 8\'habc %Error: t/t_const_overflow_bad.v:\d+: Too many digits for 6 bit number: 6\'o1234 %Error: t/t_const_overflow_bad.v:\d+: Too many digits for 3 bit number: 3\'b1111 %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_cover_line_cc.pl b/test_regress/t/t_cover_line_cc.pl index 7e2999874..1a4e7318a 100755 --- a/test_regress/t/t_cover_line_cc.pl +++ b/test_regress/t/t_cover_line_cc.pl @@ -7,24 +7,25 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_cover_line.v"); -compile ( +compile( verilator_flags2 => ['--cc --coverage-line'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); # Read the input .v file and do any CHECK_COVER requests inline_checks(); -$Self->run(cmd=>["../bin/verilator_coverage", - "--annotate", "$Self->{obj_dir}/annotated", - "$Self->{obj_dir}/coverage.dat", - ], - ); +run(cmd => ["../bin/verilator_coverage", + "--annotate", "$Self->{obj_dir}/annotated", + "$Self->{obj_dir}/coverage.dat", + ]); ok(files_identical("$Self->{obj_dir}/annotated/t_cover_line.v", "t/t_cover_line.out")); diff --git a/test_regress/t/t_cover_line_sc.pl b/test_regress/t/t_cover_line_sc.pl index 2d5faf39d..cde76f21f 100755 --- a/test_regress/t/t_cover_line_sc.pl +++ b/test_regress/t/t_cover_line_sc.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_cover_line.v"); -compile ( - verilator_flags2 => ['--sc --coverage-line'], - ); +compile( + verilator_flags2 => ['--sc --coverage-line'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); # Read the input .v file and do any CHECK_COVER requests inline_checks(); diff --git a/test_regress/t/t_cover_sva_notflat.pl b/test_regress/t/t_cover_sva_notflat.pl index 5b60c8781..b5f179331 100755 --- a/test_regress/t/t_cover_sva_notflat.pl +++ b/test_regress/t/t_cover_sva_notflat.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['--assert --cc --coverage-user'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['--assert --cc --coverage-user'], + ); + +execute( + check_finished => 1, + ); #if ($Self->{nc}) ... # See t_assert_cover.pl for NC version diff --git a/test_regress/t/t_cover_toggle.pl b/test_regress/t/t_cover_toggle.pl index 274713088..39b21de2a 100755 --- a/test_regress/t/t_cover_toggle.pl +++ b/test_regress/t/t_cover_toggle.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['--cc --coverage-toggle --stats'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['--cc --coverage-toggle --stats'], + ); + +execute( + check_finished => 1, + ); # Read the input .v file and do any CHECK_COVER requests inline_checks(); diff --git a/test_regress/t/t_crazy_sel.pl b/test_regress/t/t_crazy_sel.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_crazy_sel.pl +++ b/test_regress/t/t_crazy_sel.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_debug_fatalsrc_bad.pl b/test_regress/t/t_debug_fatalsrc_bad.pl index e8f5acd76..85490cb46 100755 --- a/test_regress/t/t_debug_fatalsrc_bad.pl +++ b/test_regress/t/t_debug_fatalsrc_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - verilator_flags2 => ["--debug-fatalsrc"], - fails=>$Self->{v3}, - expect=> +compile( + verilator_flags2 => ["--debug-fatalsrc"], + fails => $Self->{vlt}, + expect => '%Error: Internal Error: .*: --debug-fatal-src %Error: Internal Error: See the manual and http://www.veripool.org/verilator for more assistance. %Error: Command Failed.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_debug_fatalsrc_bt_bad.pl b/test_regress/t/t_debug_fatalsrc_bt_bad.pl index 29dc773e2..9179fb9e1 100755 --- a/test_regress/t/t_debug_fatalsrc_bt_bad.pl +++ b/test_regress/t/t_debug_fatalsrc_bt_bad.pl @@ -7,17 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$ENV{VERILATOR_TEST_NO_GDB} and $Self->skip("Skipping due to VERILATOR_TEST_NO_GDB"); +scenarios(vlt => 1); +$ENV{VERILATOR_TEST_NO_GDB} and skip("Skipping due to VERILATOR_TEST_NO_GDB"); -compile ( - v_flags2 => ["--lint-only --debug --gdbbt --debug-fatalsrc"], - fails=>$Self->{v3}, - expect=> +compile( + v_flags2 => ["--lint-only --debug --gdbbt --debug-fatalsrc"], + fails => $Self->{vlt}, + expect => '%Error: Internal Error: .*: --debug-fatal-src %Error: Internal Error: See the manual and http://www.veripool.org/verilator for more assistance. .*in V3Options::.* .*%Error: Command Failed.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_debug_sigsegv_bad.pl b/test_regress/t/t_debug_sigsegv_bad.pl index 2589a21f8..0a634bb0b 100755 --- a/test_regress/t/t_debug_sigsegv_bad.pl +++ b/test_regress/t/t_debug_sigsegv_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); -$ENV{VERILATOR_TEST_NO_GDB} and $Self->skip("Skipping due to VERILATOR_TEST_NO_GDB"); +scenarios(vlt => 1); +$ENV{VERILATOR_TEST_NO_GDB} and skip("Skipping due to VERILATOR_TEST_NO_GDB"); -compile ( - verilator_flags2 => ["--debug-sigsegv"], - fails=>$Self->{v3}, - expect=> +compile( + v_flags => ["--debug-sigsegv"], + fails => $Self->{vlt}, + expect => '%Error: Verilator internal fault, sorry. Consider trying --debug --gdbbt %Error: Command Failed.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_debug_sigsegv_bt_bad.pl b/test_regress/t/t_debug_sigsegv_bt_bad.pl index 39ae42ab9..a6085df84 100755 --- a/test_regress/t/t_debug_sigsegv_bt_bad.pl +++ b/test_regress/t/t_debug_sigsegv_bt_bad.pl @@ -7,17 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$ENV{VERILATOR_TEST_NO_GDB} and $Self->skip("Skipping due to VERILATOR_TEST_NO_GDB"); +scenarios(vlt => 1); +$ENV{VERILATOR_TEST_NO_GDB} and skip("Skipping due to VERILATOR_TEST_NO_GDB"); -compile ( - v_flags2 => ["--lint-only --debug --gdbbt --debug-sigsegv"], - fails=>$Self->{v3}, - expect=> +compile( + v_flags2 => ["--lint-only --debug --gdbbt --debug-sigsegv"], + fails => $Self->{vlt}, + expect => '.* Program received signal SIGSEGV, Segmentation fault. .*in V3Options::.* .*%Error: Command Failed.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_dedupe_clk_gate.pl b/test_regress/t/t_dedupe_clk_gate.pl index 6cd30aa41..b392f2b3b 100755 --- a/test_regress/t/t_dedupe_clk_gate.pl +++ b/test_regress/t/t_dedupe_clk_gate.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--stats"], ); diff --git a/test_regress/t/t_dedupe_seq_logic.pl b/test_regress/t/t_dedupe_seq_logic.pl index eb80a4317..a01f1a898 100755 --- a/test_regress/t/t_dedupe_seq_logic.pl +++ b/test_regress/t/t_dedupe_seq_logic.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--stats"], ); diff --git a/test_regress/t/t_delay.pl b/test_regress/t/t_delay.pl index 41773e35e..c56a826e8 100755 --- a/test_regress/t/t_delay.pl +++ b/test_regress/t/t_delay.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['-Wno-STMTDLY -Wno-ASSIGNDLY'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['-Wno-STMTDLY -Wno-ASSIGNDLY'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_delay_stmtdly_bad.pl b/test_regress/t/t_delay_stmtdly_bad.pl index 9e5bd4717..3bd5845cc 100755 --- a/test_regress/t/t_delay_stmtdly_bad.pl +++ b/test_regress/t/t_delay_stmtdly_bad.pl @@ -7,21 +7,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_delay.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - verilator_flags2 => ['-Wall -Wno-DECLFILENAME'], - fails=>1, - expect=> +compile( + verilator_flags2 => ['-Wall -Wno-DECLFILENAME'], + fails => 1, + expect => '%Warning-ASSIGNDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this assignment/primitive. %Warning-ASSIGNDLY: Use .* %Warning-ASSIGNDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this assignment/primitive. %Warning-ASSIGNDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this assignment/primitive. %Warning-STMTDLY: t/t_delay.v:\d+: Unsupported: Ignoring delay on this delayed statement. .*%Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_detectarray_1.pl b/test_regress/t/t_detectarray_1.pl index 86c7dd2ec..0a3b50107 100755 --- a/test_regress/t/t_detectarray_1.pl +++ b/test_regress/t/t_detectarray_1.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["-Wno-CLKDATA"] ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_detectarray_2.pl b/test_regress/t/t_detectarray_2.pl index 86c7dd2ec..0a3b50107 100755 --- a/test_regress/t/t_detectarray_2.pl +++ b/test_regress/t/t_detectarray_2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["-Wno-CLKDATA"] ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_detectarray_3.pl b/test_regress/t/t_detectarray_3.pl index 0ab9fe201..4fd888569 100755 --- a/test_regress/t/t_detectarray_3.pl +++ b/test_regress/t/t_detectarray_3.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["-Wno-UNOPTFLAT -Wno-WIDTH"] ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_display.pl b/test_regress/t/t_display.pl index 149430a83..f2d31d473 100755 --- a/test_regress/t/t_display.pl +++ b/test_regress/t/t_display.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, - expect=>dequote( +execute( + check_finished => 1, + expect => dequote( q{[0] In top.t: Hi [0] In top.t.sub (sub) [0] In top.t.sub.subblock (sub) diff --git a/test_regress/t/t_display_bad.pl b/test_regress/t/t_display_bad.pl index a43289ea7..796da5092 100755 --- a/test_regress/t/t_display_bad.pl +++ b/test_regress/t/t_display_bad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_display_bad.v:\d+: Missing arguments for \$display-like format %Error: t/t_display_bad.v:\d+: Unknown \$display-like format code: %q %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_display_l.pl b/test_regress/t/t_display_l.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_display_l.pl +++ b/test_regress/t/t_display_l.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_display_mcd.pl b/test_regress/t/t_display_mcd.pl index 13b318c77..26266f883 100755 --- a/test_regress/t/t_display_mcd.pl +++ b/test_regress/t/t_display_mcd.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - expect=>quotemeta(dequote( +compile( + ); + +execute( + check_finished => 1, + expect => quotemeta(dequote( 'To stdout To stderr *-* All Finished *-* diff --git a/test_regress/t/t_display_merge.pl b/test_regress/t/t_display_merge.pl index 6918a7df9..9e3d22c1f 100755 --- a/test_regress/t/t_display_merge.pl +++ b/test_regress/t/t_display_merge.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2=>["--stats"], ); -execute ( - check_finished=>1, - expect=> (quotemeta( +execute( + check_finished => 1, + expect => (quotemeta( 'Merge: This should merge f @@ -33,11 +35,11 @@ mm f a=top.t b=top.t pre t=0 t2=0 post t3=0 t4=0 t5=00000000000000000m t=0 t2=0 t3=0 t4=0 t5=0 t=0 t2=0 t3=0 t4=0 t5=0mm *-* All Finished *-*') - .'.*') + .'.*') ); file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}__stats.txt", - qr/Node count, DISPLAY \s+ 32 \s+ 25 \s+ 25 \s+ 25/); + qr/Node count, DISPLAY \s+ 32 \s+ 25 \s+ 25 \s+ 25/); ok(1); 1; diff --git a/test_regress/t/t_display_noopt.pl b/test_regress/t/t_display_noopt.pl index 3649d5f22..ee29d6649 100755 --- a/test_regress/t/t_display_noopt.pl +++ b/test_regress/t/t_display_noopt.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_display.v"); -compile ( +compile( verilator_flags2 => ["-O0"], ); -execute ( - check_finished=>1, - expect=>dequote( +execute( + check_finished => 1, + expect => dequote( q{[0] In top.t: Hi [0] In top.t.sub (sub) [0] In top.t.sub.subblock (sub) diff --git a/test_regress/t/t_display_real.pl b/test_regress/t/t_display_real.pl index f59c69037..98aee4fa0 100755 --- a/test_regress/t/t_display_real.pl +++ b/test_regress/t/t_display_real.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - expect=> quotemeta( +compile( + ); + +execute( + check_finished => 1, + expect => quotemeta( '[0] e=0.000000e+00 e1=0.000000e+00 e30=0e+00 e32=0.00e+00 [0] f=0.000000 f1=0.000000e+00 f30=0e+00 f32=0.00e+00 [0] g=0 g1=0.000000e+00 g30=0e+00 g32=0.00e+00 diff --git a/test_regress/t/t_display_real_noopt.pl b/test_regress/t/t_display_real_noopt.pl index 05c7f7061..2b8ccddf9 100755 --- a/test_regress/t/t_display_real_noopt.pl +++ b/test_regress/t/t_display_real_noopt.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_display_real.v"); -compile ( - verilator_flags2 => ["-O0"], - ); +compile( + verilator_flags2 => ["-O0"], + ); -execute ( - check_finished=>1, - expect=> quotemeta( +execute( + check_finished => 1, + expect => quotemeta( '[0] e=0.000000e+00 e1=0.000000e+00 e30=0e+00 e32=0.00e+00 [0] f=0.000000 f1=0.000000e+00 f30=0e+00 f32=0.00e+00 [0] g=0 g1=0.000000e+00 g30=0e+00 g32=0.00e+00 diff --git a/test_regress/t/t_display_signed.pl b/test_regress/t/t_display_signed.pl index f28067afa..7fbb489b5 100755 --- a/test_regress/t/t_display_signed.pl +++ b/test_regress/t/t_display_signed.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - expect=> quotemeta( +compile( + ); + +execute( + check_finished => 1, + expect => quotemeta( '[0] lp %x=0bbccc %x=0bbccc %o=2736314 %b=010111011110011001100 %0d=769228 %d= 769228 [0] ln %x=1bbccc %x=1bbccc %o=6736314 %b=110111011110011001100 %0d=-279348 %d= -279348 [0] qp %x=001bbbbcccc %x=001bbbbcccc %o=00067356746314 %b=00000000110111011101110111100110011001100 %0d=7444614348 %d= 7444614348 diff --git a/test_regress/t/t_display_signed_noopt.pl b/test_regress/t/t_display_signed_noopt.pl index c8a06bb6b..104839544 100755 --- a/test_regress/t/t_display_signed_noopt.pl +++ b/test_regress/t/t_display_signed_noopt.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_display_signed.v"); -compile ( - verilator_flags2 => ["-O0"], - ); +compile( + verilator_flags2 => ["-O0"], + ); -execute ( - check_finished=>1, - expect=> quotemeta( +execute( + check_finished => 1, + expect => quotemeta( '[0] lp %x=0bbccc %x=0bbccc %o=2736314 %b=010111011110011001100 %0d=769228 %d= 769228 [0] ln %x=1bbccc %x=1bbccc %o=6736314 %b=110111011110011001100 %0d=-279348 %d= -279348 [0] qp %x=001bbbbcccc %x=001bbbbcccc %o=00067356746314 %b=00000000110111011101110111100110011001100 %0d=7444614348 %d= 7444614348 diff --git a/test_regress/t/t_display_time.pl b/test_regress/t/t_display_time.pl index ff206c6d8..6bdd258fc 100755 --- a/test_regress/t/t_display_time.pl +++ b/test_regress/t/t_display_time.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{vl_time_multiplier} = 1000; -compile ( +compile( verilator_flags2 => ['-DVL_TIME_MULTIPLER=1000'], ); -execute ( - check_finished=>1, - expect=> quotemeta( +execute( + check_finished => 1, + expect => quotemeta( 'default: [0.000] 0t time [ 0.000] No0 time ' # Unsupported: diff --git a/test_regress/t/t_display_wide.pl b/test_regress/t/t_display_wide.pl index 20302e6b4..d27f62e4e 100755 --- a/test_regress/t/t_display_wide.pl +++ b/test_regress/t/t_display_wide.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{vl_time_multiplier} = 1000; -compile ( +compile( ); -execute ( - check_finished=>1, - expect=> quotemeta( +execute( + check_finished => 1, + expect => quotemeta( '[1000.000] cyc==99 crc=2961926edde3e5c6018be970cdbf327b72b5f3c5eab42995891005eec8767e5fdf03051edbe9d222ee756ee34d8d6c83ee877aad65c487140ac87d26c636a66214b4a69acad924c568cc8e8c79f97d07a6eedf91011919d0e3cdda5215ee58c942f6c4dea48b3f38abc77bf47e4f6d6a859fcc5b5d46ec9d2f6a5bf7b978b1ba7ca15d0713a2eb06ade1570c4e3a12db687625eef8dfebcb4095ab4bdffe79c1298f609307a5ef773a6432b855e3e54deb88ca342bf5a7fecc5f2f3e165a59cdb9179718a2d11c9d55f14d69f40b01e41fcb7335a8872a6ba7876ec684d6a3af0b82aa31cca6e26340a2589cf7bf886faa8d23844596dc71233c7025c5250a968b770ab72db90b03d8c045fb8848159df544a3a3bf063269be0aa11d5507f5c8b328b760a6df9e3fbe276faad8eadee126443ad3f99d595b12d0ae514b20693298a58642a07718f9ab7ea8c66575f7f8d0e3ba77d992235b3d5a4e015a7ff9b97a8c4f48ebdbfc2365e6bca4dd3ba6bfc7e850f7c8e2842c717a1d85a977a033f564fc [1000.000] cyc==99 crc=001010010110000110010010011011101101110111100011111001011100011000000001100010111110100101110000110011011011111100110010011110110111001010110101111100111100010111101010101101000010100110010101100010010001000000000101111011101100100001110110011111100101111111011111000000110000010100011110110110111110100111010010001000101110111001110101011011101110001101001101100011010110110010000011111011101000011101111010101011010110010111000100100001110001010000001010110010000111110100100110110001100011011010100110011000100001010010110100101001101001101011001010110110010010010011000101011010001100110010001110100011000111100111111001011111010000011110100110111011101101111110010001000000010001100100011001110100001110001111001101110110100101001000010101111011100101100011001001010000101111011011000100110111101010010010001011001111110011100010101011110001110111101111110100011111100100111101101101011010101000010110011111110011000101101101011101010001101110110010011101001011110110101001011011111101111011100101111000101100011011101001111100101000010101110100000111000100111010001011101011000001101010110111100001010101110000110001001110001110100001001011011011011010000111011000100101111011101111100011011111111010111100101101000000100101011010101101001011110111111111111001111001110000010010100110001111011000001001001100000111101001011110111101110111001110100110010000110010101110000101010111100011111001010100110111101011100010001100101000110100001010111111010110100111111111101100110001011111001011110011111000010110010110100101100111001101101110010001011110010111000110001010001011010001000111001001110101010101111100010100110101101001111101000000101100000001111001000001111111001011011100110011010110101000100001110010101001101011101001111000011101101110110001101000010011010110101000111010111100001011100000101010101000110001110011001010011011100010011000110100000010100010010110001001110011110111101111111000100001101111101010101000110100100011100001000100010110010110110111000111000100100011001111000111000000100101110001010010010100001010100101101000101101110111000010101011011100101101101110010000101100000011110110001100000001000101111110111000100001001000000101011001110111110101010001001010001110100011101111110000011000110010011010011011111000001010101000010001110101010101000001111111010111001000101100110010100010110111011000001010011011011111100111100011111110111110001001110110111110101010110110001110101011011110111000010010011001000100001110101101001111111001100111010101100101011011000100101101000010101110010100010100101100100000011010010011001010011000101001011000011001000010101000000111011100011000111110011010101101111110101010001100011001100101011101011111011111111000110100001110001110111010011101111101100110010010001000110101101100111101010110100100111000000001010110100111111111111001101110010111101010001100010011110100100011101011110110111111110000100011011001011110011010111100101001001101110100111011101001101011111111000111111010000101000011110111110010001110001010000100001011000111000101111010000111011000010110101001011101111010000000110011111101010110010011111100' ), - ); + ); ok(1); 1; diff --git a/test_regress/t/t_dist_cinclude.pl b/test_regress/t/t_dist_cinclude.pl index f264c5cd7..b6585d475 100755 --- a/test_regress/t/t_dist_cinclude.pl +++ b/test_regress/t/t_dist_cinclude.pl @@ -9,11 +9,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di use IO::File; +scenarios(dist => 1); + my $root = ".."; my $Debug; if (!-r "$root/.git") { - $Self->skip("Not in a git repository"); + skip("Not in a git repository"); } else { ### Must trim output before and after our file list my $files = `cd $root && git ls-files --exclude-standard`; @@ -47,7 +49,7 @@ if (!-r "$root/.git") { } if (keys %names) { - $Self->error("Files like stdint.h instead of cstdint: ",join(' ',sort keys %names)); + error("Files like stdint.h instead of cstdint: ",join(' ',sort keys %names)); } } diff --git a/test_regress/t/t_dist_fixme.pl b/test_regress/t/t_dist_fixme.pl index bfd92c746..92256ce87 100755 --- a/test_regress/t/t_dist_fixme.pl +++ b/test_regress/t/t_dist_fixme.pl @@ -9,25 +9,27 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di use IO::File; +scenarios(dist => 1); + my $root = ".."; my $Debug; if (!-r "$root/.git") { - $Self->skip("Not in a git repository"); + skip("Not in a git repository"); } else { ### Must trim output before and after our file list my $files = `cd $root && git ls-files --exclude-standard`; print "ST $files\n" if $Debug; $files =~ s/\s+/ /g; - my $cmd = "cd $root && fgrep -n FIX"."ME $files | sort | grep -v t_dist_fixme"; + my $cmd = "cd $root && grep -n -P '(FIX"."ME|BO"."ZO)' $files | sort"; my $grep = `$cmd`; print "$grep\n"; if ($grep ne "") { - my %names; - foreach my $line (split /\n/, $grep) { - $names{$1} = 1 if $line =~ /^([^:]+)/; - } - $Self->error("Files with FIX"."MEs: ",join(' ',sort keys %names)); + my %names; + foreach my $line (split /\n/, $grep) { + $names{$1} = 1 if $line =~ /^([^:]+)/; + } + error("Files with FIX"."MEs: ",join(' ',sort keys %names)); } } diff --git a/test_regress/t/t_dist_install.pl b/test_regress/t/t_dist_install.pl index 347b9ff39..90a2679c2 100755 --- a/test_regress/t/t_dist_install.pl +++ b/test_regress/t/t_dist_install.pl @@ -9,21 +9,23 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di use Cwd; +scenarios(dist => 1); + my $root = ".."; my $Debug; if (!-r "$root/.git") { - $Self->skip("Not in a git repository"); + skip("Not in a git repository"); } else { my $cwd = getcwd(); my $destdir = "$cwd/".$Self->{obj_dir}; # Start clean - $Self->run(cmd=>["rm -rf $destdir && mkdir -p $destdir"], - check_finished=>0); + run(cmd => ["rm -rf $destdir && mkdir -p $destdir"], + check_finished => 0); # Install into temp area print "Install...\n"; - $Self->run(cmd=>["cd $root && make DESTDIR=$destdir install-all"], - check_finished=>0); + run(cmd => ["cd $root && make DESTDIR=$destdir install-all"], + check_finished => 0); # Check we can run a test # Unfortunately the prefix was hardcoded in the exec at a different place, @@ -32,20 +34,20 @@ if (!-r "$root/.git") { # Uninstall print "Uninstall...\n"; - $Self->run(cmd=>["cd $root && make DESTDIR=$destdir uninstall"], - check_finished=>0); + run(cmd => ["cd $root && make DESTDIR=$destdir uninstall"], + check_finished => 0); # Check empty my @files; $finds = `find $destdir -type f -print`; foreach my $file (split /\n/, $finds) { - next if $file =~ /\.status/; # Made by driver.pl, not Verilator - print "\tLEFT: $file\n"; - $file =~ s!^$cwd!.!; - push @files, $file; + next if $file =~ /\.status/; # Made by driver.pl, not Verilator + print "\tLEFT: $file\n"; + $file =~ s!^$cwd!.!; + push @files, $file; } if ($#files >= 0) { - $Self->error("Uninstall missed files: ",join(' ',@files)); + error("Uninstall missed files: ",join(' ',@files)); } } diff --git a/test_regress/t/t_dist_manifest.pl b/test_regress/t/t_dist_manifest.pl index c04eaea6a..7bc4d0462 100755 --- a/test_regress/t/t_dist_manifest.pl +++ b/test_regress/t/t_dist_manifest.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(dist => 1); + my $root = ".."; my $Debug; @@ -24,10 +26,10 @@ my %file_regexps; my $skip = file_contents("$root/MANIFEST.SKIP"); foreach my $file (sort keys %files) { foreach my $skip (split /\s+/,$skip) { - if ($file =~ /$skip/) { - $files{$file} |= 4; - $file_regexps{$file} = $skip; - } + if ($file =~ /$skip/) { + $files{$file} |= 4; + $file_regexps{$file} = $skip; + } } } @@ -38,24 +40,24 @@ foreach my $file (sort keys %files) { my $skip = $files{$file}&4; print +(($tar ? "TAR ":" ") - .($dir ? "DIR ":" ") - .($skip ? "SKIP ":" ") - ." $file\n") if $Debug; + .($dir ? "DIR ":" ") + .($skip ? "SKIP ":" ") + ." $file\n") if $Debug; if ($dir && !$tar && !$skip) { - $warns{$file} = "File not in manifest or MANIFEST.SKIP: $file"; + $warns{$file} = "File not in manifest or MANIFEST.SKIP: $file"; } elsif (!$dir && $tar && !$skip) { - $warns{$file} = "File in manifest, but not directory: $file"; + $warns{$file} = "File in manifest, but not directory: $file"; } elsif ($dir && $tar && $skip) { - $warns{$file} = "File in manifest and also MANIFEST.SKIP, too general skip regexp '$file_regexps{$file}'?: $file"; + $warns{$file} = "File in manifest and also MANIFEST.SKIP, too general skip regexp '$file_regexps{$file}'?: $file"; } } if (keys %warns) { # First warning lists everything as that's shown in the driver summary - $Self->error("Files mismatch with manifest: ",join(' ',sort keys %warns)); + error("Files mismatch with manifest: ",join(' ',sort keys %warns)); foreach my $file (sort keys %warns) { - $Self->error($warns{$file}); + error($warns{$file}); } } @@ -71,8 +73,8 @@ sub get_manifest_files { print "MF $manifest_files\n" if $Self->{verbose}; my %files; foreach my $file (split /\s+/,$manifest_files) { - next if $file eq ''; - $files{$file} |= 1; + next if $file eq ''; + $files{$file} |= 1; } return \%files; } diff --git a/test_regress/t/t_dist_portability.pl b/test_regress/t/t_dist_portability.pl index 48a0cee84..036925c5e 100755 --- a/test_regress/t/t_dist_portability.pl +++ b/test_regress/t/t_dist_portability.pl @@ -9,11 +9,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di use IO::File; +scenarios(dist => 1); + my $root = ".."; my $Debug; if (!-r "$root/.git") { - $Self->skip("Not in a git repository"); + skip("Not in a git repository"); } else { uint(); printfll(); @@ -44,7 +46,7 @@ sub uint { } } if (keys %names) { - $Self->error("Files with uint32*_t instead of vluint32s: ",join(' ',sort keys %names)); + error("Files with uint32*_t instead of vluint32s: ",join(' ',sort keys %names)); } } @@ -65,7 +67,7 @@ sub printfll { } } if (keys %names) { - $Self->error("Files with %ll instead of VL_PRI64: ",join(' ',sort keys %names)); + error("Files with %ll instead of VL_PRI64: ",join(' ',sort keys %names)); } } @@ -83,7 +85,7 @@ sub cstr { } } if (keys %names) { - $Self->error("Files with potential c_str() lifetime issue: ",join(' ',sort keys %names)); + error("Files with potential c_str() lifetime issue: ",join(' ',sort keys %names)); } } @@ -102,7 +104,7 @@ sub vsnprintf { } } if (keys %names) { - $Self->error("Files with vsnprintf, use VL_VSNPRINTF: ",join(' ',sort keys %names)); + error("Files with vsnprintf, use VL_VSNPRINTF: ",join(' ',sort keys %names)); } } diff --git a/test_regress/t/t_dist_tabs.pl b/test_regress/t/t_dist_tabs.pl index 142e5eb51..90915eaf1 100755 --- a/test_regress/t/t_dist_tabs.pl +++ b/test_regress/t/t_dist_tabs.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(dist => 1); + my $root = ".."; if (!-r "$root/.git") { - $Self->skip("Not in a git repository"); + skip("Not in a git repository"); } else { ### Must trim output before and after our file list my %warns; @@ -46,9 +48,9 @@ if (!-r "$root/.git") { } if (keys %warns) { # First warning lists everything as that's shown in the driver summary - $Self->error($summary." ",join(' ',sort keys %warns)); + error($summary." ",join(' ',sort keys %warns)); foreach my $file (sort keys %warns) { - $Self->error($warns{$file}); + error($warns{$file}); } } } diff --git a/test_regress/t/t_dist_untracked.pl b/test_regress/t/t_dist_untracked.pl index 839454bbf..a0e8e57be 100755 --- a/test_regress/t/t_dist_untracked.pl +++ b/test_regress/t/t_dist_untracked.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(dist => 1); + my $root = ".."; my $Debug; if (!-r "$root/.git") { - $Self->skip("Not in a git repository"); + skip("Not in a git repository"); } else { ### Must trim output before and after our file list my %warns; @@ -33,9 +35,9 @@ if (!-r "$root/.git") { } if (keys %warns) { # First warning lists everything as that's shown in the driver summary - $Self->error($summary." ",join(' ',sort keys %warns)); + error($summary." ",join(' ',sort keys %warns)); foreach my $file (sort keys %warns) { - $Self->error($warns{$file}); + error($warns{$file}); } } } diff --git a/test_regress/t/t_dist_whitespace.pl b/test_regress/t/t_dist_whitespace.pl index 925b5a5d6..35a72b280 100755 --- a/test_regress/t/t_dist_whitespace.pl +++ b/test_regress/t/t_dist_whitespace.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(dist => 1); + my $root = ".."; my $Debug; @@ -45,14 +47,14 @@ foreach my $file (sort keys %files) { if (keys %warns) { # First warning lists everything as that's shown in the driver summary if ($ENV{HARNESS_UPDATE_GOLDEN}) { - $Self->error("Updated files with whitespace errors: ",join(' ',sort keys %warns)); - $Self->error("To auto-fix: HARNESS_UPDATE_GOLDEN=1 {command} or --golden"); + error("Updated files with whitespace errors: ",join(' ',sort keys %warns)); + error("To auto-fix: HARNESS_UPDATE_GOLDEN=1 {command} or --golden"); } else { - $Self->error("Files have whitespace errors: ",join(' ',sort keys %warns)); - $Self->error("To auto-fix: HARNESS_UPDATE_GOLDEN=1 {command} or --golden"); + error("Files have whitespace errors: ",join(' ',sort keys %warns)); + error("To auto-fix: HARNESS_UPDATE_GOLDEN=1 {command} or --golden"); } foreach my $file (sort keys %warns) { - $Self->error($warns{$file}); + error($warns{$file}); } } diff --git a/test_regress/t/t_dos.pl b/test_regress/t/t_dos.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_dos.pl +++ b/test_regress/t/t_dos.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_2exp_bad.pl b/test_regress/t/t_dpi_2exp_bad.pl index b49860a7a..e8f108ede 100755 --- a/test_regress/t/t_dpi_2exp_bad.pl +++ b/test_regress/t/t_dpi_2exp_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Error: t/t_dpi_2exp_bad.v:11: Function was already DPI Exported, duplicate not allowed: dpix_twice %Error: Exiting due to .*' - ); + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_accessors.pl b/test_regress/t/t_dpi_accessors.pl index 4c69d787f..d2741cc06 100755 --- a/test_regress/t/t_dpi_accessors.pl +++ b/test_regress/t/t_dpi_accessors.pl @@ -10,13 +10,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # 8-Mar-2012: Modifications for this test contributed by Jeremy Bennett and # Jie Xu. -compile ( +scenarios(simulator => 1); + +compile( make_top_shell => 0, make_main => 0, verilator_flags2 => ["-Wno-BLKANDNBLK -language 1800-2005 --exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_dpi_context.pl b/test_regress/t/t_dpi_context.pl index 016a5768a..10cc5c36c 100755 --- a/test_regress/t/t_dpi_context.pl +++ b/test_regress/t/t_dpi_context.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["t/t_dpi_context_c.cpp"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ["t/t_dpi_context_c.cpp"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_context_noopt.pl b/test_regress/t/t_dpi_context_noopt.pl index d02a1a2b4..ed5d502ed 100755 --- a/test_regress/t/t_dpi_context_noopt.pl +++ b/test_regress/t/t_dpi_context_noopt.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_dpi_context.v"); -compile ( - v_flags2 => ["t/t_dpi_context_c.cpp"], - verilator_flags2 => [$Self->{v3}?"-O0":""], - ); +compile( + v_flags2 => ["t/t_dpi_context_c.cpp"], + verilator_flags2 => [$Self->{vlt}?"-O0":""], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_display.pl b/test_regress/t/t_dpi_display.pl index f2c032f05..4999351dd 100755 --- a/test_regress/t/t_dpi_display.pl +++ b/test_regress/t/t_dpi_display.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["t/t_dpi_display_c.cpp"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - expect=>quotemeta( +compile( + v_flags2 => ["t/t_dpi_display_c.cpp"], + ); + +execute( + check_finished => 1, + expect => quotemeta( q{dpii_display_call: '' dpii_display_call: 'c' dpii_display_call: 'co' diff --git a/test_regress/t/t_dpi_dup_bad.pl b/test_regress/t/t_dpi_dup_bad.pl index f5bd35556..071d02ca0 100755 --- a/test_regress/t/t_dpi_dup_bad.pl +++ b/test_regress/t/t_dpi_dup_bad.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Error: t/t_dpi_dup_bad.v:\d+: Duplicate declaration of DPI function with different formal arguments: t.oth_f_int2 %Error: t/t_dpi_dup_bad.v:\d+: ... New prototype: pure int dpii_fa_bit \(int, int\) %Error: t/t_dpi_dup_bad.v:\d+: ... Original prototype: int dpii_fa_bit \(int\) %Error: Exiting due to .*' - ); + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_exp_bad.pl b/test_regress/t/t_dpi_exp_bad.pl index eb555643e..eb1b354e2 100755 --- a/test_regress/t/t_dpi_exp_bad.pl +++ b/test_regress/t/t_dpi_exp_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> + fails => $Self->{vlt}, + expect => '%Error: t/t_dpi_exp_bad.v:\d+: DPI functions cannot return > 32 bits or four-state; use a two-state type or task instead: dpix_f_bit48__Vfuncrtn %Error: Exiting due to .*' ); diff --git a/test_regress/t/t_dpi_export.pl b/test_regress/t/t_dpi_export.pl index 2e51f6dff..a665b7335 100755 --- a/test_regress/t/t_dpi_export.pl +++ b/test_regress/t/t_dpi_export.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -# irun -sv top.v t_dpi_export.v -cpost t_dpi_export_c.c -end +# irun -sv top.v t_dpi_export.v -cpost t_dpi_export_c.c -end -compile ( - # Amazingly VCS, NC and Verilator all just accept the C file here! - v_flags2 => ["t/t_dpi_export_c.cpp"], - verilator_flags2 => ["-Wall -Wno-DECLFILENAME -no-l2name"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + # Amazingly VCS, NC and Verilator all just accept the C file here! + v_flags2 => ["t/t_dpi_export_c.cpp"], + verilator_flags2 => ["-Wall -Wno-DECLFILENAME -no-l2name"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_imp_gen.pl b/test_regress/t/t_dpi_imp_gen.pl index 15fc697c3..7232ad5ee 100755 --- a/test_regress/t/t_dpi_imp_gen.pl +++ b/test_regress/t/t_dpi_imp_gen.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["t/t_dpi_imp_gen_c.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_dpi_import.pl b/test_regress/t/t_dpi_import.pl index 115378628..ce88e2ad0 100755 --- a/test_regress/t/t_dpi_import.pl +++ b/test_regress/t/t_dpi_import.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - # Amazingly VCS, NC and Verilator all just accept the C file here! - v_flags2 => ["t/t_dpi_import_c.cpp"], - verilator_flags2 => ["-Wall -Wno-DECLFILENAME"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + # Amazingly VCS, NC and Verilator all just accept the C file here! + v_flags2 => ["t/t_dpi_import_c.cpp"], + verilator_flags2 => ["-Wall -Wno-DECLFILENAME"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_lib.pl b/test_regress/t/t_dpi_lib.pl index 28a0c4bb3..292f84bce 100755 --- a/test_regress/t/t_dpi_lib.pl +++ b/test_regress/t/t_dpi_lib.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["t/t_dpi_lib_c.cpp"], verilator_flags2 => ["-Wall -Wno-DECLFILENAME"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_dpi_logic_bad.pl b/test_regress/t/t_dpi_logic_bad.pl index 69732372e..15509c064 100755 --- a/test_regress/t/t_dpi_logic_bad.pl +++ b/test_regress/t/t_dpi_logic_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> + fails => $Self->{vlt}, + expect => '%Error: t/t_dpi_logic_bad.v:\d+: DPI function may not return type BASICDTYPE \'logic\' \(IEEE 2017 35.5.5\) %Error: Exiting due to .*' ); diff --git a/test_regress/t/t_dpi_name_bad.pl b/test_regress/t/t_dpi_name_bad.pl index c39aad5bd..18d746405 100755 --- a/test_regress/t/t_dpi_name_bad.pl +++ b/test_regress/t/t_dpi_name_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Error: t/t_dpi_name_bad.v:\d+: DPI function has illegal characters in C identifier name: badly.named %Error: Exiting due to .*' - ); + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_open.pl b/test_regress/t/t_dpi_open.pl index 08f291fbe..c4ca90723 100755 --- a/test_regress/t/t_dpi_open.pl +++ b/test_regress/t/t_dpi_open.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["t/t_dpi_open_c.cpp"], verilator_flags2 => ["-Wall -Wno-DECLFILENAME -unroll-count 1"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_dpi_openfirst.pl b/test_regress/t/t_dpi_openfirst.pl index cb699b0e8..0e6e42ea9 100755 --- a/test_regress/t/t_dpi_openfirst.pl +++ b/test_regress/t/t_dpi_openfirst.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["t/t_dpi_openfirst_c.cpp"], verilator_flags2 => ["-Wall -Wno-DECLFILENAME"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_dpi_openreg_bad.pl b/test_regress/t/t_dpi_openreg_bad.pl index d004a23ed..f02701726 100755 --- a/test_regress/t/t_dpi_openreg_bad.pl +++ b/test_regress/t/t_dpi_openreg_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> + fails => $Self->{vlt}, + expect => '%Error: t/t_dpi_openreg_bad.v:\d+: Unsized/open arrays \(\'\[\]\'\) are only supported in DPI imports %Error: t/t_dpi_openreg_bad.v:\d+: Unsized/open arrays \(\'\[\]\'\) are only supported in DPI imports %Error: Exiting due to .*' diff --git a/test_regress/t/t_dpi_qw.pl b/test_regress/t/t_dpi_qw.pl index cd7f6f5d3..5f46d7150 100755 --- a/test_regress/t/t_dpi_qw.pl +++ b/test_regress/t/t_dpi_qw.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["t/t_dpi_qw_c.cpp"], - verilator_flags2 => ["-Wall -Wno-DECLFILENAME -no-l2name"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ["t/t_dpi_qw_c.cpp"], + verilator_flags2 => ["-Wall -Wno-DECLFILENAME -no-l2name"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_shortcircuit.pl b/test_regress/t/t_dpi_shortcircuit.pl index 3b0bfdcb5..d065fdda9 100755 --- a/test_regress/t/t_dpi_shortcircuit.pl +++ b/test_regress/t/t_dpi_shortcircuit.pl @@ -7,17 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug413 short circuit"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug413 short circuit"); -compile ( - # Amazingly VCS, NC and Verilator all just accept the C file here! - v_flags2 => ["t/t_dpi_shortcircuit_c.cpp"], - verilator_flags2 => ["-Wno-DECLFILENAME"], - ); +compile( + # Amazingly VCS, NC and Verilator all just accept the C file here! + v_flags2 => ["t/t_dpi_shortcircuit_c.cpp"], + verilator_flags2 => ["-Wno-DECLFILENAME"], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_shortcircuit2.pl b/test_regress/t/t_dpi_shortcircuit2.pl index 216c1b691..c076932ad 100755 --- a/test_regress/t/t_dpi_shortcircuit2.pl +++ b/test_regress/t/t_dpi_shortcircuit2.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - # Amazingly VCS, NC and Verilator all just accept the C file here! - v_flags2 => ["t/t_dpi_shortcircuit_c.cpp"], - verilator_flags2 => ["-Wno-DECLFILENAME"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + # Amazingly VCS, NC and Verilator all just accept the C file here! + v_flags2 => ["t/t_dpi_shortcircuit_c.cpp"], + verilator_flags2 => ["-Wno-DECLFILENAME"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_string.pl b/test_regress/t/t_dpi_string.pl index ae6cbdd77..9e6086334 100755 --- a/test_regress/t/t_dpi_string.pl +++ b/test_regress/t/t_dpi_string.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["t/t_dpi_string_c.cpp"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ["t/t_dpi_string_c.cpp"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_sys.pl b/test_regress/t/t_dpi_sys.pl index 1e96cf6dc..baee7849c 100755 --- a/test_regress/t/t_dpi_sys.pl +++ b/test_regress/t/t_dpi_sys.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["t/t_dpi_sys_c.cpp"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ["t/t_dpi_sys_c.cpp"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_dpi_vams.pl b/test_regress/t/t_dpi_vams.pl index 653add643..66b07eadf 100755 --- a/test_regress/t/t_dpi_vams.pl +++ b/test_regress/t/t_dpi_vams.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( make_top_shell => 0, make_main => 0, verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_dpi_var.pl b/test_regress/t/t_dpi_var.pl index e674bcf17..699b48d9e 100755 --- a/test_regress/t/t_dpi_var.pl +++ b/test_regress/t/t_dpi_var.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe --no-l2name $Self->{t_dir}/t_dpi_var.cpp"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe --no-l2name $Self->{t_dir}/t_dpi_var.cpp"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_embed1.pl b/test_regress/t/t_embed1.pl index 7d6eb6d3c..9bdb42848 100755 --- a/test_regress/t/t_embed1.pl +++ b/test_regress/t/t_embed1.pl @@ -9,6 +9,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di use File::Spec; +scenarios(simulator => 1); + my $self = $Self; my $child_dir = "$Self->{obj_dir}_child"; mkdir $child_dir; @@ -16,35 +18,35 @@ mkdir $child_dir; # Compile the child { my @cmdargs = $Self->compile_vlt_flags - (VM_PREFIX => "$Self->{VM_PREFIX}_child", - top_filename => "$Self->{name}_child.v", - verilator_flags => ["-cc", "-Mdir", "${child_dir}", "--debug-check"], - ); + (VM_PREFIX => "$Self->{VM_PREFIX}_child", + top_filename => "$Self->{name}_child.v", + verilator_flags => ["-cc", "-Mdir", "${child_dir}", "--debug-check"], + ); - $Self->run(logfile=>"${child_dir}/vlt_compile.log", - cmd=>\@cmdargs); + run(logfile => "${child_dir}/vlt_compile.log", + cmd => \@cmdargs); - $Self->run(logfile=>"${child_dir}/vlt_gcc.log", - cmd=>["cd ${child_dir} && ", - "make", "-f".getcwd()."/Makefile_obj", - "CPPFLAGS_DRIVER=-D".uc($self->{name}), - ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1":""), - "MAKE_MAIN=0", - "VM_PREFIX=$self->{VM_PREFIX}_child", - "V$self->{name}_child__ALL.a", # bypass default rule, make archive - ($param{make_flags}||""), - ]); + run(logfile => "${child_dir}/vlt_gcc.log", + cmd => ["cd ${child_dir} && ", + "make", "-f".getcwd()."/Makefile_obj", + "CPPFLAGS_DRIVER=-D".uc($self->{name}), + ($opt_verbose ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1":""), + "MAKE_MAIN=0", + "VM_PREFIX=$self->{VM_PREFIX}_child", + "V$self->{name}_child__ALL.a", # bypass default rule, make archive + ($param{make_flags}||""), + ]); } # Compile the parent (might be with other than verilator) -compile ( +compile( v_flags2 => [File::Spec->rel2abs("${child_dir}/V$self->{name}_child__ALL.a"), - # TODO would be nice to have this in embedded archive - "t/t_embed1_c.cpp"], + # TODO would be nice to have this in embedded archive + "t/t_embed1_c.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_emit_constw.pl b/test_regress/t/t_emit_constw.pl index 48fe87ce0..ed09e4347 100755 --- a/test_regress/t/t_emit_constw.pl +++ b/test_regress/t/t_emit_constw.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['--Ox'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['--Ox'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_emit_memb_limit.pl b/test_regress/t/t_emit_memb_limit.pl index 54f65baa6..713d6af9e 100755 --- a/test_regress/t/t_emit_memb_limit.pl +++ b/test_regress/t/t_emit_memb_limit.pl @@ -8,6 +8,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. use IO::File; +scenarios(simulator => 1); + sub gen { my $filename = shift; my $n = shift; @@ -38,12 +40,12 @@ top_filename("$Self->{obj_dir}/t_emit_memb_limit.v"); # Current limit is 50, so want to test at least 50*50 cases gen($Self->{top_filename}, 6000); -compile ( +compile( verilator_flags2=>["-x-assign fast --x-initial fast"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/struct \{/); diff --git a/test_regress/t/t_enum.pl b/test_regress/t/t_enum.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_enum.pl +++ b/test_regress/t/t_enum.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_enum_func.pl b/test_regress/t/t_enum_func.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_enum_func.pl +++ b/test_regress/t/t_enum_func.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_enum_int.pl b/test_regress/t/t_enum_int.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_enum_int.pl +++ b/test_regress/t/t_enum_int.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_enum_large_methods.pl b/test_regress/t/t_enum_large_methods.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_enum_large_methods.pl +++ b/test_regress/t/t_enum_large_methods.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_enum_name2.pl b/test_regress/t/t_enum_name2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_enum_name2.pl +++ b/test_regress/t/t_enum_name2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_enum_name3.pl b/test_regress/t/t_enum_name3.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_enum_name3.pl +++ b/test_regress/t/t_enum_name3.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_enum_overlap_bad.pl b/test_regress/t/t_enum_overlap_bad.pl index 307c0c994..08bf8eb06 100755 --- a/test_regress/t/t_enum_overlap_bad.pl +++ b/test_regress/t/t_enum_overlap_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Error: t/t_enum_overlap_bad.v:\d+: Overlapping enumeration value: e1b %Error: t/t_enum_overlap_bad.v:\d+: ... Location of original declaration %Error: Exiting due to', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_enum_public.pl b/test_regress/t/t_enum_public.pl index 4408cbf72..0560d989d 100755 --- a/test_regress/t/t_enum_public.pl +++ b/test_regress/t/t_enum_public.pl @@ -7,19 +7,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + if ($Self->{vlt}) { - compile ( - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], - make_top_shell => 0, - make_main => 0, - ); + compile( + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + make_top_shell => 0, + make_main => 0, + ); } else { - compile ( - ); + compile( + ); } -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_enum_type_methods.pl b/test_regress/t/t_enum_type_methods.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_enum_type_methods.pl +++ b/test_regress/t/t_enum_type_methods.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_enum_type_pins.pl b/test_regress/t/t_enum_type_pins.pl index fda118f1a..0b6418428 100755 --- a/test_regress/t/t_enum_type_pins.pl +++ b/test_regress/t/t_enum_type_pins.pl @@ -7,14 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); # Not yet working on Verilator -$Self->{vlt} and $Self->unsupported("Verilator unsupported"); +$Self->{vlt} and unsupported("Verilator unsupported"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_enumeration.pl b/test_regress/t/t_enumeration.pl index 6d5abb42b..7ea54cef9 100755 --- a/test_regress/t/t_enumeration.pl +++ b/test_regress/t/t_enumeration.pl @@ -7,14 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug460"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug460"); -compile ( - ); +compile( + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_extend.pl b/test_regress/t/t_extend.pl index c4a78b37b..1be18a66c 100755 --- a/test_regress/t/t_extend.pl +++ b/test_regress/t/t_extend.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_extend_class.pl b/test_regress/t/t_extend_class.pl index f2d6b5986..6da737e5a 100755 --- a/test_regress/t/t_extend_class.pl +++ b/test_regress/t/t_extend_class.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( make_flags => "CPPFLAGS_ADD=-I$Self->{t_dir}", ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_final.pl b/test_regress/t/t_final.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_final.pl +++ b/test_regress/t/t_final.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_flag_bboxsys.pl b/test_regress/t/t_flag_bboxsys.pl index 28debed29..607c39a55 100755 --- a/test_regress/t/t_flag_bboxsys.pl +++ b/test_regress/t/t_flag_bboxsys.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - verilator_flags2 => ["--bbox-sys"], - ); +compile( + verilator_flags2 => ["--bbox-sys"], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_csplit.pl b/test_regress/t/t_flag_csplit.pl index 80675f6e3..334edeb17 100755 --- a/test_regress/t/t_flag_csplit.pl +++ b/test_regress/t/t_flag_csplit.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--trace --output-split 1 --output-split-cfuncs 1"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); my $got1; @@ -22,7 +22,7 @@ foreach my $file (glob("$Self->{obj_dir}/*.cpp")) { $got1 = 1 if $file =~ /__1/; check($file); } -$got1 or $Self->error("No __1 split file found"); +$got1 or error("No __1 split file found"); ok(1); 1; @@ -32,7 +32,7 @@ sub check { my $filename = shift; my $size = -s $filename; printf " File %6d %s\n", $size, $filename if $Self->{verbose}; - my $fh = IO::File->new("<$filename") or $Self->error("$! $filenme"); + my $fh = IO::File->new("<$filename") or error("$! $filenme"); my @funcs; while (defined (my $line = $fh->getline)) { if ($line =~ /^(void|IData)\s+(.*::.*)/) { @@ -50,6 +50,6 @@ sub check { } } if ($#funcs > 0) { - $Self->error("Split had multiple functions in $filename\n\t".join("\n\t",@funcs)); + error("Split had multiple functions in $filename\n\t".join("\n\t",@funcs)); } } diff --git a/test_regress/t/t_flag_debug_noleak.pl b/test_regress/t/t_flag_debug_noleak.pl index 97e7d9366..2b48967e4 100755 --- a/test_regress/t/t_flag_debug_noleak.pl +++ b/test_regress/t/t_flag_debug_noleak.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( v_flags2 => ["--debug --no-debug-leak"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_flag_define.pl b/test_regress/t/t_flag_define.pl index 0ecc0c0ba..59d1d460b 100755 --- a/test_regress/t/t_flag_define.pl +++ b/test_regress/t/t_flag_define.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(vlt => 1); + +compile( v_flags2 => ["-f t/t_flag_define.vc"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_flag_f.pl b/test_regress/t/t_flag_f.pl index 95b6413d6..d153e1bfe 100755 --- a/test_regress/t/t_flag_f.pl +++ b/test_regress/t/t_flag_f.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["-f t/t_flag_f.vc"], - ); +scenarios(vlt => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ["-f t/t_flag_f.vc"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_fi.pl b/test_regress/t/t_flag_fi.pl index 4191f83b6..8acd952d7 100755 --- a/test_regress/t/t_flag_fi.pl +++ b/test_regress/t/t_flag_fi.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["-FI $Self->{t_dir}/t_flag_fi_h.h", - "--exe $Self->{t_dir}/$Self->{name}.cpp"], + "--exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_flag_future.pl b/test_regress/t/t_flag_future.pl index b4298f847..056d0c358 100755 --- a/test_regress/t/t_flag_future.pl +++ b/test_regress/t/t_flag_future.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(vlt => 1); + +compile( make_top_shell => 0, make_main => 0, verilator_flags2 => [qw(--lint-only -Wfuture-FUTURE1 -Wfuture-FUTURE2)], diff --git a/test_regress/t/t_flag_getenv.pl b/test_regress/t/t_flag_getenv.pl index 37a20b3ac..46a0f5603 100755 --- a/test_regress/t/t_flag_getenv.pl +++ b/test_regress/t/t_flag_getenv.pl @@ -7,19 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); $ENV{FOOBARTEST} = "gotit"; -compile ( - v_flags2 => ["--getenv FOOBARTEST"], - expect=> +compile( + v_flags2 => ["--getenv FOOBARTEST"], + expect => 'gotit ', - make_top_shell => 0, - make_main => 0, - verilator_make_gcc => 0, - ); + make_top_shell => 0, + make_main => 0, + verilator_make_gcc => 0, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_language.pl b/test_regress/t/t_flag_language.pl index 7e59fbdca..f0482a0e5 100755 --- a/test_regress/t/t_flag_language.pl +++ b/test_regress/t/t_flag_language.pl @@ -1,13 +1,21 @@ #!/usr/bin/perl if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2008 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. -compile ( - verilator_flags2 => ['--language 1364-2001'], - ); +scenarios(vlt => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['--language 1364-2001'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_ldflags.pl b/test_regress/t/t_flag_ldflags.pl index a1f016a71..dd0a85cd2 100755 --- a/test_regress/t/t_flag_ldflags.pl +++ b/test_regress/t/t_flag_ldflags.pl @@ -7,30 +7,30 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -$Self->run(cmd=>["cd $Self->{obj_dir}" - ." && c++ -c ../../t/t_flag_ldflags_a.cpp" - ." && ar r t_flag_ldflags_a.a t_flag_ldflags_a.o" - ." && ranlib t_flag_ldflags_a.a "], - check_finished=>0); -$Self->run(cmd=>["cd $Self->{obj_dir}" - ." && c++ -fPIC -c ../../t/t_flag_ldflags_so.cpp" - ." && c++ -shared -o t_flag_ldflags_so.so -lc t_flag_ldflags_so.o"], - check_finished=>0); +run(cmd => ["cd $Self->{obj_dir}" + ." && c++ -c ../../t/t_flag_ldflags_a.cpp" + ." && ar r t_flag_ldflags_a.a t_flag_ldflags_a.o" + ." && ranlib t_flag_ldflags_a.a "], + check_finished => 0); +run(cmd => ["cd $Self->{obj_dir}" + ." && c++ -fPIC -c ../../t/t_flag_ldflags_so.cpp" + ." && c++ -shared -o t_flag_ldflags_so.so -lc t_flag_ldflags_so.o"], + check_finished => 0); -compile ( - # Pass multiple -D's so we check quoting works properly - v_flags2 => ["-CFLAGS '-DCFLAGS_FROM_CMDLINE -DCFLAGS2_FROM_CMDLINE' ", - "t/t_flag_ldflags_c.cpp", - "t_flag_ldflags_a.a", - "t_flag_ldflags_so.so",], - ); +compile( + # Pass multiple -D's so we check quoting works properly + v_flags2 => ["-CFLAGS '-DCFLAGS_FROM_CMDLINE -DCFLAGS2_FROM_CMDLINE' ", + "t/t_flag_ldflags_c.cpp", + "t_flag_ldflags_a.a", + "t_flag_ldflags_so.so",], + ); -execute ( - check_finished=>1, - run_env => "LD_LIBRARY_PATH=$Self->{obj_dir}", - ); +execute( + check_finished => 1, + run_env => "LD_LIBRARY_PATH=$Self->{obj_dir}", + ); ok(1); 1; diff --git a/test_regress/t/t_flag_lib.pl b/test_regress/t/t_flag_lib.pl index 38f955272..70632d38a 100755 --- a/test_regress/t/t_flag_lib.pl +++ b/test_regress/t/t_flag_lib.pl @@ -1,13 +1,21 @@ #!/usr/bin/perl if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. -compile ( - v_flags2 => ['-v', 't/t_flag_libinc.v'], - ); +scenarios(vlt => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ['-v', 't/t_flag_libinc.v'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_names.pl b/test_regress/t/t_flag_names.pl index f5b84d9ba..150ac0668 100755 --- a/test_regress/t/t_flag_names.pl +++ b/test_regress/t/t_flag_names.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(vlt => 1); + +compile( verilator_flags2 => ["--mod-prefix modPrefix --top-module t --l2-name l2Name"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_flag_nomod_bad.pl b/test_regress/t/t_flag_nomod_bad.pl index bc8121154..93832c31a 100755 --- a/test_regress/t/t_flag_nomod_bad.pl +++ b/test_regress/t/t_flag_nomod_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Error: No top level module found %Error: Exiting due to', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_flag_parameter.pl b/test_regress/t/t_flag_parameter.pl index 1271079bb..2b3c896c1 100755 --- a/test_regress/t/t_flag_parameter.pl +++ b/test_regress/t/t_flag_parameter.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(vlt => 1); + +compile( # It is not possible to put them into the options file v_flags2 => ['-Gstring1="\"New String\"" -pvalue+string2="\"New String\"" -f t/t_flag_parameter.vc'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_flag_relinc.pl b/test_regress/t/t_flag_relinc.pl index 4e525dcc6..6471e8f90 100755 --- a/test_regress/t/t_flag_relinc.pl +++ b/test_regress/t/t_flag_relinc.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( v_flags2 => ["--relative-includes", - "--lint-only $Self->{t_dir}/t_flag_relinc_dir/chip/t_flag_relinc_sub.v"], + "--lint-only $Self->{t_dir}/t_flag_relinc_dir/chip/t_flag_relinc_sub.v"], make_top_shell => 0, make_main => 0, verilator_make_gcc => 0, diff --git a/test_regress/t/t_flag_skipidentical.pl b/test_regress/t/t_flag_skipidentical.pl index 8881462db..9b05be5ee 100755 --- a/test_regress/t/t_flag_skipidentical.pl +++ b/test_regress/t/t_flag_skipidentical.pl @@ -7,25 +7,25 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); { - compile (); + compile(); my $outfile = "$Self->{obj_dir}/V".$Self->{name}.".cpp"; my @oldstats = stat($outfile); print "Old mtime=",$oldstats[9],"\n"; - $oldstats[9] or $Self->error("No output file found: $outfile\n"); + $oldstats[9] or error("No output file found: $outfile\n"); sleep (1); # Or else it might take < 1 second to compile and see no diff. - compile (); + compile(); my @newstats = stat($outfile); print "New mtime=",$newstats[9],"\n"; ($oldstats[9] == $newstats[9]) - or $Self->error("--skip-identical was ignored -- recompiled\n"); + or error("--skip-identical was ignored -- recompiled\n"); } ok(1); diff --git a/test_regress/t/t_flag_stats.pl b/test_regress/t/t_flag_stats.pl index c79b43f50..addaf5a47 100755 --- a/test_regress/t/t_flag_stats.pl +++ b/test_regress/t/t_flag_stats.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( verilator_flags2 => ["--stats --stats-vars"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_flag_topmod2_bad.pl b/test_regress/t/t_flag_topmod2_bad.pl index 4455e1d02..e749ecd73 100755 --- a/test_regress/t/t_flag_topmod2_bad.pl +++ b/test_regress/t/t_flag_topmod2_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - v_flags2 => ["--top-module a "], - fails=>$Self->{v3}, - nc=>0, # Need to get it not to give the prompt - expect=> +compile( + v_flags2 => ["--top-module a "], + fails => $Self->{vlt}, + nc => 0, # Need to get it not to give the prompt + expect => '%Error: Specified --top-module \'a\' isn.t at the top level, it.s under another cell \'a_top\' %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_flag_topmodule.pl b/test_regress/t/t_flag_topmodule.pl index d8622fec0..8a29e5b05 100755 --- a/test_regress/t/t_flag_topmodule.pl +++ b/test_regress/t/t_flag_topmodule.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - v_flags2 => ["--top-module b "], - ); +compile( + v_flags2 => ["--top-module b "], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_topmodule_bad.pl b/test_regress/t/t_flag_topmodule_bad.pl index 2889e0e75..f65d2074e 100755 --- a/test_regress/t/t_flag_topmodule_bad.pl +++ b/test_regress/t/t_flag_topmodule_bad.pl @@ -7,18 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_flag_topmodule.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - fails=>$Self->{v3}, - nc=>0, # Need to get it not to give the prompt - expect=> +compile( + fails => $Self->{vlt}, + 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.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_flag_topmodule_bad2.pl b/test_regress/t/t_flag_topmodule_bad2.pl index afcdae4f6..58f804727 100755 --- a/test_regress/t/t_flag_topmodule_bad2.pl +++ b/test_regress/t/t_flag_topmodule_bad2.pl @@ -7,18 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_flag_topmodule.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - fails=>$Self->{v3}, - v_flags2 => ["--top-module notfound"], - nc=>0, # Need to get it not to give the prompt - expect=> +compile( + fails => $Self->{vlt}, + 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.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_flag_topmodule_inline.pl b/test_regress/t/t_flag_topmodule_inline.pl index 59c495cb7..71014e108 100755 --- a/test_regress/t/t_flag_topmodule_inline.pl +++ b/test_regress/t/t_flag_topmodule_inline.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - v_flags2 => ["--top-module b"], - ); +compile( + v_flags2 => ["--top-module b"], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_flag_werror_bad1.pl b/test_regress/t/t_flag_werror_bad1.pl index 24ead58f9..9a952a724 100755 --- a/test_regress/t/t_flag_werror_bad1.pl +++ b/test_regress/t/t_flag_werror_bad1.pl @@ -7,18 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_flag_werror.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => q{%Warning-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits. %Warning-WIDTH: Use .* and lint_on around source to disable this message. %Error: Exiting due to}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_flag_werror_bad2.pl b/test_regress/t/t_flag_werror_bad2.pl index c6786b573..11653d135 100755 --- a/test_regress/t/t_flag_werror_bad2.pl +++ b/test_regress/t/t_flag_werror_bad2.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_flag_werror.v"); -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - verilator_flags=> [qw(-cc -Werror-WIDTH)], - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + verilator_flags => [qw(-cc -Werror-WIDTH)], + expect => q{%Error-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits. %Error: Exiting due to}, - ) if $Self->{v3}; + ) if $Self->{vlt}; ok(1); 1; diff --git a/test_regress/t/t_flag_wfatal.pl b/test_regress/t/t_flag_wfatal.pl index 32b8835b8..62c21941c 100755 --- a/test_regress/t/t_flag_wfatal.pl +++ b/test_regress/t/t_flag_wfatal.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_flag_wfatal.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( v_flags2 => ["--lint-only -Wno-fatal"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => q{%Warning-WIDTH: t/t_flag_wfatal.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST '6'h2e' generates 6 bits. %Warning-WIDTH: Use .* and lint_on around source to disable this message. }, diff --git a/test_regress/t/t_flag_woff.pl b/test_regress/t/t_flag_woff.pl index ad3f44ee8..7bbcf0f32 100755 --- a/test_regress/t/t_flag_woff.pl +++ b/test_regress/t/t_flag_woff.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( v_flags2 => ["--lint-only -Wno-WIDTH"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_flag_xinitial_0.pl b/test_regress/t/t_flag_xinitial_0.pl index e0717a7af..ea707b500 100755 --- a/test_regress/t/t_flag_xinitial_0.pl +++ b/test_regress/t/t_flag_xinitial_0.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(vlt_all => 1); + +compile( verilator_flags2 => ["--x-initial 0"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); file_grep_not ("$Self->{obj_dir}/$Self->{VM_PREFIX}.cpp", qr/VL_RAND_RESET/); diff --git a/test_regress/t/t_flag_xinitial_unique.pl b/test_regress/t/t_flag_xinitial_unique.pl index 1183667b0..5af7cb2e3 100755 --- a/test_regress/t/t_flag_xinitial_unique.pl +++ b/test_regress/t/t_flag_xinitial_unique.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(vlt_all => 1); + +compile( verilator_flags2 => ["--x-initial unique"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.cpp", qr/VL_RAND_RESET/); diff --git a/test_regress/t/t_for_break.pl b/test_regress/t/t_for_break.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_for_break.pl +++ b/test_regress/t/t_for_break.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_for_count.pl b/test_regress/t/t_for_count.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_for_count.pl +++ b/test_regress/t/t_for_count.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_for_funcbound.pl b/test_regress/t/t_for_funcbound.pl index 605031e04..808880367 100755 --- a/test_regress/t/t_for_funcbound.pl +++ b/test_regress/t/t_for_funcbound.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - expect=> +compile( + ); + +execute( + check_finished => 1, + expect => '[10] hello [20] world ', diff --git a/test_regress/t/t_for_init_bug.pl b/test_regress/t/t_for_init_bug.pl index abf04bf42..47d4dd0ff 100755 --- a/test_regress/t/t_for_init_bug.pl +++ b/test_regress/t/t_for_init_bug.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -#execute () +compile( + ); + +#execute() ok(1); 1; diff --git a/test_regress/t/t_for_local.pl b/test_regress/t/t_for_local.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_for_local.pl +++ b/test_regress/t/t_for_local.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_for_loop.pl b/test_regress/t/t_for_loop.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_for_loop.pl +++ b/test_regress/t/t_for_loop.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_foreach.pl b/test_regress/t/t_foreach.pl index 6b3172aee..676fb4191 100755 --- a/test_regress/t/t_foreach.pl +++ b/test_regress/t/t_foreach.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--assert'] ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); # We expect all loops should be unrolled by verilator, diff --git a/test_regress/t/t_func.pl b/test_regress/t/t_func.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func.pl +++ b/test_regress/t/t_func.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_bad.pl b/test_regress/t/t_func_bad.pl index a5650262e..7d8f21362 100755 --- a/test_regress/t/t_func_bad.pl +++ b/test_regress/t/t_func_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_func_bad.v:\d+: Missing argument on non-defaulted argument 'from2' in function call to FUNC 'add' %Error: t/t_func_bad.v:\d+: Too many arguments in function call to FUNC 'add' %Error: t/t_func_bad.v:\d+: Missing argument on non-defaulted argument 'y' in function call to TASK 'x' @@ -19,7 +21,7 @@ q{%Error: t/t_func_bad.v:\d+: Missing argument on non-defaulted argument 'from2' %Error: t/t_func_bad.v:\d+: Duplicate argument 'dup' in function call to FUNC 'f' %Error: t/t_func_bad.v:\d+: Too many arguments in function call to FUNC 'f' %Error: Exiting due to}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_bad2.pl b/test_regress/t/t_func_bad2.pl index 69f33cd91..d14343d8d 100755 --- a/test_regress/t/t_func_bad2.pl +++ b/test_regress/t/t_func_bad2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + fails => $Self->{vlt}, + expect => '%Error: t/t_func_bad2.v:\d+: Unsupported: Recursive function or task call %Error: Exiting due to', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_bad_width.pl b/test_regress/t/t_func_bad_width.pl index 9689e4165..499ff7a4e 100755 --- a/test_regress/t/t_func_bad_width.pl +++ b/test_regress/t/t_func_bad_width.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => q{%Warning-WIDTH: t/t_func_bad_width.v:\d+: Operator FUNCREF 'MUX' expects 40 bits on the Function Argument, but Function Argument's VARREF 'in' generates 39 bits. %Warning-WIDTH: Use [^\n]+ %Warning-WIDTH: t/t_func_bad_width.v:\d+: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS.s FUNCREF 'MUX' generates 32 bits. %Error: Exiting due to}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_begin2.pl b/test_regress/t/t_func_begin2.pl index 08fffbff9..acfde8d55 100755 --- a/test_regress/t/t_func_begin2.pl +++ b/test_regress/t/t_func_begin2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only --inline-mult 1"], verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_check.pl b/test_regress/t/t_func_check.pl index 27400b3f9..06f37f010 100755 --- a/test_regress/t/t_func_check.pl +++ b/test_regress/t/t_func_check.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{verilated_randReset} = 1; -compile ( - ); +compile( + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_const.pl b/test_regress/t/t_func_const.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_const.pl +++ b/test_regress/t/t_func_const.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_const2_bad.pl b/test_regress/t/t_func_const2_bad.pl index a3319eb7b..83548112c 100755 --- a/test_regress/t/t_func_const2_bad.pl +++ b/test_regress/t/t_func_const2_bad.pl @@ -6,11 +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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -# -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> + +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-USERFATAL: f_add = 15 %Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. %Error: t/t_func_const2_bad.v:10: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' @@ -25,7 +27,7 @@ t/t_func_const2_bad.v:10: f_add2() with parameters: b = ?32?sh8 c = ?32?sh9 }, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_const_bad.pl b/test_regress/t/t_func_const_bad.pl index 90b9b276d..ac440c192 100755 --- a/test_regress/t/t_func_const_bad.pl +++ b/test_regress/t/t_func_const_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_func_const_bad.v:11: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_output' %Error: t/t_func_const_bad.v:12: ... Location of non-constant VAR 'o': Language violation: Outputs not allowed in constant functions %Error: t/t_func_const_bad.v:20: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_bad_dotted' @@ -44,7 +46,7 @@ Called from: t/t_func_const_bad.v:49: f_bad_fatal() with parameters: a = ?32?sh3 }, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_const_packed_array_bad.pl b/test_regress/t/t_func_const_packed_array_bad.pl index 7620c90f2..1c4925e5a 100755 --- a/test_regress/t/t_func_const_packed_array_bad.pl +++ b/test_regress/t/t_func_const_packed_array_bad.pl @@ -6,11 +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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -# -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> + +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-USERFATAL: f_add = 15 %Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. %Error: t/t_func_const_packed_array_bad.v:11: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' @@ -24,7 +26,7 @@ t/t_func_const_packed_array_bad.v:11: f_add2() with parameters: b = ?32?sh8 c = ?32?sh9 }, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_const_packed_struct_bad.pl b/test_regress/t/t_func_const_packed_struct_bad.pl index dc9b98867..b07a16aa8 100755 --- a/test_regress/t/t_func_const_packed_struct_bad.pl +++ b/test_regress/t/t_func_const_packed_struct_bad.pl @@ -6,11 +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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -# -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> + +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-USERFATAL: f_add = 15 %Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. %Error: t/t_func_const_packed_struct_bad.v:13: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' @@ -24,7 +26,7 @@ t/t_func_const_packed_struct_bad.v:13: f_add2() with parameters: b = ?32?sh8 c = ?32?sh9 }, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_const_packed_struct_bad2.pl b/test_regress/t/t_func_const_packed_struct_bad2.pl index 99d9651d8..d61e7daeb 100755 --- a/test_regress/t/t_func_const_packed_struct_bad2.pl +++ b/test_regress/t/t_func_const_packed_struct_bad2.pl @@ -6,11 +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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -# -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> + +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-USERFATAL: f_add = 15 %Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. %Error: t/t_func_const_packed_struct_bad2.v:19: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' @@ -24,7 +26,7 @@ t/t_func_const_packed_struct_bad2.v:19: f_add2() with parameters: b = ?32?sh8 c = ?32?sh9 }, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_const_struct_bad.pl b/test_regress/t/t_func_const_struct_bad.pl index f19d1e1ef..5395c257e 100755 --- a/test_regress/t/t_func_const_struct_bad.pl +++ b/test_regress/t/t_func_const_struct_bad.pl @@ -6,11 +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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -# -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> + +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-USERFATAL: f_add = 15 %Warning-USERFATAL: Use "/* verilator lint_off USERFATAL */" and lint_on around source to disable this message. %Error: t/t_func_const_struct_bad.v:16: Expecting expression to be constant, but can't determine constant for FUNCREF 'f_add2' @@ -24,7 +26,7 @@ t/t_func_const_struct_bad.v:16: f_add2() with parameters: b = ?32?sh8 c = ?32?sh9 }, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_crc.pl b/test_regress/t/t_func_crc.pl index dccd4cf50..803dca735 100755 --- a/test_regress/t/t_func_crc.pl +++ b/test_regress/t/t_func_crc.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_default_warn.pl b/test_regress/t/t_func_default_warn.pl index 04736eb19..5f07268a6 100755 --- a/test_regress/t/t_func_default_warn.pl +++ b/test_regress/t/t_func_default_warn.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["-Wno-WIDTH"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_defaults.pl b/test_regress/t/t_func_defaults.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_func_defaults.pl +++ b/test_regress/t/t_func_defaults.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_dotted_inl0.pl b/test_regress/t/t_func_dotted_inl0.pl index 416707fb9..af2faf33f 100755 --- a/test_regress/t/t_func_dotted_inl0.pl +++ b/test_regress/t/t_func_dotted_inl0.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_func_dotted.v"); -compile ( - v_flags2 => ['+define+NOUSE_INLINE',], - ); +compile( + v_flags2 => ['+define+NOUSE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_dotted_inl1.pl b/test_regress/t/t_func_dotted_inl1.pl index 243dfe84b..0f9ea98bd 100755 --- a/test_regress/t/t_func_dotted_inl1.pl +++ b/test_regress/t/t_func_dotted_inl1.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_func_dotted.v"); -compile ( - v_flags2 => ['+define+USE_INLINE',], - ); +compile( + v_flags2 => ['+define+USE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_dotted_inl2.pl b/test_regress/t/t_func_dotted_inl2.pl index 8e2852494..fc71dbbca 100755 --- a/test_regress/t/t_func_dotted_inl2.pl +++ b/test_regress/t/t_func_dotted_inl2.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_func_dotted.v"); -compile ( - v_flags2 => ['+define+USE_INLINE_MID',], - ); +compile( + v_flags2 => ['+define+USE_INLINE_MID',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_endian.pl b/test_regress/t/t_func_endian.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_endian.pl +++ b/test_regress/t/t_func_endian.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_endian.v b/test_regress/t/t_func_endian.v index 5df5ca198..1fe1d3fa8 100644 --- a/test_regress/t/t_func_endian.v +++ b/test_regress/t/t_func_endian.v @@ -21,13 +21,11 @@ module t (/*AUTOARG*/ /*AUTOWIRE*/ // Beginning of automatic wires (for undeclared instantiated-module outputs) wire [31:0] out; // From test of Test.v - wire [31:0] swapped; // From test of Test.v // End of automatics Test test (/*AUTOINST*/ // Outputs .out (out[31:0]), - .swapped (swapped[31:0]), // Inputs .clk (clk), .noswap (noswap), @@ -67,7 +65,7 @@ endmodule module Test (/*AUTOARG*/ // Outputs - out, swapped, + out, // Inputs clk, noswap, nibble, in ); @@ -78,7 +76,6 @@ module Test (/*AUTOARG*/ input [31:0] in; output [31:0] out; - output [31:0] swapped; function [7:0] EndianSwap; input Nibble; @@ -98,12 +95,4 @@ module Test (/*AUTOARG*/ : EndianSwap(nibble, in[15:8])); assign out[7:0] = (noswap ? in[7:0] : EndianSwap(nibble, in[7:0])); - - reg [31:0] swapped; - always @(posedge clk) begin - swapped[31:24] <= EndianSwap(nibble, in[31:24]); - swapped[23:16] <= EndianSwap(nibble, in[23:16]); - swapped[15:8] <= EndianSwap(nibble, in[15:8] ); - swapped[7:0] <= EndianSwap(nibble, in[7:0] ); - end endmodule diff --git a/test_regress/t/t_func_first.pl b/test_regress/t/t_func_first.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_first.pl +++ b/test_regress/t/t_func_first.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_flip.pl b/test_regress/t/t_func_flip.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_flip.pl +++ b/test_regress/t/t_func_flip.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_gen.pl b/test_regress/t/t_func_gen.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_gen.pl +++ b/test_regress/t/t_func_gen.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_graphcirc.pl b/test_regress/t/t_func_graphcirc.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_graphcirc.pl +++ b/test_regress/t/t_func_graphcirc.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_grey.pl b/test_regress/t/t_func_grey.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_grey.pl +++ b/test_regress/t/t_func_grey.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_lib.pl b/test_regress/t/t_func_lib.pl index e0169b77e..e002e1c21 100755 --- a/test_regress/t/t_func_lib.pl +++ b/test_regress/t/t_func_lib.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ['-v', 't/t_func_lib_sub.v'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ['-v', 't/t_func_lib_sub.v'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_lib_sub.pl b/test_regress/t/t_func_lib_sub.pl index 79580b4a7..95facfefc 100755 --- a/test_regress/t/t_func_lib_sub.pl +++ b/test_regress/t/t_func_lib_sub.pl @@ -7,10 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - ); +compile( + ); # No execute ok(1); 1; diff --git a/test_regress/t/t_func_mlog2.pl b/test_regress/t/t_func_mlog2.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_mlog2.pl +++ b/test_regress/t/t_func_mlog2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_named.pl b/test_regress/t/t_func_named.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_func_named.pl +++ b/test_regress/t/t_func_named.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_noinl.pl b/test_regress/t/t_func_noinl.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_noinl.pl +++ b/test_regress/t/t_func_noinl.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_numones.pl b/test_regress/t/t_func_numones.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_numones.pl +++ b/test_regress/t/t_func_numones.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_outfirst.pl b/test_regress/t/t_func_outfirst.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_outfirst.pl +++ b/test_regress/t/t_func_outfirst.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_outp.pl b/test_regress/t/t_func_outp.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_outp.pl +++ b/test_regress/t/t_func_outp.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_paramed.pl b/test_regress/t/t_func_paramed.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_paramed.pl +++ b/test_regress/t/t_func_paramed.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_plog.pl b/test_regress/t/t_func_plog.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_plog.pl +++ b/test_regress/t/t_func_plog.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_public.pl b/test_regress/t/t_func_public.pl index bd8fd8c45..a29ba45ad 100755 --- a/test_regress/t/t_func_public.pl +++ b/test_regress/t/t_func_public.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['+define+VERILATOR_PUBLIC_TASKS'], - fails => $fail, - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['+define+VERILATOR_PUBLIC_TASKS'], + fails => $fail, + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_public_trace.pl b/test_regress/t/t_func_public_trace.pl index bc1d49232..74b4c78ea 100755 --- a/test_regress/t/t_func_public_trace.pl +++ b/test_regress/t/t_func_public_trace.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -my $pubtask = ($Self->{v3} && verilator_version() =~ /\(public_tasks\)/); # TBD +scenarios(simulator => 1); + +my $pubtask = ($Self->{vlt} && verilator_version() =~ /\(public_tasks\)/); # TBD top_filename("t/t_func_public.v"); -compile ( - verilator_flags2 => [($pubtask?'-DVERILATOR_PUBLIC_TASKS':''), "--trace"], - fails => $fail, - ); +compile( + verilator_flags2 => [($pubtask?'-DVERILATOR_PUBLIC_TASKS':''), "--trace"], + fails => $fail, + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_rand.pl b/test_regress/t/t_func_rand.pl index db8cb35f9..6c781245e 100755 --- a/test_regress/t/t_func_rand.pl +++ b/test_regress/t/t_func_rand.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], - ); +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_range.pl b/test_regress/t/t_func_range.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_range.pl +++ b/test_regress/t/t_func_range.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_real_abs.pl b/test_regress/t/t_func_real_abs.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_func_real_abs.pl +++ b/test_regress/t/t_func_real_abs.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_real_param.pl b/test_regress/t/t_func_real_param.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_real_param.pl +++ b/test_regress/t/t_func_real_param.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_regfirst.pl b/test_regress/t/t_func_regfirst.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_regfirst.pl +++ b/test_regress/t/t_func_regfirst.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_return.pl b/test_regress/t/t_func_return.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_return.pl +++ b/test_regress/t/t_func_return.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_sum.pl b/test_regress/t/t_func_sum.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_sum.pl +++ b/test_regress/t/t_func_sum.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_task_bad.pl b/test_regress/t/t_func_task_bad.pl index cb13de9e8..0c15dee26 100755 --- a/test_regress/t/t_func_task_bad.pl +++ b/test_regress/t/t_func_task_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_func_task_bad.v:\d+: Illegal call of a task as a function: task_as_func %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_tie_bad.pl b/test_regress/t/t_func_tie_bad.pl index 23ee4055b..46d459dcb 100755 --- a/test_regress/t/t_func_tie_bad.pl +++ b/test_regress/t/t_func_tie_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_func_tie_bad.v:\d+: Function/task output connected to constant instead of variable: b %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_func_twocall.pl b/test_regress/t/t_func_twocall.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_twocall.pl +++ b/test_regress/t/t_func_twocall.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_types.pl b/test_regress/t/t_func_types.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_types.pl +++ b/test_regress/t/t_func_types.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_under.pl b/test_regress/t/t_func_under.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_func_under.pl +++ b/test_regress/t/t_func_under.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_under2.pl b/test_regress/t/t_func_under2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_func_under2.pl +++ b/test_regress/t/t_func_under2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_v.pl b/test_regress/t/t_func_v.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_func_v.pl +++ b/test_regress/t/t_func_v.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_v_noinl.pl b/test_regress/t/t_func_v_noinl.pl index e271e1195..fd294abcb 100755 --- a/test_regress/t/t_func_v_noinl.pl +++ b/test_regress/t/t_func_v_noinl.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_func_v.v"); -compile ( +compile( v_flags2 => ['+define+T_FUNC_V_NOINL',], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_func_wide.pl b/test_regress/t/t_func_wide.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_func_wide.pl +++ b/test_regress/t/t_func_wide.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_func_wide_out_bad.pl b/test_regress/t/t_func_wide_out_bad.pl index 195a6f8d8..ec42e1260 100755 --- a/test_regress/t/t_func_wide_out_bad.pl +++ b/test_regress/t/t_func_wide_out_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_func_wide_out_bad.v:\d+: Unsupported: Function output argument 'data' requires 4352 bits, but connection's VARREF 'msg' generates 4350 bits. %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_gate_array.pl b/test_regress/t/t_gate_array.pl index 30da50378..b1acebe26 100755 --- a/test_regress/t/t_gate_array.pl +++ b/test_regress/t/t_gate_array.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_gate_basic.pl b/test_regress/t/t_gate_basic.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_gate_basic.pl +++ b/test_regress/t/t_gate_basic.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gate_chained.pl b/test_regress/t/t_gate_chained.pl index 4c6b9aeae..f77d4afd1 100755 --- a/test_regress/t/t_gate_chained.pl +++ b/test_regress/t/t_gate_chained.pl @@ -8,6 +8,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. use IO::File; +scenarios(simulator => 1); + sub gen { my $filename = shift; @@ -41,12 +43,12 @@ top_filename("$Self->{obj_dir}/t_gate_chained.v"); gen($Self->{top_filename}); -compile ( +compile( verilator_flags2=>["--stats --x-assign fast --x-initial fast"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); # Must be <<9000 above to prove this worked diff --git a/test_regress/t/t_gate_elim.pl b/test_regress/t/t_gate_elim.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_gate_elim.pl +++ b/test_regress/t/t_gate_elim.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gate_implicit.pl b/test_regress/t/t_gate_implicit.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gate_implicit.pl +++ b/test_regress/t/t_gate_implicit.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gate_unsup.pl b/test_regress/t/t_gate_unsup.pl index cf12070f2..a45d22739 100755 --- a/test_regress/t/t_gate_unsup.pl +++ b/test_regress/t/t_gate_unsup.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( # Unsupported: UDP Tables make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_gated_clk_1.pl b/test_regress/t/t_gated_clk_1.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_gated_clk_1.pl +++ b/test_regress/t/t_gated_clk_1.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_gen_alw.pl b/test_regress/t/t_gen_alw.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_alw.pl +++ b/test_regress/t/t_gen_alw.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_assign.pl b/test_regress/t/t_gen_assign.pl index d39b6f866..45e24b34a 100755 --- a/test_regress/t/t_gen_assign.pl +++ b/test_regress/t/t_gen_assign.pl @@ -7,10 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - ); +compile( + ); ok(1); 1; diff --git a/test_regress/t/t_gen_cond_bitrange.pl b/test_regress/t/t_gen_cond_bitrange.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_cond_bitrange.pl +++ b/test_regress/t/t_gen_cond_bitrange.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_cond_bitrange_bad.pl b/test_regress/t/t_gen_cond_bitrange_bad.pl index 704fafa6a..3cec319f2 100755 --- a/test_regress/t/t_gen_cond_bitrange_bad.pl +++ b/test_regress/t/t_gen_cond_bitrange_bad.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 %Warning-SELRANGE: Use .* %Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 %Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 %Warning-SELRANGE: t/t_gen_cond_bitrange_bad.v:\d+: Selection index out of range: 2:2 outside 1:0 %Error: Exiting due to .*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_gen_cond_const.pl b/test_regress/t/t_gen_cond_const.pl index 304357b8c..549d3c8f8 100755 --- a/test_regress/t/t_gen_cond_const.pl +++ b/test_regress/t/t_gen_cond_const.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--language 1364-2001"] - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--language 1364-2001"] + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_defparam.pl b/test_regress/t/t_gen_defparam.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_defparam.pl +++ b/test_regress/t/t_gen_defparam.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_div0.pl b/test_regress/t/t_gen_div0.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_div0.pl +++ b/test_regress/t/t_gen_div0.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_for.pl b/test_regress/t/t_gen_for.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_for.pl +++ b/test_regress/t/t_gen_for.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_for0.pl b/test_regress/t/t_gen_for0.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_for0.pl +++ b/test_regress/t/t_gen_for0.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_for1.pl b/test_regress/t/t_gen_for1.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_for1.pl +++ b/test_regress/t/t_gen_for1.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_for2.pl b/test_regress/t/t_gen_for2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_gen_for2.pl +++ b/test_regress/t/t_gen_for2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_gen_for_overlap.pl b/test_regress/t/t_gen_for_overlap.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_gen_for_overlap.pl +++ b/test_regress/t/t_gen_for_overlap.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_gen_for_shuffle.pl b/test_regress/t/t_gen_for_shuffle.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_for_shuffle.pl +++ b/test_regress/t/t_gen_for_shuffle.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_forif.pl b/test_regress/t/t_gen_forif.pl index 715674488..26ef67a0b 100755 --- a/test_regress/t/t_gen_forif.pl +++ b/test_regress/t/t_gen_forif.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - nc_flags2 => ['+access+r'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + nc_flags2 => ['+access+r'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_if.pl b/test_regress/t/t_gen_if.pl index 259d5b775..33ff6d6c0 100755 --- a/test_regress/t/t_gen_if.pl +++ b/test_regress/t/t_gen_if.pl @@ -7,10 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - ); +compile( + ); ok(1); 1; diff --git a/test_regress/t/t_gen_inc.pl b/test_regress/t/t_gen_inc.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_inc.pl +++ b/test_regress/t/t_gen_inc.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_index.pl b/test_regress/t/t_gen_index.pl index 8e68549ed..b9cf6967c 100755 --- a/test_regress/t/t_gen_index.pl +++ b/test_regress/t/t_gen_index.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Compile time only test -compile ( +compile( ); ok(1); diff --git a/test_regress/t/t_gen_intdot.pl b/test_regress/t/t_gen_intdot.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_intdot.pl +++ b/test_regress/t/t_gen_intdot.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_intdot.v b/test_regress/t/t_gen_intdot.v index 54c18423d..fe457f57d 100644 --- a/test_regress/t/t_gen_intdot.v +++ b/test_regress/t/t_gen_intdot.v @@ -3,6 +3,8 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003-2007 by Wilson Snyder. +`define STRINGIFY(x) `"x`" + module t (/*AUTOARG*/ // Inputs clk @@ -40,7 +42,7 @@ module t (/*AUTOARG*/ //`define WAVES `ifdef WAVES initial begin - $dumpfile("obj_dir/t_gen_intdot/t_gen_intdot.vcd"); + $dumpfile({`STRINGIFY(`TEST_OBJ_DIR),"/simx.vcd"}); $dumpvars(12, t); end `endif diff --git a/test_regress/t/t_gen_intdot2.pl b/test_regress/t/t_gen_intdot2.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_intdot2.pl +++ b/test_regress/t/t_gen_intdot2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_intdot2.v b/test_regress/t/t_gen_intdot2.v index f0212e91a..75a4d51ab 100644 --- a/test_regress/t/t_gen_intdot2.v +++ b/test_regress/t/t_gen_intdot2.v @@ -3,6 +3,8 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003-2007 by Wilson Snyder. +`define STRINGIFY(x) `"x`" + module t (/*AUTOARG*/ // Inputs clk @@ -33,7 +35,7 @@ module t (/*AUTOARG*/ //`define WAVES `ifdef WAVES initial begin - $dumpfile("obj_dir/t_gen_intdot2/t_gen_intdot.vcd"); + $dumpfile({`STRINGIFY(`TEST_OBJ_DIR),"/simx.vcd"}); $dumpvars(12, t); end `endif diff --git a/test_regress/t/t_gen_local.pl b/test_regress/t/t_gen_local.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_local.pl +++ b/test_regress/t/t_gen_local.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_lsb.pl b/test_regress/t/t_gen_lsb.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_gen_lsb.pl +++ b/test_regress/t/t_gen_lsb.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_gen_mislevel.pl b/test_regress/t/t_gen_mislevel.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_gen_mislevel.pl +++ b/test_regress/t/t_gen_mislevel.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_missing.pl b/test_regress/t/t_gen_missing.pl index bfdf34e07..5582e61c4 100755 --- a/test_regress/t/t_gen_missing.pl +++ b/test_regress/t/t_gen_missing.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ['+define+T_GEN_MISSING'], ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_gen_missing_bad.pl b/test_regress/t/t_gen_missing_bad.pl index 7710a9ab5..407bc7eb2 100755 --- a/test_regress/t/t_gen_missing_bad.pl +++ b/test_regress/t/t_gen_missing_bad.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_gen_missing.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); -compile ( +compile( v_flags2 => ['+define+T_GEN_MISSING_BAD'], fails => 1, - expect=> + expect => '%Error: t/t_gen_missing.v:\d+: Cannot find file containing module: foo_not_needed %Error: t/t_gen_missing.v:\d+: Looked in: %Error: t/t_gen_missing.v:\d+: t/foo_not_needed diff --git a/test_regress/t/t_gen_upscope.pl b/test_regress/t/t_gen_upscope.pl index 1d26eb10b..7b502e256 100755 --- a/test_regress/t/t_gen_upscope.pl +++ b/test_regress/t/t_gen_upscope.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, - expect=>quotemeta( +execute( + check_finished => 1, + expect => quotemeta( q{created tag with scope = top.t.b.gen[0].tag created tag with scope = top.t.b.gen[1].tag created tag with scope = top.t.tag diff --git a/test_regress/t/t_gen_var_bad.pl b/test_regress/t/t_gen_var_bad.pl index c7ce268c2..c4230c3cf 100755 --- a/test_regress/t/t_gen_var_bad.pl +++ b/test_regress/t/t_gen_var_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '.*%Error: t/t_gen_var_bad.v:\d+: Non-genvar used in generate for: i %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_genfor_hier.pl b/test_regress/t/t_genfor_hier.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_genfor_hier.pl +++ b/test_regress/t/t_genfor_hier.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_genvar_misuse_bad.pl b/test_regress/t/t_genvar_misuse_bad.pl index 38624e801..4bac96d95 100755 --- a/test_regress/t/t_genvar_misuse_bad.pl +++ b/test_regress/t/t_genvar_misuse_bad.pl @@ -7,15 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug408"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug408"); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '.*%Error: t/t_genvar_misuse_bad.v:\d+: Use of genvar where not convertible to constant: i %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_help.pl b/test_regress/t/t_help.pl index a69698231..057320634 100755 --- a/test_regress/t/t_help.pl +++ b/test_regress/t/t_help.pl @@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(dist => 1); foreach my $prog ( "../bin/verilator", @@ -15,11 +15,11 @@ foreach my $prog ( "../bin/verilator_difftree", "../bin/verilator_profcfunc", ) { - $Self->run(fails=>1, - cmd=>["perl",$prog, - "--help"], - logfile=>"$Self->{obj_dir}/t_help.log", - tee=>0, + run(fails => 1, + cmd => ["perl",$prog, + "--help"], + logfile => "$Self->{obj_dir}/t_help.log", + tee => 0, ); file_grep ("$Self->{obj_dir}/t_help.log", qr/DISTRIBUTION/i); } diff --git a/test_regress/t/t_hierarchy_identifier.pl b/test_regress/t/t_hierarchy_identifier.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_hierarchy_identifier.pl +++ b/test_regress/t/t_hierarchy_identifier.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_hierarchy_identifier_bad.pl b/test_regress/t/t_hierarchy_identifier_bad.pl index 45c69b502..5f1ed88d5 100755 --- a/test_regress/t/t_hierarchy_identifier_bad.pl +++ b/test_regress/t/t_hierarchy_identifier_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:\d+: End label 'if_cnt_finish_bad' does not match begin label 'if_cnt_finish' %Warning-ENDLABEL: Use .* %Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:\d+: End label 'generate_for_bad' does not match begin label 'generate_for' diff --git a/test_regress/t/t_hierarchy_unnamed.pl b/test_regress/t/t_hierarchy_unnamed.pl index 514f638f2..dd4decbdb 100755 --- a/test_regress/t/t_hierarchy_unnamed.pl +++ b/test_regress/t/t_hierarchy_unnamed.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_if_deep.pl b/test_regress/t/t_if_deep.pl index dccd4cf50..803dca735 100755 --- a/test_regress/t/t_if_deep.pl +++ b/test_regress/t/t_if_deep.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_init_concat.pl b/test_regress/t/t_init_concat.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_init_concat.pl +++ b/test_regress/t/t_init_concat.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_initarray_nonarray.pl b/test_regress/t/t_initarray_nonarray.pl index 385b6a57e..5c448de7c 100755 --- a/test_regress/t/t_initarray_nonarray.pl +++ b/test_regress/t/t_initarray_nonarray.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); ok(1); diff --git a/test_regress/t/t_initial.pl b/test_regress/t/t_initial.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_initial.pl +++ b/test_regress/t/t_initial.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_initial_dlyass.pl b/test_regress/t/t_initial_dlyass.pl index fc8d21fa6..8b4eb7d5d 100755 --- a/test_regress/t/t_initial_dlyass.pl +++ b/test_regress/t/t_initial_dlyass.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['-Wno-INITIALDLY'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_initial_dlyass_bad.pl b/test_regress/t/t_initial_dlyass_bad.pl index b0af1d491..ab06709d5 100755 --- a/test_regress/t/t_initial_dlyass_bad.pl +++ b/test_regress/t/t_initial_dlyass_bad.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t_initial_dlyass.v"); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => qr{%Warning-INITIALDLY: t/t_initial_dlyass.v:\d+: Delayed assignments .* %Error: Exiting due to.*}, ); diff --git a/test_regress/t/t_initial_edge.pl b/test_regress/t/t_initial_edge.pl index 8a07c2001..a07391fc7 100755 --- a/test_regress/t/t_initial_edge.pl +++ b/test_regress/t/t_initial_edge.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--x-initial-edge"] ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_initial_edge_bad.pl b/test_regress/t/t_initial_edge_bad.pl index f8eccd9c8..3a4a9fa92 100755 --- a/test_regress/t/t_initial_edge_bad.pl +++ b/test_regress/t/t_initial_edge_bad.pl @@ -7,16 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +# This works with other vlt_alls, we we don't run it for them. It should +# fail with Verilator if --x-initial-edge is not specified. + +scenarios(vlt_all => 1); + top_filename("t/t_initial_edge.v"); -# This works with other simulators, we we don't run it for them. It should -# fail with Verilator if --x-initial-edge is not specified. -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( ); -execute ( +execute( fails => 1, ); diff --git a/test_regress/t/t_inside.pl b/test_regress/t/t_inside.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inside.pl +++ b/test_regress/t/t_inside.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inside_wild.pl b/test_regress/t/t_inside_wild.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inside_wild.pl +++ b/test_regress/t/t_inside_wild.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_aport.pl b/test_regress/t/t_inst_aport.pl index e5854cbed..adbfdeea8 100755 --- a/test_regress/t/t_inst_aport.pl +++ b/test_regress/t/t_inst_aport.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->unsupported("Verilator/commercial slice unsupported, bug711"); +scenarios(simulator => 1); +unsupported("Verilator/commercial slice unsupported, bug711"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_array_bad.pl b/test_regress/t/t_inst_array_bad.pl index 5e134d0ba..dc544d3d6 100755 --- a/test_regress/t/t_inst_array_bad.pl +++ b/test_regress/t/t_inst_array_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_inst_array_bad.v:\d+: Input port connection 'onebit' as part of a module instance array requires 1 or 8 bits, but connection's VARREF 'onebitbad' generates 9 bits. %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_array_inl0.pl b/test_regress/t/t_inst_array_inl0.pl index f03ad145d..c4cccd0b0 100755 --- a/test_regress/t/t_inst_array_inl0.pl +++ b/test_regress/t/t_inst_array_inl0.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_array.v"); -compile ( - v_flags2 => ['+define+NOUSE_INLINE',], - ); +compile( + v_flags2 => ['+define+NOUSE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_array_inl1.pl b/test_regress/t/t_inst_array_inl1.pl index 06725c5c6..497533ec6 100755 --- a/test_regress/t/t_inst_array_inl1.pl +++ b/test_regress/t/t_inst_array_inl1.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_array.v"); -compile ( - v_flags2 => ['+define+USE_INLINE',], - ); +compile( + v_flags2 => ['+define+USE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_array_partial.pl b/test_regress/t/t_inst_array_partial.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_inst_array_partial.pl +++ b/test_regress/t/t_inst_array_partial.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_ccall.pl b/test_regress/t/t_inst_ccall.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_inst_ccall.pl +++ b/test_regress/t/t_inst_ccall.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_comma_inl0.pl b/test_regress/t/t_inst_comma_inl0.pl index 1edc160f1..b9b6bc01a 100755 --- a/test_regress/t/t_inst_comma_inl0.pl +++ b/test_regress/t/t_inst_comma_inl0.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_comma.v"); -compile ( - v_flags2 => ['+define+NOUSE_INLINE',], - ); +compile( + v_flags2 => ['+define+NOUSE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_comma_inl1.pl b/test_regress/t/t_inst_comma_inl1.pl index 7f7f4aeda..553b96107 100755 --- a/test_regress/t/t_inst_comma_inl1.pl +++ b/test_regress/t/t_inst_comma_inl1.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_comma.v"); -compile ( - v_flags2 => ['+define+USE_INLINE',], - ); +compile( + v_flags2 => ['+define+USE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_darray.pl b/test_regress/t/t_inst_darray.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_darray.pl +++ b/test_regress/t/t_inst_darray.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dff.pl b/test_regress/t/t_inst_dff.pl index 30da50378..b1acebe26 100755 --- a/test_regress/t/t_inst_dff.pl +++ b/test_regress/t/t_inst_dff.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inla.pl b/test_regress/t/t_inst_dtree_inla.pl index fe688b136..3862d5166 100755 --- a/test_regress/t/t_inst_dtree_inla.pl +++ b/test_regress/t/t_inst_dtree_inla.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlab.pl b/test_regress/t/t_inst_dtree_inlab.pl index 01b6ddf38..a17eec491 100755 --- a/test_regress/t/t_inst_dtree_inlab.pl +++ b/test_regress/t/t_inst_dtree_inlab.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A +define+INLINE_B'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlac.pl b/test_regress/t/t_inst_dtree_inlac.pl index 1125007cf..31f5e113c 100755 --- a/test_regress/t/t_inst_dtree_inlac.pl +++ b/test_regress/t/t_inst_dtree_inlac.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A +define+INLINE_C'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlad.pl b/test_regress/t/t_inst_dtree_inlad.pl index 691fa1822..c9aa2cfec 100755 --- a/test_regress/t/t_inst_dtree_inlad.pl +++ b/test_regress/t/t_inst_dtree_inlad.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A +define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlb.pl b/test_regress/t/t_inst_dtree_inlb.pl index 3113b83b1..ddf31e7f3 100755 --- a/test_regress/t/t_inst_dtree_inlb.pl +++ b/test_regress/t/t_inst_dtree_inlb.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_B'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlbc.pl b/test_regress/t/t_inst_dtree_inlbc.pl index cb87439b8..f2046ecfb 100755 --- a/test_regress/t/t_inst_dtree_inlbc.pl +++ b/test_regress/t/t_inst_dtree_inlbc.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_B +define+INLINE_C'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlbd.pl b/test_regress/t/t_inst_dtree_inlbd.pl index bfffeb2fa..d9a539536 100755 --- a/test_regress/t/t_inst_dtree_inlbd.pl +++ b/test_regress/t/t_inst_dtree_inlbd.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_B +define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlc.pl b/test_regress/t/t_inst_dtree_inlc.pl index 06ac28071..c36be6cda 100755 --- a/test_regress/t/t_inst_dtree_inlc.pl +++ b/test_regress/t/t_inst_dtree_inlc.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_C'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inlcd.pl b/test_regress/t/t_inst_dtree_inlcd.pl index 1023f1a43..fcc73c54d 100755 --- a/test_regress/t/t_inst_dtree_inlcd.pl +++ b/test_regress/t/t_inst_dtree_inlcd.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_C +define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_dtree_inld.pl b/test_regress/t/t_inst_dtree_inld.pl index bfb903e56..5c16b1988 100755 --- a/test_regress/t/t_inst_dtree_inld.pl +++ b/test_regress/t/t_inst_dtree_inld.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_dtree.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_first.pl b/test_regress/t/t_inst_first.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_first.pl +++ b/test_regress/t/t_inst_first.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_implicit.pl b/test_regress/t/t_inst_implicit.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_implicit.pl +++ b/test_regress/t/t_inst_implicit.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_misarray_bad.pl b/test_regress/t/t_inst_misarray_bad.pl index aa6e86031..b87a8f781 100755 --- a/test_regress/t/t_inst_misarray_bad.pl +++ b/test_regress/t/t_inst_misarray_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => q{%Error: t/t_inst_misarray_bad.v:16: VARREF 't.foo' is not an unpacked array, but is in an unpacked array context %Error: Exiting due to.*}, ); diff --git a/test_regress/t/t_inst_mism.pl b/test_regress/t/t_inst_mism.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_mism.pl +++ b/test_regress/t/t_inst_mism.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_missing.pl b/test_regress/t/t_inst_missing.pl index 42325c365..20cf980fd 100755 --- a/test_regress/t/t_inst_missing.pl +++ b/test_regress/t/t_inst_missing.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only --Wall -Wno-DECLFILENAME"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_inst_missing_bad.pl b/test_regress/t/t_inst_missing_bad.pl index 6db6466b5..cac41ce28 100755 --- a/test_regress/t/t_inst_missing_bad.pl +++ b/test_regress/t/t_inst_missing_bad.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only --Wall -Wno-DECLFILENAME"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only --Wall -Wno-DECLFILENAME"], + fails => 1, + expect => q{%Warning-PINNOCONNECT: t/t_inst_missing_bad.v:8: Cell pin is not connected: __pinNumber2 %Warning-PINNOCONNECT: Use .* %Warning-PINCONNECTEMPTY: t/t_inst_missing_bad.v:8: Cell pin connected by name with empty reference: nc %Warning-PINMISSING: t/t_inst_missing_bad.v:8: Cell has missing pin: missing %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_mnpipe.pl b/test_regress/t/t_inst_mnpipe.pl index fd76d2220..1be18a66c 100755 --- a/test_regress/t/t_inst_mnpipe.pl +++ b/test_regress/t/t_inst_mnpipe.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_notunsized.pl b/test_regress/t/t_inst_notunsized.pl index 0d595fbd7..7654e1a4e 100755 --- a/test_regress/t/t_inst_notunsized.pl +++ b/test_regress/t/t_inst_notunsized.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2=>["-Wno-IMPLICIT"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2=>["-Wno-IMPLICIT"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_overwide.pl b/test_regress/t/t_inst_overwide.pl index 2d0bd83ee..dfea2018b 100755 --- a/test_regress/t/t_inst_overwide.pl +++ b/test_regress/t/t_inst_overwide.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - make_top_shell=>0, - verilator_flags2 => [qw(-sc -Wno-WIDTH)], - verilator_make_gcc=>0, - ); +scenarios(simulator => 1); -#No execute () +compile( + make_top_shell => 0, + verilator_flags2 => [qw(-sc -Wno-WIDTH)], + verilator_make_gcc => 0, + ); + +#No execute() ok(1); 1; diff --git a/test_regress/t/t_inst_overwide_bad.pl b/test_regress/t/t_inst_overwide_bad.pl index 6e0b9ae94..89c911e01 100755 --- a/test_regress/t/t_inst_overwide_bad.pl +++ b/test_regress/t/t_inst_overwide_bad.pl @@ -7,22 +7,24 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_overwide.v"); -compile ( - v_flags2 => ["--lint-only"], - make_top_shell=>0, - verilator_flags=> [qw(-cc)], - verilator_make_gcc=>0, - fails=>$Self->{v3}, - expect=> +compile( + v_flags2 => ["--lint-only"], + make_top_shell => 0, + verilator_flags => [qw(-cc)], + verilator_make_gcc => 0, + fails => $Self->{vlt}, + expect => q{%Warning-WIDTH: t/t_inst_overwide.v:\d+: Output port connection 'outy_w92' expects 92 bits on the pin connection, but pin connection's VARREF 'outc_w30' generates 30 bits. %Warning-WIDTH: Use .* to disable this message. %Warning-WIDTH: t/t_inst_overwide.v:\d+: Output port connection 'outz_w22' expects 22 bits on the pin connection, but pin connection's VARREF 'outd_w73' generates 73 bits. %Warning-WIDTH: t/t_inst_overwide.v:\d+: Input port connection 'inw_w31' expects 31 bits on the pin connection, but pin connection's VARREF 'ina_w1' generates 1 bits. %Warning-WIDTH: t/t_inst_overwide.v:\d+: Input port connection 'inx_w11' expects 11 bits on the pin connection, but pin connection's VARREF 'inb_w61' generates 61 bits. %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_port_array.pl b/test_regress/t/t_inst_port_array.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_port_array.pl +++ b/test_regress/t/t_inst_port_array.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_prepost.pl b/test_regress/t/t_inst_prepost.pl index 385b6a57e..5c448de7c 100755 --- a/test_regress/t/t_inst_prepost.pl +++ b/test_regress/t/t_inst_prepost.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); ok(1); diff --git a/test_regress/t/t_inst_recurse2_bad.pl b/test_regress/t/t_inst_recurse2_bad.pl index b6f94e500..95e358ccc 100755 --- a/test_regress/t/t_inst_recurse2_bad.pl +++ b/test_regress/t/t_inst_recurse2_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '.*%Error: t/t_inst_recurse2_bad.v:\d+: Unsupported: Identically recursive module \(module instantiates itself, without changing parameters\): looped %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_inst_recurse_bad.pl b/test_regress/t/t_inst_recurse_bad.pl index cd8941191..e0a1fb933 100755 --- a/test_regress/t/t_inst_recurse_bad.pl +++ b/test_regress/t/t_inst_recurse_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '.*%Error: t/t_inst_recurse_bad.v:\d+: Unsupported: Recursive multiple modules \(module instantiates something leading back to itself\): looped %Error: t/t_inst_recurse_bad.v:\d+: Note self-recursion \(module instantiating itself directly\) is supported. %Error: Exiting due to.*', diff --git a/test_regress/t/t_inst_signed.pl b/test_regress/t/t_inst_signed.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_signed.pl +++ b/test_regress/t/t_inst_signed.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_signed1.pl b/test_regress/t/t_inst_signed1.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_signed1.pl +++ b/test_regress/t/t_inst_signed1.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_slice.pl b/test_regress/t/t_inst_slice.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_inst_slice.pl +++ b/test_regress/t/t_inst_slice.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_slice_noinl.pl b/test_regress/t/t_inst_slice_noinl.pl index 56c4c8f6f..d9c0024d1 100755 --- a/test_regress/t/t_inst_slice_noinl.pl +++ b/test_regress/t/t_inst_slice_noinl.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_slice.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_inst_sv.pl b/test_regress/t/t_inst_sv.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_inst_sv.pl +++ b/test_regress/t/t_inst_sv.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_tree_inl0_pub0.pl b/test_regress/t/t_inst_tree_inl0_pub0.pl index cb1704bb1..b9f879e8b 100755 --- a/test_regress/t/t_inst_tree_inl0_pub0.pl +++ b/test_regress/t/t_inst_tree_inl0_pub0.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_tree.v"); -compile ( - v_flags2 => ['+define+NOUSE_INLINE', '+define+NOUSE_PUBLIC'], - ); +compile( + v_flags2 => ['+define+NOUSE_INLINE', '+define+NOUSE_PUBLIC'], + ); -execute ( - check_finished=>1, - expect=> +execute( + check_finished => 1, + expect => '\] (%m|.*t\.ps): Clocked ', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_tree_inl0_pub1.pl b/test_regress/t/t_inst_tree_inl0_pub1.pl index c5593b090..cd76d7848 100755 --- a/test_regress/t/t_inst_tree_inl0_pub1.pl +++ b/test_regress/t/t_inst_tree_inl0_pub1.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_tree.v"); -compile ( - verilator_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats'], - ); +compile( + verilator_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats'], + ); sub checkRelativeRefs { my ($mod, $expect_relative) = @_; @@ -27,9 +29,9 @@ sub checkRelativeRefs { } if ($found_relative != $expect_relative) { - $Self->error("$file " . - ($found_relative ? "has" : "does not have") . - " relative variable references."); + error("$file " . + ($found_relative ? "has" : "does not have") . + " relative variable references."); } } @@ -51,12 +53,12 @@ if ($Self->{vlt}) { checkRelativeRefs("l5__P2", 1); } -execute ( - check_finished=>1, - expect=> +execute( + check_finished => 1, + expect => '\] (%m|.*t\.ps): Clocked ', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_tree_inl0_pub1_norelcfuncs.pl b/test_regress/t/t_inst_tree_inl0_pub1_norelcfuncs.pl index 4eec915b0..1b5c64c08 100755 --- a/test_regress/t/t_inst_tree_inl0_pub1_norelcfuncs.pl +++ b/test_regress/t/t_inst_tree_inl0_pub1_norelcfuncs.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_tree.v"); -compile ( - verilator_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats', '--norelative-cfuncs'], - ); +compile( + verilator_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats', '--norelative-cfuncs'], + ); if ($Self->{vlt}) { # Fewer optimizations than t_inst_tree_inl0_pub1 which allows @@ -25,17 +27,17 @@ if ($Self->{vlt}) { my $text = file_contents($file); $text =~ s/this->__VlSymsp//g; if ($text =~ m/this->/) { - $Self->error("$file has unexpected this-> refs when --norelative-cfuncs"); + error("$file has unexpected this-> refs when --norelative-cfuncs"); } } } -execute ( - check_finished=>1, - expect=> +execute( + check_finished => 1, + expect => '\] (%m|.*t\.ps): Clocked ', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_tree_inl1_pub0.pl b/test_regress/t/t_inst_tree_inl1_pub0.pl index 001d36d28..fe266c45e 100755 --- a/test_regress/t/t_inst_tree_inl1_pub0.pl +++ b/test_regress/t/t_inst_tree_inl1_pub0.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_tree.v"); -compile ( - v_flags2 => ['+define+USE_INLINE', '+define+NOUSE_PUBLIC'], - ); +compile( + v_flags2 => ['+define+USE_INLINE', '+define+NOUSE_PUBLIC'], + ); -execute ( - check_finished=>1, - expect=> +execute( + check_finished => 1, + expect => '\] (%m|.*t\.ps): Clocked ', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_tree_inl1_pub1.pl b/test_regress/t/t_inst_tree_inl1_pub1.pl index d6905ac09..4d0910915 100755 --- a/test_regress/t/t_inst_tree_inl1_pub1.pl +++ b/test_regress/t/t_inst_tree_inl1_pub1.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_inst_tree.v"); -compile ( - v_flags2 => ['+define+USE_INLINE', '+define+USE_PUBLIC'], - ); +compile( + v_flags2 => ['+define+USE_INLINE', '+define+USE_PUBLIC'], + ); -execute ( - check_finished=>1, - expect=> +execute( + check_finished => 1, + expect => '\] (%m|.*t\.ps): Clocked ', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_inst_v2k.pl b/test_regress/t/t_inst_v2k.pl index 1b4fa7124..42bec2a5b 100755 --- a/test_regress/t/t_inst_v2k.pl +++ b/test_regress/t/t_inst_v2k.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ['+libext+.vi+.extranoneed'], - nc => 0, # Error: Multiple +libext flags found - vcs => 0, - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ['+libext+.vi+.extranoneed'], + nc => 0, # Error: Multiple +libext flags found + vcs => 0, + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_inst_wideconst.pl b/test_regress/t/t_inst_wideconst.pl index fb2c8172c..60667b1d5 100755 --- a/test_regress/t/t_inst_wideconst.pl +++ b/test_regress/t/t_inst_wideconst.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['-public'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['-public'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_interface.pl b/test_regress/t/t_interface.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface.pl +++ b/test_regress/t/t_interface.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface1.pl b/test_regress/t/t_interface1.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface1.pl +++ b/test_regress/t/t_interface1.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface1_modport.pl b/test_regress/t/t_interface1_modport.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface1_modport.pl +++ b/test_regress/t/t_interface1_modport.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface1_modport_nansi.pl b/test_regress/t/t_interface1_modport_nansi.pl index 13c82af1a..29c3e909c 100755 --- a/test_regress/t/t_interface1_modport_nansi.pl +++ b/test_regress/t/t_interface1_modport_nansi.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface1_modport.v"); -compile ( +compile( v_flags2 => ['+define+NANSI'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface1_modport_noinl.pl b/test_regress/t/t_interface1_modport_noinl.pl index f831022b7..a04b71dbe 100755 --- a/test_regress/t/t_interface1_modport_noinl.pl +++ b/test_regress/t/t_interface1_modport_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface1_modport.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface1_modport_trace.pl b/test_regress/t/t_interface1_modport_trace.pl index 103690b6b..336f9b7e8 100755 --- a/test_regress/t/t_interface1_modport_trace.pl +++ b/test_regress/t/t_interface1_modport_trace.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface1_modport.v"); -compile ( +compile( verilator_flags2 => ['--trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface1_noinl.pl b/test_regress/t/t_interface1_noinl.pl index 72b8fa56d..addef5226 100755 --- a/test_regress/t/t_interface1_noinl.pl +++ b/test_regress/t/t_interface1_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface1.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface2.pl b/test_regress/t/t_interface2.pl index 7ae28e6f7..ccc8e57db 100755 --- a/test_regress/t/t_interface2.pl +++ b/test_regress/t/t_interface2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--top-module t"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface2_noinl.pl b/test_regress/t/t_interface2_noinl.pl index 88695127f..782f20df7 100755 --- a/test_regress/t/t_interface2_noinl.pl +++ b/test_regress/t/t_interface2_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface2.v"); -compile ( +compile( verilator_flags2 => ["--top-module t -Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_array.pl b/test_regress/t/t_interface_array.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface_array.pl +++ b/test_regress/t/t_interface_array.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_array_bad.pl b/test_regress/t/t_interface_array_bad.pl index 1e9145239..292c6da02 100755 --- a/test_regress/t/t_interface_array_bad.pl +++ b/test_regress/t/t_interface_array_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '%Error: t/t_interface_array_bad.v:\d+: Expecting expression to be constant, but variable isn\'t const: bar %Error: t/t_interface_array_bad.v:\d+: Could not expand constant selection inside dotted reference: bar %Error: Exiting due to.*', diff --git a/test_regress/t/t_interface_array_modport.pl b/test_regress/t/t_interface_array_modport.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface_array_modport.pl +++ b/test_regress/t/t_interface_array_modport.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_array_nocolon.pl b/test_regress/t/t_interface_array_nocolon.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface_array_nocolon.pl +++ b/test_regress/t/t_interface_array_nocolon.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_array_nocolon_bad.pl b/test_regress/t/t_interface_array_nocolon_bad.pl index 75a5f7cc4..51241455e 100755 --- a/test_regress/t/t_interface_array_nocolon_bad.pl +++ b/test_regress/t/t_interface_array_nocolon_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> + fails => $Self->{vlt}, + expect => q{%Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:\d+: Little endian cell range connecting to vector: MSB < LSB of cell range: 0:2 %Warning-LITENDIAN: Use [^\n]+ %Warning-LITENDIAN: t/t_interface_array_nocolon_bad.v:\d+: Little endian cell range connecting to vector: MSB < LSB of cell range: 1:3 diff --git a/test_regress/t/t_interface_array_noinl.pl b/test_regress/t/t_interface_array_noinl.pl index 043def6a7..740409044 100755 --- a/test_regress/t/t_interface_array_noinl.pl +++ b/test_regress/t/t_interface_array_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_array.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_arraymux.pl b/test_regress/t/t_interface_arraymux.pl index 086fa8d0c..62c359668 100755 --- a/test_regress/t/t_interface_arraymux.pl +++ b/test_regress/t/t_interface_arraymux.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_interface_bind_public.pl b/test_regress/t/t_interface_bind_public.pl index 231f356e9..60667b1d5 100755 --- a/test_regress/t/t_interface_bind_public.pl +++ b/test_regress/t/t_interface_bind_public.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['-public'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down.pl b/test_regress/t/t_interface_down.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_down.pl +++ b/test_regress/t/t_interface_down.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_gen.pl b/test_regress/t/t_interface_down_gen.pl index c9f69ed2d..cc504c708 100755 --- a/test_regress/t/t_interface_down_gen.pl +++ b/test_regress/t/t_interface_down_gen.pl @@ -7,14 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, interface generates changing types"); -$Self->{vcs} and $Self->unsupported("Commercially unsupported, interface crossrefs"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, interface generates changing types"); +$Self->{vcs} and unsupported("Commercially unsupported, interface crossrefs"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inla.pl b/test_regress/t/t_interface_down_inla.pl index f65c1e7f8..091f1e378 100755 --- a/test_regress/t/t_interface_down_inla.pl +++ b/test_regress/t/t_interface_down_inla.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlab.pl b/test_regress/t/t_interface_down_inlab.pl index f06160436..d656df509 100755 --- a/test_regress/t/t_interface_down_inlab.pl +++ b/test_regress/t/t_interface_down_inlab.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A +define+INLINE_B'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlac.pl b/test_regress/t/t_interface_down_inlac.pl index 6aae82408..1480307b8 100755 --- a/test_regress/t/t_interface_down_inlac.pl +++ b/test_regress/t/t_interface_down_inlac.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A +define+INLINE_C'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlad.pl b/test_regress/t/t_interface_down_inlad.pl index 0addbdfe7..e406a91a9 100755 --- a/test_regress/t/t_interface_down_inlad.pl +++ b/test_regress/t/t_interface_down_inlad.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_A +define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlb.pl b/test_regress/t/t_interface_down_inlb.pl index b8e22f240..ed32d18c8 100755 --- a/test_regress/t/t_interface_down_inlb.pl +++ b/test_regress/t/t_interface_down_inlb.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_B'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlbc.pl b/test_regress/t/t_interface_down_inlbc.pl index 53d009068..42584154b 100755 --- a/test_regress/t/t_interface_down_inlbc.pl +++ b/test_regress/t/t_interface_down_inlbc.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_B +define+INLINE_C'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlbd.pl b/test_regress/t/t_interface_down_inlbd.pl index bdbf3392c..76a90e4c6 100755 --- a/test_regress/t/t_interface_down_inlbd.pl +++ b/test_regress/t/t_interface_down_inlbd.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_B +define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlc.pl b/test_regress/t/t_interface_down_inlc.pl index f8ffc151e..0c58dd9b8 100755 --- a/test_regress/t/t_interface_down_inlc.pl +++ b/test_regress/t/t_interface_down_inlc.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_C'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inlcd.pl b/test_regress/t/t_interface_down_inlcd.pl index eb9218ec3..b5b9ae967 100755 --- a/test_regress/t/t_interface_down_inlcd.pl +++ b/test_regress/t/t_interface_down_inlcd.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_C +define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_inld.pl b/test_regress/t/t_interface_down_inld.pl index c57e458a8..2fb5e886f 100755 --- a/test_regress/t/t_interface_down_inld.pl +++ b/test_regress/t/t_interface_down_inld.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ['+define+INLINE_D'], verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_down_noinl.pl b/test_regress/t/t_interface_down_noinl.pl index d271830e1..2921a7686 100755 --- a/test_regress/t/t_interface_down_noinl.pl +++ b/test_regress/t/t_interface_down_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_down.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen.pl b/test_regress/t/t_interface_gen.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen.pl +++ b/test_regress/t/t_interface_gen.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen10.pl b/test_regress/t/t_interface_gen10.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen10.pl +++ b/test_regress/t/t_interface_gen10.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen10_noinl.pl b/test_regress/t/t_interface_gen10_noinl.pl index dda85f903..b2d964809 100755 --- a/test_regress/t/t_interface_gen10_noinl.pl +++ b/test_regress/t/t_interface_gen10_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen10.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen11.pl b/test_regress/t/t_interface_gen11.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen11.pl +++ b/test_regress/t/t_interface_gen11.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen11_noinl.pl b/test_regress/t/t_interface_gen11_noinl.pl index 3afabd0a3..41dbe23b8 100755 --- a/test_regress/t/t_interface_gen11_noinl.pl +++ b/test_regress/t/t_interface_gen11_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen11.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen12.pl b/test_regress/t/t_interface_gen12.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen12.pl +++ b/test_regress/t/t_interface_gen12.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen12_noinl.pl b/test_regress/t/t_interface_gen12_noinl.pl index 7c81d6ae7..1bde2074b 100755 --- a/test_regress/t/t_interface_gen12_noinl.pl +++ b/test_regress/t/t_interface_gen12_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen12.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen2.pl b/test_regress/t/t_interface_gen2.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen2.pl +++ b/test_regress/t/t_interface_gen2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen2_noinl.pl b/test_regress/t/t_interface_gen2_noinl.pl index c0cffc8a4..60b79c8ea 100755 --- a/test_regress/t/t_interface_gen2_noinl.pl +++ b/test_regress/t/t_interface_gen2_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen2.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen3.pl b/test_regress/t/t_interface_gen3.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen3.pl +++ b/test_regress/t/t_interface_gen3.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen3_noinl.pl b/test_regress/t/t_interface_gen3_noinl.pl index b684f4c48..423aae5dc 100755 --- a/test_regress/t/t_interface_gen3_noinl.pl +++ b/test_regress/t/t_interface_gen3_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen3.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen4.pl b/test_regress/t/t_interface_gen4.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen4.pl +++ b/test_regress/t/t_interface_gen4.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen4_noinl.pl b/test_regress/t/t_interface_gen4_noinl.pl index 144ea2b45..130c1e314 100755 --- a/test_regress/t/t_interface_gen4_noinl.pl +++ b/test_regress/t/t_interface_gen4_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen4.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen5.pl b/test_regress/t/t_interface_gen5.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen5.pl +++ b/test_regress/t/t_interface_gen5.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen5_noinl.pl b/test_regress/t/t_interface_gen5_noinl.pl index 1e8c1b963..ea149c55b 100755 --- a/test_regress/t/t_interface_gen5_noinl.pl +++ b/test_regress/t/t_interface_gen5_noinl.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_gen5.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen6.pl b/test_regress/t/t_interface_gen6.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen6.pl +++ b/test_regress/t/t_interface_gen6.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen6_noinl.pl b/test_regress/t/t_interface_gen6_noinl.pl index d9fcdb8cd..63b10b62d 100755 --- a/test_regress/t/t_interface_gen6_noinl.pl +++ b/test_regress/t/t_interface_gen6_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen6.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen7.pl b/test_regress/t/t_interface_gen7.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen7.pl +++ b/test_regress/t/t_interface_gen7.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen7_noinl.pl b/test_regress/t/t_interface_gen7_noinl.pl index 1a528a3c9..eb3a4b4bb 100755 --- a/test_regress/t/t_interface_gen7_noinl.pl +++ b/test_regress/t/t_interface_gen7_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen7.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen8.pl b/test_regress/t/t_interface_gen8.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen8.pl +++ b/test_regress/t/t_interface_gen8.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen8_noinl.pl b/test_regress/t/t_interface_gen8_noinl.pl index a9d305113..7cc674f2b 100755 --- a/test_regress/t/t_interface_gen8_noinl.pl +++ b/test_regress/t/t_interface_gen8_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen8.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen9.pl b/test_regress/t/t_interface_gen9.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_gen9.pl +++ b/test_regress/t/t_interface_gen9.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen9_noinl.pl b/test_regress/t/t_interface_gen9_noinl.pl index 05892eaab..c8a37074e 100755 --- a/test_regress/t/t_interface_gen9_noinl.pl +++ b/test_regress/t/t_interface_gen9_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen9.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_gen_noinl.pl b/test_regress/t/t_interface_gen_noinl.pl index 02cbccd29..3f5a8ebcb 100755 --- a/test_regress/t/t_interface_gen_noinl.pl +++ b/test_regress/t/t_interface_gen_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_gen.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_inl.pl b/test_regress/t/t_interface_inl.pl index ef9d007ba..a15b99c13 100755 --- a/test_regress/t/t_interface_inl.pl +++ b/test_regress/t/t_interface_inl.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface.v"); -compile ( +compile( # Avoid inlining so we find bugs in the non-inliner connection code verilator_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_mismodport_bad.pl b/test_regress/t/t_interface_mismodport_bad.pl index 3ff2dbd57..d5634a519 100755 --- a/test_regress/t/t_interface_mismodport_bad.pl +++ b/test_regress/t/t_interface_mismodport_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, fails => 1, - expect=> + expect => '%Error: t/t_interface_mismodport_bad.v:\d+: Can\'t find definition of \'bad\' in dotted signal: isub.bad .*%Error: Exiting due to.*', ); diff --git a/test_regress/t/t_interface_missing_bad.pl b/test_regress/t/t_interface_missing_bad.pl index a1b6d3a6f..5d14aaaa2 100755 --- a/test_regress/t/t_interface_missing_bad.pl +++ b/test_regress/t/t_interface_missing_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => qr{%Error: t/t_interface_missing_bad.v:\d+: Cannot find file containing interface: foo_intf .*}, ); diff --git a/test_regress/t/t_interface_modport.pl b/test_regress/t/t_interface_modport.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_modport.pl +++ b/test_regress/t/t_interface_modport.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_modport_export.pl b/test_regress/t/t_interface_modport_export.pl index 4bd751bc4..c10c500fa 100755 --- a/test_regress/t/t_interface_modport_export.pl +++ b/test_regress/t/t_interface_modport_export.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug696"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug696"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_modport_import.pl b/test_regress/t/t_interface_modport_import.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface_modport_import.pl +++ b/test_regress/t/t_interface_modport_import.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_modport_import_noinl.pl b/test_regress/t/t_interface_modport_import_noinl.pl index 00e0786c1..eb3847bf8 100755 --- a/test_regress/t/t_interface_modport_import_noinl.pl +++ b/test_regress/t/t_interface_modport_import_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_modport_import.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_modport_inl.pl b/test_regress/t/t_interface_modport_inl.pl index 57289dfd8..559f782ee 100755 --- a/test_regress/t/t_interface_modport_inl.pl +++ b/test_regress/t/t_interface_modport_inl.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_modport.v"); -compile ( +compile( # Avoid inlining so we find bugs in the non-inliner connection code verilator_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_modport_noinl.pl b/test_regress/t/t_interface_modport_noinl.pl index c5e3b48ef..d699c37b4 100755 --- a/test_regress/t/t_interface_modport_noinl.pl +++ b/test_regress/t/t_interface_modport_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_modport.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_modportlist.pl b/test_regress/t/t_interface_modportlist.pl index 9245a95fe..7053c9dd7 100755 --- a/test_regress/t/t_interface_modportlist.pl +++ b/test_regress/t/t_interface_modportlist.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>0, +scenarios(simulator => 1); + +compile( + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_interface_mp_func.pl b/test_regress/t/t_interface_mp_func.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface_mp_func.pl +++ b/test_regress/t/t_interface_mp_func.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_mp_func_noinl.pl b/test_regress/t/t_interface_mp_func_noinl.pl index 0109caaa0..43973a543 100755 --- a/test_regress/t/t_interface_mp_func_noinl.pl +++ b/test_regress/t/t_interface_mp_func_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_mp_func.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_nest.pl b/test_regress/t/t_interface_nest.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface_nest.pl +++ b/test_regress/t/t_interface_nest.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_nest_noinl.pl b/test_regress/t/t_interface_nest_noinl.pl index 1f9a9b2fe..e1ba7a75d 100755 --- a/test_regress/t/t_interface_nest_noinl.pl +++ b/test_regress/t/t_interface_nest_noinl.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_interface_nest.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_noinl.pl b/test_regress/t/t_interface_noinl.pl index b40b905fb..4b521e5a0 100755 --- a/test_regress/t/t_interface_noinl.pl +++ b/test_regress/t/t_interface_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_param1.pl b/test_regress/t/t_interface_param1.pl index 1774aab4f..76bfa062d 100755 --- a/test_regress/t/t_interface_param1.pl +++ b/test_regress/t/t_interface_param1.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_interface_param2.pl b/test_regress/t/t_interface_param2.pl index b3f716e57..911d981d1 100755 --- a/test_regress/t/t_interface_param2.pl +++ b/test_regress/t/t_interface_param2.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug1104"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug1104"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_param_another_bad.pl b/test_regress/t/t_interface_param_another_bad.pl index e0cefdebf..cbe619317 100755 --- a/test_regress/t/t_interface_param_another_bad.pl +++ b/test_regress/t/t_interface_param_another_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => q{%Error: t/t_interface_param_another_bad.v:\d+: Parameter-resolved constants must not use dotted references: dummy %Error: Exiting due to.*}, ); diff --git a/test_regress/t/t_interface_parameter_access.pl b/test_regress/t/t_interface_parameter_access.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_interface_parameter_access.pl +++ b/test_regress/t/t_interface_parameter_access.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_size_bad.pl b/test_regress/t/t_interface_size_bad.pl index 34a712410..e1c02a131 100755 --- a/test_regress/t/t_interface_size_bad.pl +++ b/test_regress/t/t_interface_size_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => q{%Error: t/t_interface_size_bad.v:\d+: Illegal IFACEREF port connection 'foo', mismatch between port which is an interface array of size 5, and expression which is an interface array of size 4. %Error: t/t_interface_size_bad.v:\d+: Illegal IFACEREF port connection 'foo', mismatch between port which is an interface array of size 5, and expression which is an interface array of size 6. %Error: Exiting due to.*}, diff --git a/test_regress/t/t_interface_star.pl b/test_regress/t/t_interface_star.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_star.pl +++ b/test_regress/t/t_interface_star.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_top_bad.pl b/test_regress/t/t_interface_top_bad.pl index 34abb76b0..1fd71cfcd 100755 --- a/test_regress/t/t_interface_top_bad.pl +++ b/test_regress/t/t_interface_top_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, fails => 1, - expect=> + expect => '%Error: t/t_interface_top_bad.v:\d+: Unsupported: Interfaced port on top level module', ); diff --git a/test_regress/t/t_interface_twod.pl b/test_regress/t/t_interface_twod.pl index 1118f2e0e..1be18a66c 100755 --- a/test_regress/t/t_interface_twod.pl +++ b/test_regress/t/t_interface_twod.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_twod_noinl.pl b/test_regress/t/t_interface_twod_noinl.pl index ee9f4447e..af93c9ff2 100755 --- a/test_regress/t/t_interface_twod_noinl.pl +++ b/test_regress/t/t_interface_twod_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_interface_twod.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_interface_typo_bad.pl b/test_regress/t/t_interface_typo_bad.pl index 595301926..81d6fe926 100755 --- a/test_regress/t/t_interface_typo_bad.pl +++ b/test_regress/t/t_interface_typo_bad.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, @@ -15,12 +17,12 @@ compile ( fails => 1, # Used to be %Error: t/t_order_wireloop.v:\d+: Wire inputs its own output, creating circular logic .wire x=x. # However we no longer gate optimize this - expect=> + expect => q{%Error: t/t_interface_typo_bad.v:\d+: Parent cell's interface is not found: foo_intf %Error: t/t_interface_typo_bad.v:\d+: Cannot find file containing interface: fo_intf %Error: t/t_interface_typo_bad.v:\d+: Found definition of 'the_foo' as a CELL but expected a variable .*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_interface_wrong_bad.pl b/test_regress/t/t_interface_wrong_bad.pl index c773241b2..c97b5af9e 100755 --- a/test_regress/t/t_interface_wrong_bad.pl +++ b/test_regress/t/t_interface_wrong_bad.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, +scenarios(simulator => 1); + +compile( + fails => 1, expect => q{%Error: t/t_interface_wrong_bad.v:\d+: Port 'foo_port' expects 'foo_intf' interface but pin connects 'bar_intf' interface}, ); diff --git a/test_regress/t/t_langext_1.pl b/test_regress/t/t_langext_1.pl index 27eeba84b..6fb45726f 100755 --- a/test_regress/t/t_langext_1.pl +++ b/test_regress/t/t_langext_1.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # This is a compile only test. -compile ( +compile( v_flags2 => ["+verilog2001ext+v"], ); diff --git a/test_regress/t/t_langext_1_bad.pl b/test_regress/t/t_langext_1_bad.pl index 2a52c30b4..7cf98edc1 100755 --- a/test_regress/t/t_langext_1_bad.pl +++ b/test_regress/t/t_langext_1_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_langext_1.v"); # This is a compile only test. -compile ( +compile( v_flags2 => ["+verilog1995ext+v"], fails => 1 ); diff --git a/test_regress/t/t_langext_2.pl b/test_regress/t/t_langext_2.pl index c4138df15..688ab8c39 100755 --- a/test_regress/t/t_langext_2.pl +++ b/test_regress/t/t_langext_2.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # This is a compile only test. -compile ( +compile( v_flags2 => ["+systemverilogext+v"], ); diff --git a/test_regress/t/t_langext_2_bad.pl b/test_regress/t/t_langext_2_bad.pl index b0c2df446..d60988f7b 100755 --- a/test_regress/t/t_langext_2_bad.pl +++ b/test_regress/t/t_langext_2_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_langext_2.v"); # This is a compile only test. -compile ( +compile( v_flags2 => ["+1364-1995ext+v"], fails => 1 ); diff --git a/test_regress/t/t_langext_3.pl b/test_regress/t/t_langext_3.pl index 4a402cf79..7dee7e04c 100755 --- a/test_regress/t/t_langext_3.pl +++ b/test_regress/t/t_langext_3.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # This is a compile only test. -compile ( +compile( v_flags2 => ["+1364-2005ext+v"], ); diff --git a/test_regress/t/t_langext_3_bad.pl b/test_regress/t/t_langext_3_bad.pl index 760ff0d90..20abe2276 100755 --- a/test_regress/t/t_langext_3_bad.pl +++ b/test_regress/t/t_langext_3_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_langext_3.v"); # This is a compile only test. -compile ( +compile( v_flags2 => ["+1364-2001ext+v"], fails => 1 ); diff --git a/test_regress/t/t_langext_4.pl b/test_regress/t/t_langext_4.pl index 0f1a1c416..c21cc0c2a 100755 --- a/test_regress/t/t_langext_4.pl +++ b/test_regress/t/t_langext_4.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_langext_2.v"); # This is a compile only test. -compile ( +compile( v_flags2 => ["+1800-2009ext+v"], ); diff --git a/test_regress/t/t_langext_4_bad.pl b/test_regress/t/t_langext_4_bad.pl index f8cc066ee..4552902ae 100755 --- a/test_regress/t/t_langext_4_bad.pl +++ b/test_regress/t/t_langext_4_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_langext_2.v"); # This is a compile only test. -compile ( +compile( v_flags2 => ["+1800-2005ext+v"], fails => 1 ); diff --git a/test_regress/t/t_leak.pl b/test_regress/t/t_leak.pl index 7cf2ac161..da60e8024 100755 --- a/test_regress/t/t_leak.pl +++ b/test_regress/t/t_leak.pl @@ -7,16 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], - ); +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + ); + +execute( + check_finished => 1, + ); -execute ( - check_finished=>1, - ); ok(1); 1; diff --git a/test_regress/t/t_lint_always_comb_bad.pl b/test_regress/t/t_lint_always_comb_bad.pl index 6361176b7..da46dbfa0 100755 --- a/test_regress/t/t_lint_always_comb_bad.pl +++ b/test_regress/t/t_lint_always_comb_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, fails => 1, - expect=> + expect => '%Warning-ALWCOMBORDER: t/t_lint_always_comb_bad.v:\d+: Always_comb variable driven after use: mid .*%Error: Exiting due to.*', ); diff --git a/test_regress/t/t_lint_always_comb_iface.pl b/test_regress/t/t_lint_always_comb_iface.pl index fcc84f672..3e882fd06 100755 --- a/test_regress/t/t_lint_always_comb_iface.pl +++ b/test_regress/t/t_lint_always_comb_iface.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], fails => 0, verilator_make_gcc => 0, diff --git a/test_regress/t/t_lint_blksync_bad.pl b/test_regress/t/t_lint_blksync_bad.pl index e200eafa2..099a67126 100755 --- a/test_regress/t/t_lint_blksync_bad.pl +++ b/test_regress/t/t_lint_blksync_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only -Wwarn-BLKSEQ -Wwarn-COMBDLY"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-BLKSEQ: t/t_lint_blksync_bad.v:\d+: Blocking assignments \(=\) in sequential \(flop or latch\) block; suggest delayed assignments \(<=\). %Warning-BLKSEQ: Use .* to disable this message. %Warning-COMBDLY: t/t_lint_blksync_bad.v:\d+: Delayed assignments \(<=\) in non-clocked \(non flop or latch\) block; suggest blocking assignments \(=\). diff --git a/test_regress/t/t_lint_blksync_loop.pl b/test_regress/t/t_lint_blksync_loop.pl index 2d8ddfb24..303cd448e 100755 --- a/test_regress/t/t_lint_blksync_loop.pl +++ b/test_regress/t/t_lint_blksync_loop.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( verilator_flags2 => ["--lint-only -Wwarn-BLKSEQ -Wwarn-COMBDLY"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_lint_block_redecl_bad.pl b/test_regress/t/t_lint_block_redecl_bad.pl index e70f3c89d..ec741a3b4 100755 --- a/test_regress/t/t_lint_block_redecl_bad.pl +++ b/test_regress/t/t_lint_block_redecl_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug485, false begin due to WHILE conversion blocks duplicate name detection"); +scenarios(vlt_all => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug485, false begin due to WHILE conversion blocks duplicate name detection"); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning: duplicate... %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_lint_bsspace_bad.pl b/test_regress/t/t_lint_bsspace_bad.pl index d00d59f5a..17d16fe0b 100755 --- a/test_regress/t/t_lint_bsspace_bad.pl +++ b/test_regress/t/t_lint_bsspace_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, fails => 1, - expect=> + expect => '%Warning-BSSPACE: t/t_lint_bsspace_bad.v:\d+: Backslash followed by whitespace, perhaps the whitespace is accidental\? .*%Error: Exiting due to.*', ); diff --git a/test_regress/t/t_lint_colonplus_bad.pl b/test_regress/t/t_lint_colonplus_bad.pl index 0218109b6..7e04de051 100755 --- a/test_regress/t/t_lint_colonplus_bad.pl +++ b/test_regress/t/t_lint_colonplus_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, fails => 1, - expect=> + expect => q{%Warning-COLONPLUS: t/t_lint_colonplus_bad.v:\d+: Perhaps instead of ':\+' the intent was '\+:'\? %Warning-COLONPLUS: Use .* .*%Error: Exiting due to.*}, diff --git a/test_regress/t/t_lint_comb_bad.pl b/test_regress/t/t_lint_comb_bad.pl index cd289b1e6..0fca86935 100755 --- a/test_regress/t/t_lint_comb_bad.pl +++ b/test_regress/t/t_lint_comb_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, fails => 1, - expect=> + expect => q{%Error: t/t_lint_comb_bad.v:\d+: syntax error, unexpected '@' .*}, ); diff --git a/test_regress/t/t_lint_comb_use.pl b/test_regress/t/t_lint_comb_use.pl index 85a93664d..be0635e49 100755 --- a/test_regress/t/t_lint_comb_use.pl +++ b/test_regress/t/t_lint_comb_use.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( verilator_flags2 => ["--lint-only --bbox-sys"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_lint_declfilename.pl b/test_regress/t/t_lint_declfilename.pl index 82a626b50..cf67c444c 100755 --- a/test_regress/t/t_lint_declfilename.pl +++ b/test_regress/t/t_lint_declfilename.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_lint_declfilename_bad.pl b/test_regress/t/t_lint_declfilename_bad.pl index 464a91fa7..8a977b032 100755 --- a/test_regress/t/t_lint_declfilename_bad.pl +++ b/test_regress/t/t_lint_declfilename_bad.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_lint_declfilename.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( v_flags2 => ["--lint-only -Wall"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-DECLFILENAME: t/t_lint_declfilename.v:6: Filename \'t_lint_declfilename\' does not match MODULE name: t %Warning-DECLFILENAME: Use .* to disable this message. %Error: Exiting due to.*', diff --git a/test_regress/t/t_lint_defparam.pl b/test_regress/t/t_lint_defparam.pl index 82a626b50..cf67c444c 100755 --- a/test_regress/t/t_lint_defparam.pl +++ b/test_regress/t/t_lint_defparam.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_lint_defparam_bad.pl b/test_regress/t/t_lint_defparam_bad.pl index 9449bdf40..d67cfc4d1 100755 --- a/test_regress/t/t_lint_defparam_bad.pl +++ b/test_regress/t/t_lint_defparam_bad.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_lint_defparam.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( v_flags2 => ["--lint-only -Wwarn-style -Wno-DECLFILENAME"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-DEFPARAM: t/t_lint_defparam.v:\d+: Suggest replace defparam with Verilog 2001 #\(.P\(...etc...\)\) %Warning-DEFPARAM: Use .* to disable this message. %Error: Exiting due to.*', diff --git a/test_regress/t/t_lint_ifdepth_bad.pl b/test_regress/t/t_lint_ifdepth_bad.pl index 6f707bd57..3e3498652 100755 --- a/test_regress/t/t_lint_ifdepth_bad.pl +++ b/test_regress/t/t_lint_ifdepth_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME --if-depth 10"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-IFDEPTH: t/t_lint_ifdepth_bad.v:\d+: Deep \'if\' statement; suggest unique/priority to avoid slow logic %Warning-IFDEPTH: Use .* to disable this message. %Error: Exiting due to.*', diff --git a/test_regress/t/t_lint_implicit.pl b/test_regress/t/t_lint_implicit.pl index 364eaa2cd..b757347fa 100755 --- a/test_regress/t/t_lint_implicit.pl +++ b/test_regress/t/t_lint_implicit.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( verilator_flags2 => ["-Wno-IMPLICIT"], ); diff --git a/test_regress/t/t_lint_implicit_bad.pl b/test_regress/t/t_lint_implicit_bad.pl index 344ec2011..541b8f1e5 100755 --- a/test_regress/t/t_lint_implicit_bad.pl +++ b/test_regress/t/t_lint_implicit_bad.pl @@ -7,21 +7,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_lint_implicit.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - v_flags2 => ["--lint-only -Wwarn-IMPLICIT"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only -Wwarn-IMPLICIT"], + fails => 1, + expect => '%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: b %Warning-IMPLICIT: Use .* to disable this message. %Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: nt0 %Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy1 %Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy2 %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_lint_implicit_def_bad.pl b/test_regress/t/t_lint_implicit_def_bad.pl index 769ce18a8..9d74fa4f5 100755 --- a/test_regress/t/t_lint_implicit_def_bad.pl +++ b/test_regress/t/t_lint_implicit_def_bad.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - verilator_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"], - fails=>1, - expect=> +compile( + verilator_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"], + fails => 1, + expect => '%Warning-IMPLICIT: t/t_lint_implicit_def_bad.v:\d+: Signal definition not found, creating implicitly: imp_warn %Warning-IMPLICIT: Use "/\* verilator lint_off IMPLICIT \*/" and lint_on around source to disable this message. %Error: t/t_lint_implicit_def_bad.v:\d+: Signal definition not found, and implicit disabled with `default_nettype: imp_err %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_lint_implicit_port.pl b/test_regress/t/t_lint_implicit_port.pl index a3f299571..b132612a8 100755 --- a/test_regress/t/t_lint_implicit_port.pl +++ b/test_regress/t/t_lint_implicit_port.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["-Wno-IMPLICIT"], - ); +compile( + v_flags2 => ["-Wno-IMPLICIT"], + ); ok(1); 1; diff --git a/test_regress/t/t_lint_incabspath.pl b/test_regress/t/t_lint_incabspath.pl index 26120253e..decb90c06 100755 --- a/test_regress/t/t_lint_incabspath.pl +++ b/test_regress/t/t_lint_incabspath.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_lint_incabspath_bad.pl b/test_regress/t/t_lint_incabspath_bad.pl index 35d72f42c..b5bafa4e5 100755 --- a/test_regress/t/t_lint_incabspath_bad.pl +++ b/test_regress/t/t_lint_incabspath_bad.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_lint_incabspath.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-INCABSPATH: t/t_lint_incabspath.v:\d+: Suggest `include with absolute path be made relative, and use \+include: /dev/null %Warning-INCABSPATH: Use .* to disable this message. %Error: Exiting due to.*', diff --git a/test_regress/t/t_lint_infinite.pl b/test_regress/t/t_lint_infinite.pl index 21a15f49f..c717c1b23 100755 --- a/test_regress/t/t_lint_infinite.pl +++ b/test_regress/t/t_lint_infinite.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], make_top_shell => 0, make_main => 0, verilator_make_gcc => 0, - fails=>1, - expect=> + fails => 1, + expect => '%Warning-INFINITELOOP: t/t_lint_infinite.v:\d+: Infinite loop \(condition always true\) %Warning-INFINITELOOP: Use .* %Warning-INFINITELOOP: t/t_lint_infinite.v:\d+: Infinite loop \(condition always true\) diff --git a/test_regress/t/t_lint_inherit.pl b/test_regress/t/t_lint_inherit.pl index 0e5fe81a4..5c448de7c 100755 --- a/test_regress/t/t_lint_inherit.pl +++ b/test_regress/t/t_lint_inherit.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); + +compile( + ); ok(1); 1; diff --git a/test_regress/t/t_lint_input_eq_bad.pl b/test_regress/t/t_lint_input_eq_bad.pl index 6d78af529..baefcc57c 100755 --- a/test_regress/t/t_lint_input_eq_bad.pl +++ b/test_regress/t/t_lint_input_eq_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_lint_input_eq_bad.v:\d+: Unsupported: Default value on module input: i2 %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_lint_latch_bad.pl b/test_regress/t/t_lint_latch_bad.pl index 7de1109d7..518c711ae 100755 --- a/test_regress/t/t_lint_latch_bad.pl +++ b/test_regress/t/t_lint_latch_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only -Wwarn-style -Wno-DECLFILENAME"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => quotemeta( '%Warning-COMBDLY: t/t_lint_latch_bad.v:24: Delayed assignments (<=) in non-clocked (non flop or latch) block; suggest blocking assignments (=). %Warning-COMBDLY: Use "/* verilator lint_off COMBDLY */" and lint_on around source to disable this message. diff --git a/test_regress/t/t_lint_literal_bad.pl b/test_regress/t/t_lint_literal_bad.pl index 68e60534c..6f2c81d8d 100755 --- a/test_regress/t/t_lint_literal_bad.pl +++ b/test_regress/t/t_lint_literal_bad.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Verilator only test") if !$Self->{vlt}; +scenarios(vlt_all => 1); -compile ( - fails=>1, - expect=> +compile( + fails => 1, + expect => '%Warning-WIDTH: t/t_lint_literal_bad.v:9: Value too large for 8 bit number: 256 ', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_lint_modport_dir_bad.pl b/test_regress/t/t_lint_modport_dir_bad.pl index cd0978837..5174323ac 100755 --- a/test_regress/t/t_lint_modport_dir_bad.pl +++ b/test_regress/t/t_lint_modport_dir_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -#$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(simulator => 1); -compile ( +compile( verilator_flags2 => ["--lint-only -Wno-DECLFILENAME"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_lint_modport_dir_bad.v:\d+: Attempt to drive input-only modport: signal %Error: Exiting due to .*', ); diff --git a/test_regress/t/t_lint_multidriven_bad.pl b/test_regress/t/t_lint_multidriven_bad.pl index d4855bcb7..627ccd56d 100755 --- a/test_regress/t/t_lint_multidriven_bad.pl +++ b/test_regress/t/t_lint_multidriven_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: Signal has multiple driving blocks with different clocking: t.mem %Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: ... Location of first driving block %Warning-MULTIDRIVEN: t/t_lint_multidriven_bad.v:\d+: ... Location of other driving block diff --git a/test_regress/t/t_lint_once_bad.pl b/test_regress/t/t_lint_once_bad.pl index 4a23f67b7..3a4d5630a 100755 --- a/test_regress/t/t_lint_once_bad.pl +++ b/test_regress/t/t_lint_once_bad.pl @@ -7,20 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--lint-only -Wwarn-UNUSED"], - verilator_make_gcc => 0, - fails=>1, - expect=> +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--lint-only -Wwarn-UNUSED"], + verilator_make_gcc => 0, + fails => 1, + expect => '%Warning-UNUSED: t/t_lint_once_bad.v:\d+: Signal is not driven, nor used: unus1 %Warning-UNUSED: Use .* to disable this message. %Warning-UNUSED: t/t_lint_once_bad.v:\d+: Signal is not driven, nor used: unus2 %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_lint_only.pl b/test_regress/t/t_lint_only.pl index 140f40c44..c96b4b96e 100755 --- a/test_regress/t/t_lint_only.pl +++ b/test_regress/t/t_lint_only.pl @@ -7,19 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ["--lint-only"], - verilator_make_gcc => 0, - ); +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, + ); foreach my $file (glob("$Self->{obj_dir}/*t_lint_only*")) { next if $file =~ /simx_compile.log/; # Made by driver.pl, not Verilator next if $file =~ /\.status/; # Made by driver.pl, not Verilator - $Self->error("%Error: Created $file, but --lint-only shouldn't create files"); + error("%Error: Created $file, but --lint-only shouldn't create files"); } ok(1); diff --git a/test_regress/t/t_lint_pindup_bad.pl b/test_regress/t/t_lint_pindup_bad.pl index 3cde70704..3015d3519 100755 --- a/test_regress/t/t_lint_pindup_bad.pl +++ b/test_regress/t/t_lint_pindup_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_lint_pindup_bad.v:\d+: Duplicate pin connection: i %Error: t/t_lint_pindup_bad.v:\d+: ... Location of original pin connection %Error: t/t_lint_pindup_bad.v:\d+: Pin not found: __pinNumber4 diff --git a/test_regress/t/t_lint_pkg_colon_bad.pl b/test_regress/t/t_lint_pkg_colon_bad.pl index 862dec3bc..1a04c85a0 100755 --- a/test_regress/t/t_lint_pkg_colon_bad.pl +++ b/test_regress/t/t_lint_pkg_colon_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> quotemeta( + expect => quotemeta( qq{%Error: t/t_lint_pkg_colon_bad.v:6: syntax error, unexpected ::, expecting ')' or ',' %Error: t/t_lint_pkg_colon_bad.v:6: Perhaps 'mispkg' is a package which needs to be predeclared? (IEEE 2017 26.3) %Error: t/t_lint_pkg_colon_bad.v:7: syntax error, unexpected ::, expecting ',' or ';' diff --git a/test_regress/t/t_lint_realcvt_bad.pl b/test_regress/t/t_lint_realcvt_bad.pl index d2bd9db35..40a534f14 100755 --- a/test_regress/t/t_lint_realcvt_bad.pl +++ b/test_regress/t/t_lint_realcvt_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ["--lint-only -Wwarn-REALCVT"], - verilator_make_gcc => 0, - fails=>1, - expect=> +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ["--lint-only -Wwarn-REALCVT"], + verilator_make_gcc => 0, + fails => 1, + expect => '%Warning-REALCVT: t/t_lint_realcvt_bad.v:\d+: Implicit conversion of real to integer %Warning-REALCVT: Use .* to disable this message. %Error: Exiting due to.*', diff --git a/test_regress/t/t_lint_repeat_bad.pl b/test_regress/t/t_lint_repeat_bad.pl index 8dbdf5e19..ed667e7ea 100755 --- a/test_regress/t/t_lint_repeat_bad.pl +++ b/test_regress/t/t_lint_repeat_bad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Warning-WIDTH: t/t_lint_repeat_bad.v:17: Operator ASSIGNW expects 1 bits on the Assign RHS, but Assign RHS's VARREF 'a' generates 2 bits. %Warning-WIDTH: Use \"\/\* verilator lint_off WIDTH \*\/\" and lint_on around source to disable this message. %Error: Exiting due to 1 warning} - ); + ); ok(1); 1; diff --git a/test_regress/t/t_lint_restore_bad.pl b/test_regress/t/t_lint_restore_bad.pl index 3e03b32e8..854be8e74 100755 --- a/test_regress/t/t_lint_restore_bad.pl +++ b/test_regress/t/t_lint_restore_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{.*%Warning-WIDTH: t/t_lint_restore_bad.v:\d+: Operator ASSIGN expects 5 bits on the Assign RHS, but Assign RHS's CONST '64'h1' generates 64 bits. %Warning-WIDTH: Use .* %Error: Exiting due to.*}, diff --git a/test_regress/t/t_lint_setout_bad.pl b/test_regress/t/t_lint_setout_bad.pl index f37983304..a59e415d5 100755 --- a/test_regress/t/t_lint_setout_bad.pl +++ b/test_regress/t/t_lint_setout_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_lint_setout_bad.v:\d+: Output port is connected to a constant pin, electrical short .*', ); diff --git a/test_regress/t/t_lint_setout_bad_noinl.pl b/test_regress/t/t_lint_setout_bad_noinl.pl index 9d574be3a..f1d9328ed 100755 --- a/test_regress/t/t_lint_setout_bad_noinl.pl +++ b/test_regress/t/t_lint_setout_bad_noinl.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_lint_setout_bad.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( v_flags2 => ["--lint-only -Oi"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_lint_setout_bad.v:\d+: Output port is connected to a constant pin, electrical short .*', ); diff --git a/test_regress/t/t_lint_syncasyncnet_bad.pl b/test_regress/t/t_lint_syncasyncnet_bad.pl index 0864e64c2..e907c3f4a 100755 --- a/test_regress/t/t_lint_syncasyncnet_bad.pl +++ b/test_regress/t/t_lint_syncasyncnet_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME --if-depth 10"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:\d+: Signal flopped as both synchronous and async: rst_both_l %Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:\d+: ... Location of async usage %Warning-SYNCASYNCNET: t/t_lint_syncasyncnet_bad.v:\d+: ... Location of sync usage diff --git a/test_regress/t/t_lint_unsized_bad.pl b/test_regress/t/t_lint_unsized_bad.pl index f9b683e90..96c9046aa 100755 --- a/test_regress/t/t_lint_unsized_bad.pl +++ b/test_regress/t/t_lint_unsized_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> quotemeta( + expect => quotemeta( qq{%Error: t/t_lint_unsized_bad.v:7: Too many digits for 32 bit number: 'd123456789123456789123456789 %Error: t/t_lint_unsized_bad.v:7: As that number was unsized ('d...) it is limited to 32 bits (IEEE 2017 5.7.1) }).'%Error: Exiting due to.*' diff --git a/test_regress/t/t_lint_unsup_deassign.pl b/test_regress/t/t_lint_unsup_deassign.pl index 3aea080dd..e7cbe69d1 100755 --- a/test_regress/t/t_lint_unsup_deassign.pl +++ b/test_regress/t/t_lint_unsup_deassign.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only --bbox-unsup"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_lint_unsup_mixed.pl b/test_regress/t/t_lint_unsup_mixed.pl index 3aea080dd..e7cbe69d1 100755 --- a/test_regress/t/t_lint_unsup_mixed.pl +++ b/test_regress/t/t_lint_unsup_mixed.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only --bbox-unsup"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_lint_unused.pl b/test_regress/t/t_lint_unused.pl index 1deb80a7b..07151b701 100755 --- a/test_regress/t/t_lint_unused.pl +++ b/test_regress/t/t_lint_unused.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only --bbox-sys --bbox-unsup -Wall -Wno-DECLFILENAME"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_lint_unused.v b/test_regress/t/t_lint_unused.v index ad4a23147..637f3cce7 100644 --- a/test_regress/t/t_lint_unused.v +++ b/test_regress/t/t_lint_unused.v @@ -3,6 +3,8 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2010 by Wilson Snyder. +`define STRINGIFY(x) `"x`" + module t (/*AUTOARG*/ // Outputs out, @@ -26,10 +28,10 @@ module t (/*AUTOARG*/ integer infile; integer outfile; initial begin - outfile = $fopen("obj_dir/t_lint_unused_bad/open.log", "w"); + outfile = $fopen({`STRINGIFY(`TEST_OBJ_DIR),"/open.log"}, "w"); $fwrite(outfile, "1\n"); $fclose(outfile); - infile = $fopen("obj_dir/t_lint_unused_bad/open.log", "r"); + infile = $fopen({`STRINGIFY(`TEST_OBJ_DIR),"/open.log"}, "r"); if ($fgetc(infile) != "1") begin end end diff --git a/test_regress/t/t_lint_unused_bad.pl b/test_regress/t/t_lint_unused_bad.pl index e97e36607..4def8e938 100755 --- a/test_regress/t/t_lint_unused_bad.pl +++ b/test_regress/t/t_lint_unused_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only --bbox-sys --bbox-unsup -Wall -Wno-DECLFILENAME"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-UNUSED: t/t_lint_unused_bad.v:\d+: Bits of signal are not used: assunu1\[5:1\] %Warning-UNUSED: Use .* to disable this message. %Warning-UNDRIVEN: t/t_lint_unused_bad.v:\d+: Bits of signal are not driven: udrb2\[14:13,11\] diff --git a/test_regress/t/t_lint_unused_iface.pl b/test_regress/t/t_lint_unused_iface.pl index 6fff7520d..053e32067 100755 --- a/test_regress/t/t_lint_unused_iface.pl +++ b/test_regress/t/t_lint_unused_iface.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_lint_unused_iface_bad.pl b/test_regress/t/t_lint_unused_iface_bad.pl index 0b7b75685..0859fbe9e 100755 --- a/test_regress/t/t_lint_unused_iface_bad.pl +++ b/test_regress/t/t_lint_unused_iface_bad.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( verilator_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_lint_width.pl b/test_regress/t/t_lint_width.pl index a823b8d70..09495b14b 100755 --- a/test_regress/t/t_lint_width.pl +++ b/test_regress/t/t_lint_width.pl @@ -7,13 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["--lint-only"], - make_top_shell => 0, - make_main => 0, - verilator_make_gcc => 0, +compile( + v_flags2 => ["--lint-only"], + make_top_shell => 0, + make_main => 0, + verilator_make_gcc => 0, ); ok(1); diff --git a/test_regress/t/t_lint_width_bad.pl b/test_regress/t/t_lint_width_bad.pl index c3abd847a..13284af33 100755 --- a/test_regress/t/t_lint_width_bad.pl +++ b/test_regress/t/t_lint_width_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{.*%Warning-WIDTH: t/t_lint_width_bad.v:\d+: Operator VAR 'XS' expects 4 bits on the Initial value, but Initial value's CONST '\?32\?bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' generates 32 bits. %Warning-WIDTH: Use .* %Warning-WIDTH: t/t_lint_width_bad.v:\d+: Operator ASSIGNW expects 5 bits on the Assign RHS, but Assign RHS's VARREF 'in' generates 4 bits. diff --git a/test_regress/t/t_math_arith.pl b/test_regress/t/t_math_arith.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_arith.pl +++ b/test_regress/t/t_math_arith.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_clog2.pl b/test_regress/t/t_math_clog2.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_clog2.pl +++ b/test_regress/t/t_math_clog2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_cmp.pl b/test_regress/t/t_math_cmp.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_cmp.pl +++ b/test_regress/t/t_math_cmp.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_concat.pl b/test_regress/t/t_math_concat.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_concat.pl +++ b/test_regress/t/t_math_concat.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_concat0.pl b/test_regress/t/t_math_concat0.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_concat0.pl +++ b/test_regress/t/t_math_concat0.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_concat64.pl b/test_regress/t/t_math_concat64.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_concat64.pl +++ b/test_regress/t/t_math_concat64.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_cond_huge.pl b/test_regress/t/t_math_cond_huge.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_cond_huge.pl +++ b/test_regress/t/t_math_cond_huge.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_const.pl b/test_regress/t/t_math_const.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_const.pl +++ b/test_regress/t/t_math_const.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_div.pl b/test_regress/t/t_math_div.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_div.pl +++ b/test_regress/t/t_math_div.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_div0.pl b/test_regress/t/t_math_div0.pl index 566b77252..525dd83c5 100755 --- a/test_regress/t/t_math_div0.pl +++ b/test_regress/t/t_math_div0.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--x-assign 0'], ); -execute ( +execute( ); ok(1); diff --git a/test_regress/t/t_math_divw.pl b/test_regress/t/t_math_divw.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_divw.pl +++ b/test_regress/t/t_math_divw.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_eq.pl b/test_regress/t/t_math_eq.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_eq.pl +++ b/test_regress/t/t_math_eq.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_equal.pl b/test_regress/t/t_math_equal.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_math_equal.pl +++ b/test_regress/t/t_math_equal.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_imm.pl b/test_regress/t/t_math_imm.pl index dccd4cf50..803dca735 100755 --- a/test_regress/t/t_math_imm.pl +++ b/test_regress/t/t_math_imm.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--compiler msvc"], # We have deep expressions we want to test + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_imm2.pl b/test_regress/t/t_math_imm2.pl index e20a5c521..da60e8024 100755 --- a/test_regress/t/t_math_imm2.pl +++ b/test_regress/t/t_math_imm2.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Verilator only test") if !$Self->{vlt}; +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], - ); +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_msvc_64.pl b/test_regress/t/t_math_msvc_64.pl index 8cd1847cb..4780ffb2e 100755 --- a/test_regress/t/t_math_msvc_64.pl +++ b/test_regress/t/t_math_msvc_64.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--compiler msvc"], # Bug requires msvc - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--compiler msvc"], # Bug requires msvc + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_mul.pl b/test_regress/t/t_math_mul.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_mul.pl +++ b/test_regress/t/t_math_mul.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_pick.pl b/test_regress/t/t_math_pick.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_pick.pl +++ b/test_regress/t/t_math_pick.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_pow.pl b/test_regress/t/t_math_pow.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_pow.pl +++ b/test_regress/t/t_math_pow.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_pow2.pl b/test_regress/t/t_math_pow2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_pow2.pl +++ b/test_regress/t/t_math_pow2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_pow3.pl b/test_regress/t/t_math_pow3.pl index 5ebc6a457..89a4e77d9 100755 --- a/test_regress/t/t_math_pow3.pl +++ b/test_regress/t/t_math_pow3.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_pow4.pl b/test_regress/t/t_math_pow4.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_pow4.pl +++ b/test_regress/t/t_math_pow4.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_pow5.pl b/test_regress/t/t_math_pow5.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_pow5.pl +++ b/test_regress/t/t_math_pow5.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_pow6.pl b/test_regress/t/t_math_pow6.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_pow6.pl +++ b/test_regress/t/t_math_pow6.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_precedence.pl b/test_regress/t/t_math_precedence.pl index df1a10d7b..2eff63c2b 100755 --- a/test_regress/t/t_math_precedence.pl +++ b/test_regress/t/t_math_precedence.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -#!$Self->{vcs} or $Self->unsupported("VCS does ** wrong, fixed in 2014"); +scenarios(simulator => 1); -compile ( - ); +#!$Self->{vcs} or unsupported("VCS does ** wrong, fixed in 2014"); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_real.pl b/test_regress/t/t_math_real.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_real.pl +++ b/test_regress/t/t_math_real.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_real_public.pl b/test_regress/t/t_math_real_public.pl index f6b472c39..b362560d5 100755 --- a/test_regress/t/t_math_real_public.pl +++ b/test_regress/t/t_math_real_public.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--cc --public'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_repl.pl b/test_regress/t/t_math_repl.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_repl.pl +++ b/test_regress/t/t_math_repl.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_reverse.pl b/test_regress/t/t_math_reverse.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_reverse.pl +++ b/test_regress/t/t_math_reverse.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_shift.pl b/test_regress/t/t_math_shift.pl index b8f89b85c..0a3b50107 100755 --- a/test_regress/t/t_math_shift.pl +++ b/test_regress/t/t_math_shift.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["-Wno-CLKDATA"] - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["-Wno-CLKDATA"] + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_shift_over_bad.pl b/test_regress/t/t_math_shift_over_bad.pl index e579e55f5..0b8bbaaaa 100755 --- a/test_regress/t/t_math_shift_over_bad.pl +++ b/test_regress/t/t_math_shift_over_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( verilator_flags2 => ["--lint-only"], - fails=>1, - expect=> + fails => 1, + expect => '%Error: Internal Error: .*: Value too wide for 32-bits expected in this context 64\'h123456789abcdef .', ); diff --git a/test_regress/t/t_math_shift_rep.pl b/test_regress/t/t_math_shift_rep.pl index 451cd7e39..426086634 100755 --- a/test_regress/t/t_math_shift_rep.pl +++ b/test_regress/t/t_math_shift_rep.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["-CFLAGS '-DVL_DEBUG -ggdb -O0'"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_shift_sel.pl b/test_regress/t/t_math_shift_sel.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_shift_sel.pl +++ b/test_regress/t/t_math_shift_sel.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_shiftrs.pl b/test_regress/t/t_math_shiftrs.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_shiftrs.pl +++ b/test_regress/t/t_math_shiftrs.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_sign_extend.pl b/test_regress/t/t_math_sign_extend.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_sign_extend.pl +++ b/test_regress/t/t_math_sign_extend.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_signed.pl b/test_regress/t/t_math_signed.pl index 5ebc6a457..89a4e77d9 100755 --- a/test_regress/t/t_math_signed.pl +++ b/test_regress/t/t_math_signed.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_signed2.pl b/test_regress/t/t_math_signed2.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_signed2.pl +++ b/test_regress/t/t_math_signed2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_signed3.pl b/test_regress/t/t_math_signed3.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_signed3.pl +++ b/test_regress/t/t_math_signed3.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_signed4.pl b/test_regress/t/t_math_signed4.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_signed4.pl +++ b/test_regress/t/t_math_signed4.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_signed5.pl b/test_regress/t/t_math_signed5.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_signed5.pl +++ b/test_regress/t/t_math_signed5.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_signed6.pl b/test_regress/t/t_math_signed6.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_signed6.pl +++ b/test_regress/t/t_math_signed6.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_signed7.pl b/test_regress/t/t_math_signed7.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_signed7.pl +++ b/test_regress/t/t_math_signed7.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_signed_wire.pl b/test_regress/t/t_math_signed_wire.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_signed_wire.pl +++ b/test_regress/t/t_math_signed_wire.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_math_strwidth.pl b/test_regress/t/t_math_strwidth.pl index 1db556bfe..1e3d87b0b 100755 --- a/test_regress/t/t_math_strwidth.pl +++ b/test_regress/t/t_math_strwidth.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => [], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => [], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_svl.pl b/test_regress/t/t_math_svl.pl index b3f97d2a2..d10857db2 100755 --- a/test_regress/t/t_math_svl.pl +++ b/test_regress/t/t_math_svl.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, - # Make sure we get the finish statement called - expect=> +execute( + check_finished => 1, + # Make sure we get the finish statement called + expect => '\*-\* All Finished \*-\* Goodbye world, at cycle \d+.*', ); diff --git a/test_regress/t/t_math_svl2.pl b/test_regress/t/t_math_svl2.pl index 04b66db54..aa70994c6 100755 --- a/test_regress/t/t_math_svl2.pl +++ b/test_regress/t/t_math_svl2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_swap.pl b/test_regress/t/t_math_swap.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_swap.pl +++ b/test_regress/t/t_math_swap.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_synmul.pl b/test_regress/t/t_math_synmul.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_synmul.pl +++ b/test_regress/t/t_math_synmul.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_tri.pl b/test_regress/t/t_math_tri.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_tri.pl +++ b/test_regress/t/t_math_tri.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_trig.pl b/test_regress/t/t_math_trig.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_trig.pl +++ b/test_regress/t/t_math_trig.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_vgen.pl b/test_regress/t/t_math_vgen.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_vgen.pl +++ b/test_regress/t/t_math_vgen.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_vliw.pl b/test_regress/t/t_math_vliw.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_math_vliw.pl +++ b/test_regress/t/t_math_vliw.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_math_width.pl b/test_regress/t/t_math_width.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_math_width.pl +++ b/test_regress/t/t_math_width.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mem.pl b/test_regress/t/t_mem.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem.pl +++ b/test_regress/t/t_mem.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_banks.pl b/test_regress/t/t_mem_banks.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mem_banks.pl +++ b/test_regress/t/t_mem_banks.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mem_cond.pl b/test_regress/t/t_mem_cond.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mem_cond.pl +++ b/test_regress/t/t_mem_cond.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mem_fifo.pl b/test_regress/t/t_mem_fifo.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_fifo.pl +++ b/test_regress/t/t_mem_fifo.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_file.pl b/test_regress/t/t_mem_file.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_file.pl +++ b/test_regress/t/t_mem_file.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_first.pl b/test_regress/t/t_mem_first.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_first.pl +++ b/test_regress/t/t_mem_first.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_func.pl b/test_regress/t/t_mem_func.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_func.pl +++ b/test_regress/t/t_mem_func.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_iforder.pl b/test_regress/t/t_mem_iforder.pl index fd76d2220..1be18a66c 100755 --- a/test_regress/t/t_mem_iforder.pl +++ b/test_regress/t/t_mem_iforder.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_multi_io.pl b/test_regress/t/t_mem_multi_io.pl index 886fe42af..6ab567600 100755 --- a/test_regress/t/t_mem_multi_io.pl +++ b/test_regress/t/t_mem_multi_io.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - # Disable inlining, this test is trivial without it - verilator_flags2 => ["-Oi --trace"], - verilator_flags3 => [], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + # Disable inlining, this test is trivial without it + verilator_flags2 => ["-Oi --trace"], + verilator_flags3 => [], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_multi_io2_cc.pl b/test_regress/t/t_mem_multi_io2_cc.pl index c52d2027e..83a749623 100755 --- a/test_regress/t/t_mem_multi_io2_cc.pl +++ b/test_regress/t/t_mem_multi_io2_cc.pl @@ -7,19 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_mem_multi_io2.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp -Oi"], - verilator_flags3 => [], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp -Oi"], + verilator_flags3 => [], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mem_multi_io2_sc.pl b/test_regress/t/t_mem_multi_io2_sc.pl index 24a2f0b76..e5d7f745b 100755 --- a/test_regress/t/t_mem_multi_io2_sc.pl +++ b/test_regress/t/t_mem_multi_io2_sc.pl @@ -7,18 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_mem_multi_io2.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp --sc -Oi"], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp --sc -Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mem_multi_io3_cc.pl b/test_regress/t/t_mem_multi_io3_cc.pl index e1509c512..57f12c140 100755 --- a/test_regress/t/t_mem_multi_io3_cc.pl +++ b/test_regress/t/t_mem_multi_io3_cc.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_mem_multi_io3.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp -Oi"], - verilator_flags3 => [], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp -Oi"], + verilator_flags3 => [], ); ok(1); diff --git a/test_regress/t/t_mem_multi_io3_sc.pl b/test_regress/t/t_mem_multi_io3_sc.pl index 19cfbc9d4..1ecc7694f 100755 --- a/test_regress/t/t_mem_multi_io3_sc.pl +++ b/test_regress/t/t_mem_multi_io3_sc.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_mem_multi_io3.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp --sc -Oi"], - verilator_flags3 => [], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp --sc -Oi"], + verilator_flags3 => [], ); ok(1); diff --git a/test_regress/t/t_mem_multi_ref_bad.pl b/test_regress/t/t_mem_multi_ref_bad.pl index c61061ba7..8f8522429 100755 --- a/test_regress/t/t_mem_multi_ref_bad.pl +++ b/test_regress/t/t_mem_multi_ref_bad.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>$Self->{v3}, - nc=>0, # Need to get it not to give the prompt - expect=> +scenarios(simulator => 1); + +compile( + fails => $Self->{vlt}, + nc => 0, # Need to get it not to give the prompt + expect => q{%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is (bit|logic) .*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is (bit|logic) .*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is (bit|logic) .*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal \+: or -: select; type already selected, or bad dimension: type is UNPACKARRAYDTYPE .*%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic .*%Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_mem_multidim.pl b/test_regress/t/t_mem_multidim.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_multidim.pl +++ b/test_regress/t/t_mem_multidim.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_multidim_Ox.pl b/test_regress/t/t_mem_multidim_Ox.pl index 2c4a0b665..31172a9fc 100755 --- a/test_regress/t/t_mem_multidim_Ox.pl +++ b/test_regress/t/t_mem_multidim_Ox.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_mem_multidim.v"); -compile ( - verilator_flags2 => ['--Ox'], - ); +compile( + verilator_flags2 => ['--Ox'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_multidim_trace.pl b/test_regress/t/t_mem_multidim_trace.pl index b8a04271d..e337974fe 100755 --- a/test_regress/t/t_mem_multidim_trace.pl +++ b/test_regress/t/t_mem_multidim_trace.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_mem_multidim.v"); -compile ( - verilator_flags2 => ['--cc --trace'], - ); +compile( + verilator_flags2 => ['--cc --trace'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_multiwire.pl b/test_regress/t/t_mem_multiwire.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_multiwire.pl +++ b/test_regress/t/t_mem_multiwire.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_packed.pl b/test_regress/t/t_mem_packed.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_packed.pl +++ b/test_regress/t/t_mem_packed.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_packed_assign.pl b/test_regress/t/t_mem_packed_assign.pl index 9ae333078..ede6d329a 100755 --- a/test_regress/t/t_mem_packed_assign.pl +++ b/test_regress/t/t_mem_packed_assign.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mem_packed_bad.pl b/test_regress/t/t_mem_packed_bad.pl index dc42ba5b8..96651ae1c 100755 --- a/test_regress/t/t_mem_packed_bad.pl +++ b/test_regress/t/t_mem_packed_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - verilator_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + verilator_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_mem_packed_bad.v:\d+: CONST '28'h0' unexpected in assignment to unpacked array %Error: Exiting due to.*}, ); diff --git a/test_regress/t/t_mem_shift.pl b/test_regress/t/t_mem_shift.pl index 1cb7de21a..752d4c34f 100755 --- a/test_regress/t/t_mem_shift.pl +++ b/test_regress/t/t_mem_shift.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--stats"], - ); +scenarios(simulator => 1); + +compile( + verilator_flags2 => ["--stats"], + ); if ($Self->{vlt}) { file_grep ($Self->{stats}, qr/Optimizations, Delayed shared-sets\s+(\d+)/i, 14); } -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_slice.pl b/test_regress/t/t_mem_slice.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_slice.pl +++ b/test_regress/t/t_mem_slice.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_mem_slice_bad.pl b/test_regress/t/t_mem_slice_bad.pl index 0d06abd76..9ae1f10e9 100755 --- a/test_regress/t/t_mem_slice_bad.pl +++ b/test_regress/t/t_mem_slice_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => q{%Error: t/t_mem_slice_bad.v:\d+: Slice selection index '\[2:0\]' outside data type's '\[1:0\]' %Error: t/t_mem_slice_bad.v:\d+: Slice selection index '\[3:0\]' outside data type's '\[2:0\]' %Error: t/t_mem_slice_bad.v:\d+: Slice selection index '\[3:0\]' outside data type's '\[1:0\]' diff --git a/test_regress/t/t_mem_slice_conc_bad.pl b/test_regress/t/t_mem_slice_conc_bad.pl index 7e422e2df..9b64617a5 100755 --- a/test_regress/t/t_mem_slice_conc_bad.pl +++ b/test_regress/t/t_mem_slice_conc_bad.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, +compile( + v_flags2 => ["--lint-only"], + fails => 1, ); ok(1); diff --git a/test_regress/t/t_mem_slice_dtype_bad.pl b/test_regress/t/t_mem_slice_dtype_bad.pl index 585a256ef..2c72e1d70 100755 --- a/test_regress/t/t_mem_slice_dtype_bad.pl +++ b/test_regress/t/t_mem_slice_dtype_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '%Error: t/t_mem_slice_dtype_bad.v:\d+: ADD unexpected in assignment to unpacked array .*%Error: Exiting due to.*', ); diff --git a/test_regress/t/t_mem_slot.pl b/test_regress/t/t_mem_slot.pl index e1e378296..da60e8024 100755 --- a/test_regress/t/t_mem_slot.pl +++ b/test_regress/t/t_mem_slot.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mem_twoedge.pl b/test_regress/t/t_mem_twoedge.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_mem_twoedge.pl +++ b/test_regress/t/t_mem_twoedge.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_metacmt_onoff.pl b/test_regress/t/t_metacmt_onoff.pl index 46e0e7aba..89a5cd459 100755 --- a/test_regress/t/t_metacmt_onoff.pl +++ b/test_regress/t/t_metacmt_onoff.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => [qw(--lint-only)], - verilator_make_gcc => 0, - make_top_shell => 0, - make_main => 0, - fails=>$Self->{vlt}, - expect=> +scenarios(simulator => 1); + +compile( + verilator_flags2 => [qw(--lint-only)], + verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, + fails => $Self->{vlt}, + expect => '%Warning-LITENDIAN: t/t_metacmt_onoff.v:\d+: Little bit endian vector: MSB < LSB of bit range: 0:1 %Warning-LITENDIAN: Use "/\* verilator lint_off LITENDIAN \*/" and lint_on around source to disable this message. %Warning-LITENDIAN: t/t_metacmt_onoff.v:\d+: Little bit endian vector: MSB < LSB of bit range: 0:3 %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_mod_dup_bad.pl b/test_regress/t/t_mod_dup_bad.pl index c08302fbc..1ebee5d1a 100755 --- a/test_regress/t/t_mod_dup_bad.pl +++ b/test_regress/t/t_mod_dup_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Verilator only test") if !$Self->{vlt}; +scenarios(vlt_all => 1); -compile ( - fails=>1, - expect=> +compile( + fails => 1, + expect => '%Error-MODDUP: t/t_mod_dup_bad.v:\d+: Duplicate declaration of module: a %Error-MODDUP: t/t_mod_dup_bad.v:\d+: ... Location of original declaration .* %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_mod_dup_ign.pl b/test_regress/t/t_mod_dup_ign.pl index 09e214c4a..cb7f7d6fe 100755 --- a/test_regress/t/t_mod_dup_ign.pl +++ b/test_regress/t/t_mod_dup_ign.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Verilator only test") if !$Self->{vlt}; +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ["--lint-only"], - verilator_make_gcc => 0, - ); +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, + ); ok(1); 1; diff --git a/test_regress/t/t_mod_interface_array.pl b/test_regress/t/t_mod_interface_array.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mod_interface_array.pl +++ b/test_regress/t/t_mod_interface_array.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_interface_array1.pl b/test_regress/t/t_mod_interface_array1.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mod_interface_array1.pl +++ b/test_regress/t/t_mod_interface_array1.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_interface_array1_noinl.pl b/test_regress/t/t_mod_interface_array1_noinl.pl index b58224421..a08606902 100755 --- a/test_regress/t/t_mod_interface_array1_noinl.pl +++ b/test_regress/t/t_mod_interface_array1_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_mod_interface_array1.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_interface_array2.pl b/test_regress/t/t_mod_interface_array2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mod_interface_array2.pl +++ b/test_regress/t/t_mod_interface_array2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_interface_array2_noinl.pl b/test_regress/t/t_mod_interface_array2_noinl.pl index 9d3ea52cc..588fdf3fb 100755 --- a/test_regress/t/t_mod_interface_array2_noinl.pl +++ b/test_regress/t/t_mod_interface_array2_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_mod_interface_array2.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_interface_array_noinl.pl b/test_regress/t/t_mod_interface_array_noinl.pl index 1147f25f2..e4adc68ac 100755 --- a/test_regress/t/t_mod_interface_array_noinl.pl +++ b/test_regress/t/t_mod_interface_array_noinl.pl @@ -6,14 +6,17 @@ 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 # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. + +scenarios(simulator => 1); + top_filename("t/t_mod_interface_array.v"); -compile ( +compile( v_flags2 => ["-Oi"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_longname.pl b/test_regress/t/t_mod_longname.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mod_longname.pl +++ b/test_regress/t/t_mod_longname.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_recurse.pl b/test_regress/t/t_mod_recurse.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mod_recurse.pl +++ b/test_regress/t/t_mod_recurse.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_mod_recurse1.pl b/test_regress/t/t_mod_recurse1.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_mod_recurse1.pl +++ b/test_regress/t/t_mod_recurse1.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_optm_if_array.pl b/test_regress/t/t_optm_if_array.pl index c39ed396f..37ce368a9 100755 --- a/test_regress/t/t_optm_if_array.pl +++ b/test_regress/t/t_optm_if_array.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -file_grep_not ("$Self->{obj_dir}/$Self->{VM_PREFIX}.cpp", qr/rstn_r/); +file_grep_not("$Self->{obj_dir}/$Self->{VM_PREFIX}.cpp", qr/rstn_r/); ok(1); 1; diff --git a/test_regress/t/t_optm_redor.pl b/test_regress/t/t_optm_redor.pl index c39ed396f..37ce368a9 100755 --- a/test_regress/t/t_optm_redor.pl +++ b/test_regress/t/t_optm_redor.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -file_grep_not ("$Self->{obj_dir}/$Self->{VM_PREFIX}.cpp", qr/rstn_r/); +file_grep_not("$Self->{obj_dir}/$Self->{VM_PREFIX}.cpp", qr/rstn_r/); ok(1); 1; diff --git a/test_regress/t/t_order.pl b/test_regress/t/t_order.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_order.pl +++ b/test_regress/t/t_order.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_order_2d.pl b/test_regress/t/t_order_2d.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_order_2d.pl +++ b/test_regress/t/t_order_2d.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_order_clkinst.pl b/test_regress/t/t_order_clkinst.pl index f6d3de4c4..11b8aeb6b 100755 --- a/test_regress/t/t_order_clkinst.pl +++ b/test_regress/t/t_order_clkinst.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); +scenarios(simulator => 1); -compile ( - ); +my $fail = ($Self->{vlt} && verilator_version() !~ /\(ord\)/); -execute ( - check_finished => !$fail, - fails => $fail, - ); +compile( + ); + +execute( + check_finished => !$fail, + fails => $fail, + ); ok(1); 1; diff --git a/test_regress/t/t_order_clkinst_bad.pl b/test_regress/t/t_order_clkinst_bad.pl index caf2f84ba..51f214681 100755 --- a/test_regress/t/t_order_clkinst_bad.pl +++ b/test_regress/t/t_order_clkinst_bad.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_order_clkinst.v"); -compile ( +compile( v_flags2 => ["-Wwarn-IMPERFECTSCH"], - fails=>1, - expect=> + fails => 1, + expect => q{.*%Warning-IMPERFECTSCH: .* .*%Error: Exiting due to.*}, ); diff --git a/test_regress/t/t_order_comboclkloop.pl b/test_regress/t/t_order_comboclkloop.pl index 6254d1470..1be18a66c 100755 --- a/test_regress/t/t_order_comboclkloop.pl +++ b/test_regress/t/t_order_comboclkloop.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished => 1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_order_comboloop.pl b/test_regress/t/t_order_comboloop.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_order_comboloop.pl +++ b/test_regress/t/t_order_comboloop.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_order_doubleloop.pl b/test_regress/t/t_order_doubleloop.pl index f6d3de4c4..11b8aeb6b 100755 --- a/test_regress/t/t_order_doubleloop.pl +++ b/test_regress/t/t_order_doubleloop.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/); +scenarios(simulator => 1); -compile ( - ); +my $fail = ($Self->{vlt} && verilator_version() !~ /\(ord\)/); -execute ( - check_finished => !$fail, - fails => $fail, - ); +compile( + ); + +execute( + check_finished => !$fail, + fails => $fail, + ); ok(1); 1; diff --git a/test_regress/t/t_order_first.pl b/test_regress/t/t_order_first.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_order_first.pl +++ b/test_regress/t/t_order_first.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_order_loop_bad.pl b/test_regress/t/t_order_loop_bad.pl index 1275a65f0..a29a29006 100755 --- a/test_regress/t/t_order_loop_bad.pl +++ b/test_regress/t/t_order_loop_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: Circular logic when ordering code .* %Error: Example path: t/t_order_loop_bad.v:\d+: ALWAYS %Error: Example path: t/t_order_loop_bad.v:\d+: t.ready diff --git a/test_regress/t/t_order_multialways.pl b/test_regress/t/t_order_multialways.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_order_multialways.pl +++ b/test_regress/t/t_order_multialways.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_order_multidriven.cpp b/test_regress/t/t_order_multidriven.cpp index 86068112d..7fae07638 100644 --- a/test_regress/t/t_order_multidriven.cpp +++ b/test_regress/t/t_order_multidriven.cpp @@ -5,6 +5,9 @@ #include "verilated.h" #include "verilated_vcd_c.h" +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + Vt_order_multidriven * vcore; VerilatedVcdC * vcd; vluint64_t vtime; @@ -43,7 +46,7 @@ int main() { vcd = new VerilatedVcdC; vcore->trace( vcd, 99 ); - vcd->open( "obj_dir/t_order_multidriven/sim.vcd" ); + vcd->open(STRINGIFY(TEST_OBJ_DIR) "/simx.vcd" ); vcore->i_clk_wr = 0; vcore->i_clk_rd = 0; diff --git a/test_regress/t/t_order_multidriven.pl b/test_regress/t/t_order_multidriven.pl index 1edafb042..7881a8cb4 100755 --- a/test_regress/t/t_order_multidriven.pl +++ b/test_regress/t/t_order_multidriven.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["--trace --exe $Self->{t_dir}/t_order_multidriven.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_order_quad.pl b/test_regress/t/t_order_quad.pl index 653add643..66b07eadf 100755 --- a/test_regress/t/t_order_quad.pl +++ b/test_regress/t/t_order_quad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( make_top_shell => 0, make_main => 0, verilator_flags2 => ["--exe","$Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_order_wireloop.pl b/test_regress/t/t_order_wireloop.pl index 7a3675a5c..964e674f5 100755 --- a/test_regress/t/t_order_wireloop.pl +++ b/test_regress/t/t_order_wireloop.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>$Self->{v3}, +scenarios(simulator => 1); + +compile( + fails => $Self->{vlt}, # Used to be %Error: t/t_order_wireloop.v:\d+: Wire inputs its own output, creating circular logic .wire x=x. # However we no longer gate optimize this - expect=> + expect => '%Warning-UNOPT: t/t_order_wireloop.v:\d+: Signal unoptimizable: Feedback to public clock or circular logic: bar ', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_package.pl b/test_regress/t/t_package.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_package.pl +++ b/test_regress/t/t_package.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_package_abs.pl b/test_regress/t/t_package_abs.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_package_abs.pl +++ b/test_regress/t/t_package_abs.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_package_ddecl.pl b/test_regress/t/t_package_ddecl.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_package_ddecl.pl +++ b/test_regress/t/t_package_ddecl.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_package_dimport.pl b/test_regress/t/t_package_dimport.pl index 6995cc39a..bff7cfb29 100755 --- a/test_regress/t/t_package_dimport.pl +++ b/test_regress/t/t_package_dimport.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); + +compile( + ); # Compile only diff --git a/test_regress/t/t_package_dot.pl b/test_regress/t/t_package_dot.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_package_dot.pl +++ b/test_regress/t/t_package_dot.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_package_enum.pl b/test_regress/t/t_package_enum.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_package_enum.pl +++ b/test_regress/t/t_package_enum.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_package_export.pl b/test_regress/t/t_package_export.pl index 27a0ad8e8..939096741 100755 --- a/test_regress/t/t_package_export.pl +++ b/test_regress/t/t_package_export.pl @@ -7,14 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vcs} and $Self->unsupported("VCS unsupported"); +scenarios(simulator => 1); +$Self->{vcs} and unsupported("VCS unsupported"); -compile ( +compile( v_flags2 => ['+define+T_PACKAGE_EXPORT',], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_package_export_bad.pl b/test_regress/t/t_package_export_bad.pl index 96f501b7e..d34ace777 100755 --- a/test_regress/t/t_package_export_bad.pl +++ b/test_regress/t/t_package_export_bad.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_package_export.v"); -compile ( +compile( v_flags2 => ['+define+T_PACKAGE_EXPORT_BAD',], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM2 %Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM3 %Error: t/t_package_export.v:\d+: Can\'t find definition of scope/variable: PARAM2 diff --git a/test_regress/t/t_package_param.pl b/test_regress/t/t_package_param.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_package_param.pl +++ b/test_regress/t/t_package_param.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_package_twodeep.pl b/test_regress/t/t_package_twodeep.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_package_twodeep.pl +++ b/test_regress/t/t_package_twodeep.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_package_verb.pl b/test_regress/t/t_package_verb.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_package_verb.pl +++ b/test_regress/t/t_package_verb.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param.pl b/test_regress/t/t_param.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param.pl +++ b/test_regress/t/t_param.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_array.pl b/test_regress/t/t_param_array.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_array.pl +++ b/test_regress/t/t_param_array.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_array2.pl b/test_regress/t/t_param_array2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_array2.pl +++ b/test_regress/t/t_param_array2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_avec.pl b/test_regress/t/t_param_avec.pl index 18bb867d4..39fa482ec 100755 --- a/test_regress/t/t_param_avec.pl +++ b/test_regress/t/t_param_avec.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug477"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug477"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_bit_sel.pl b/test_regress/t/t_param_bit_sel.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_bit_sel.pl +++ b/test_regress/t/t_param_bit_sel.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_ceil.pl b/test_regress/t/t_param_ceil.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_ceil.pl +++ b/test_regress/t/t_param_ceil.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_chain.pl b/test_regress/t/t_param_chain.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_chain.pl +++ b/test_regress/t/t_param_chain.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_circ_bad.pl b/test_regress/t/t_param_circ_bad.pl index 9b52eb1bd..c0997311d 100755 --- a/test_regress/t/t_param_circ_bad.pl +++ b/test_regress/t/t_param_circ_bad.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_param_circ_bad.v:\d+: Variable\'s initial value is circular: X %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_param_concat.pl b/test_regress/t/t_param_concat.pl index 22a95a8dc..f018b8d24 100755 --- a/test_regress/t/t_param_concat.pl +++ b/test_regress/t/t_param_concat.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--Wno-WIDTHCONCAT"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ["--Wno-WIDTHCONCAT"], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_concat_bad.pl b/test_regress/t/t_param_concat_bad.pl index 20ca444fe..27e7256ad 100755 --- a/test_regress/t/t_param_concat_bad.pl +++ b/test_regress/t/t_param_concat_bad.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_param_concat.v"); -compile ( - fails=>1, - expect=> +compile( + fails => 1, + expect => '%Warning-WIDTHCONCAT: t/t_param_concat.v:\d+: Unsized numbers/parameters not allowed in concatenations. %Warning-WIDTHCONCAT: Use "/\* verilator lint_off WIDTHCONCAT \*/" and lint_on around source to disable this message. %Warning-WIDTHCONCAT: t/t_param_concat.v:\d+: Unsized numbers/parameters not allowed in replications. .*%Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_param_const_part.pl b/test_regress/t/t_param_const_part.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_const_part.pl +++ b/test_regress/t/t_param_const_part.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_ddeep_width.pl b/test_regress/t/t_param_ddeep_width.pl index 87815646d..a6554ba87 100755 --- a/test_regress/t/t_param_ddeep_width.pl +++ b/test_regress/t/t_param_ddeep_width.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_param_default.pl b/test_regress/t/t_param_default.pl old mode 100644 new mode 100755 index 134a79f9e..990186320 --- a/test_regress/t/t_param_default.pl +++ b/test_regress/t/t_param_default.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_default_bad.pl b/test_regress/t/t_param_default_bad.pl index 2b22d5559..0d35c2868 100755 --- a/test_regress/t/t_param_default_bad.pl +++ b/test_regress/t/t_param_default_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '%Error: Internal Error: t/t_param_default_bad.v:6: ../V3Param.cpp:\d+: Parameter without initial value %Error: Internal Error: See the manual and http://www.veripool.org/verilator for more assistance. .*%Error: Command Failed.*', diff --git a/test_regress/t/t_param_first.pl b/test_regress/t/t_param_first.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_first.pl +++ b/test_regress/t/t_param_first.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_func.pl b/test_regress/t/t_param_func.pl index 385b6a57e..5c448de7c 100755 --- a/test_regress/t/t_param_func.pl +++ b/test_regress/t/t_param_func.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); ok(1); diff --git a/test_regress/t/t_param_if_blk.pl b/test_regress/t/t_param_if_blk.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_if_blk.pl +++ b/test_regress/t/t_param_if_blk.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_local.pl b/test_regress/t/t_param_local.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_local.pl +++ b/test_regress/t/t_param_local.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_long.pl b/test_regress/t/t_param_long.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_long.pl +++ b/test_regress/t/t_param_long.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_mem_attr.pl b/test_regress/t/t_param_mem_attr.pl index ba0e9879b..3a7763b0d 100755 --- a/test_regress/t/t_param_mem_attr.pl +++ b/test_regress/t/t_param_mem_attr.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Compile only test. -compile ( - ); +compile( + ); ok(1); 1; diff --git a/test_regress/t/t_param_module.pl b/test_regress/t/t_param_module.pl index 38eec757b..39c42f7d0 100755 --- a/test_regress/t/t_param_module.pl +++ b/test_regress/t/t_param_module.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Compile only test -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_named.pl b/test_regress/t/t_param_named.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_named.pl +++ b/test_regress/t/t_param_named.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_named_2.pl b/test_regress/t/t_param_named_2.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_named_2.pl +++ b/test_regress/t/t_param_named_2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_no_parentheses.pl b/test_regress/t/t_param_no_parentheses.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_no_parentheses.pl +++ b/test_regress/t/t_param_no_parentheses.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_package.pl b/test_regress/t/t_param_package.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_package.pl +++ b/test_regress/t/t_param_package.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_public.pl b/test_regress/t/t_param_public.pl index 4408cbf72..0560d989d 100755 --- a/test_regress/t/t_param_public.pl +++ b/test_regress/t/t_param_public.pl @@ -7,19 +7,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + if ($Self->{vlt}) { - compile ( - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], - make_top_shell => 0, - make_main => 0, - ); + compile( + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], + make_top_shell => 0, + make_main => 0, + ); } else { - compile ( - ); + compile( + ); } -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_real.pl b/test_regress/t/t_param_real.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_real.pl +++ b/test_regress/t/t_param_real.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_repl.pl b/test_regress/t/t_param_repl.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_repl.pl +++ b/test_regress/t/t_param_repl.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_seg.pl b/test_regress/t/t_param_seg.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_seg.pl +++ b/test_regress/t/t_param_seg.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_sel.pl b/test_regress/t/t_param_sel.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_sel.pl +++ b/test_regress/t/t_param_sel.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_sel_range.pl b/test_regress/t/t_param_sel_range.pl index dec6d69ed..d3139fae5 100755 --- a/test_regress/t/t_param_sel_range.pl +++ b/test_regress/t/t_param_sel_range.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only -Wno-SELRANGE"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_param_sel_range_bad.pl b/test_regress/t/t_param_sel_range_bad.pl index da3334ee2..0e1114afa 100755 --- a/test_regress/t/t_param_sel_range_bad.pl +++ b/test_regress/t/t_param_sel_range_bad.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_param_sel_range.v"); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>1, + fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Warning-SELRANGE: t/t_param_sel_range.v:\d+: Selection index out of range: 7:7 outside 4:0 %Warning-SELRANGE: Use .* to disable this message. %Error: Exiting due to.*', diff --git a/test_regress/t/t_param_shift.pl b/test_regress/t/t_param_shift.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_shift.pl +++ b/test_regress/t/t_param_shift.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_type.pl b/test_regress/t/t_param_type.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_type.pl +++ b/test_regress/t/t_param_type.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_type2.pl b/test_regress/t/t_param_type2.pl index ab1195fb5..73dc10324 100755 --- a/test_regress/t/t_param_type2.pl +++ b/test_regress/t/t_param_type2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -#execute ( -# check_finished=>1, +#execute( +# check_finished => 1, # ); ok(1); diff --git a/test_regress/t/t_param_up_bad.pl b/test_regress/t/t_param_up_bad.pl index 17f2bb4c2..4dde9334b 100755 --- a/test_regress/t/t_param_up_bad.pl +++ b/test_regress/t/t_param_up_bad.pl @@ -7,14 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); -compile ( +scenarios(vlt_all => 1); + +compile( v_flags2 => ["--lint-only"], fails => 1, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - expect=> + expect => '%Error: t/t_param_up_bad.v:\d+: Can\'t find definition of scope/variable: bar .*%Error: Exiting due to.*', ); diff --git a/test_regress/t/t_param_value.pl b/test_regress/t/t_param_value.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_param_value.pl +++ b/test_regress/t/t_param_value.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_param_while.pl b/test_regress/t/t_param_while.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_param_while.pl +++ b/test_regress/t/t_param_while.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_param_wide_io.pl b/test_regress/t/t_param_wide_io.pl index b12dfcc0c..fc7eccce3 100755 --- a/test_regress/t/t_param_wide_io.pl +++ b/test_regress/t/t_param_wide_io.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -#execute (); +#execute(); ok(1); 1; diff --git a/test_regress/t/t_parse_delay.pl b/test_regress/t/t_parse_delay.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_parse_delay.pl +++ b/test_regress/t/t_parse_delay.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_pipe_exit_bad.pl b/test_regress/t/t_pipe_exit_bad.pl index 4cbba3f9d..c190c3dd7 100755 --- a/test_regress/t/t_pipe_exit_bad.pl +++ b/test_regress/t/t_pipe_exit_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Verilator only test") if !$Self->{vlt}; +scenarios(vlt => 1); top_filename("t/t_pipe_filter.v"); -compile ( +compile( verilator_flags2 => ['-E --pipe-filter \'perl t/t_pipe_exit_bad.pf\' '], - verilator_make_gcc=>0, + verilator_make_gcc => 0, stdout_filename => $stdout_filename, - fails=>1, - expect=> + fails => 1, + expect => '%Error: t_pipe_exit_bad.pf: Intentional bad exit status....*', ); ok(1); diff --git a/test_regress/t/t_pipe_filter.pl b/test_regress/t/t_pipe_filter.pl index 08a228650..e33936e57 100755 --- a/test_regress/t/t_pipe_filter.pl +++ b/test_regress/t/t_pipe_filter.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Verilator only test") if !$Self->{vlt}; +scenarios(vlt => 1); $Self->{golden_out} ||= "t/$Self->{name}.out"; my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; -compile ( +compile( verilator_flags2 => ['-E --pipe-filter \'perl t/t_pipe_filter.pf\' '], - verilator_make_gcc=>0, + verilator_make_gcc => 0, stdout_filename => $stdout_filename, ); ok(files_identical($stdout_filename, $Self->{golden_out})); diff --git a/test_regress/t/t_pp_circdef_bad.pl b/test_regress/t/t_pp_circdef_bad.pl index 31fc36b26..28672314c 100755 --- a/test_regress/t/t_pp_circdef_bad.pl +++ b/test_regress/t/t_pp_circdef_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_pp_circdef_bad.v:\d+: Recursive `define or other nested inclusion .* %Error: Exiting due to.*', diff --git a/test_regress/t/t_pp_display.pl b/test_regress/t/t_pp_display.pl index ffa68590b..77c3ca8a0 100755 --- a/test_regress/t/t_pp_display.pl +++ b/test_regress/t/t_pp_display.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(vlt => 1); -execute ( - check_finished=>1, - expect=>quotemeta( +compile( + ); + +execute( + check_finished => 1, + expect => quotemeta( qq{pre thrupre thrumid thrupost post: "right side" left side: "right side" left side: "right side" diff --git a/test_regress/t/t_pp_dupdef.pl b/test_regress/t/t_pp_dupdef.pl index a659ac037..b9555f527 100755 --- a/test_regress/t/t_pp_dupdef.pl +++ b/test_regress/t/t_pp_dupdef.pl @@ -7,9 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( +compile( verilator_flags2 => ["-Wno-REDEFMACRO"], ); diff --git a/test_regress/t/t_pp_dupdef_bad.pl b/test_regress/t/t_pp_dupdef_bad.pl index 5b9766fd1..91f18972a 100755 --- a/test_regress/t/t_pp_dupdef_bad.pl +++ b/test_regress/t/t_pp_dupdef_bad.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_pp_dupdef.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Redefining existing define: DUP, with different value: barney %Warning-REDEFMACRO: Use .* to disable this message. %Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Previous definition is here, with value: fred diff --git a/test_regress/t/t_pp_lib.pl b/test_regress/t/t_pp_lib.pl index 8c36e6f68..9d820dc30 100755 --- a/test_regress/t/t_pp_lib.pl +++ b/test_regress/t/t_pp_lib.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ['-v', 't/t_pp_lib_library.v'], - ); +scenarios(vlt => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ['-v', 't/t_pp_lib_library.v'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_pp_misdef_bad.pl b/test_regress/t/t_pp_misdef_bad.pl index 0fb0f0c1c..1b89ea0fe 100755 --- a/test_regress/t/t_pp_misdef_bad.pl +++ b/test_regress/t/t_pp_misdef_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_pp_misdef_bad.v:\d+: Define or directive not defined: `NOTDEF %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_pp_pragmas.pl b/test_regress/t/t_pp_pragmas.pl index 7058e622f..beafec13a 100755 --- a/test_regress/t/t_pp_pragmas.pl +++ b/test_regress/t/t_pp_pragmas.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(vlt => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_pp_underline_bad.pl b/test_regress/t/t_pp_underline_bad.pl index 863ab4c5c..795815f25 100755 --- a/test_regress/t/t_pp_underline_bad.pl +++ b/test_regress/t/t_pp_underline_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - verilator_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + verilator_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_pp_underline_bad.v:\d+: Extra underscore in meta-comment.* %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_preproc.pl b/test_regress/t/t_preproc.pl index d4c1efdc3..f2c515d08 100755 --- a/test_regress/t/t_preproc.pl +++ b/test_regress/t/t_preproc.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); $Self->{golden_out} ||= "t/$Self->{name}.out"; my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; -compile ( +compile( verilator_flags2 => ['-DDEF_A0 -DPREDEF_COMMAND_LINE -E'], - verilator_make_gcc=>0, + verilator_make_gcc => 0, stdout_filename => $stdout_filename, ); @@ -46,14 +46,14 @@ sub preproc_check { if ($line =~ /^Line_Preproc_Check\s+(\d+)/) { my $linecmt = $1; my $check = shift @Line_Checks; - 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"); } + if (!$check) { error("$filename2:$.: Extra Line_Preproc_Check\n"); } + if ($linecmt != $check) { error("$filename2:$.: __LINE__ inserted $linecmt, exp=$check\n"); } + if ($lineno != $check) { error("$filename2:$.: __LINE__ on `line $lineno, exp=$check\n"); } } } $fh->close; } - if ($Line_Checks[0]) { $Self->error("$filename2: Missing a Line_Preproc_Check\n"); } + if ($Line_Checks[0]) { error("$filename2: Missing a Line_Preproc_Check\n"); } return 1; } diff --git a/test_regress/t/t_preproc_def09.pl b/test_regress/t/t_preproc_def09.pl index 606b72845..a44da8bdb 100755 --- a/test_regress/t/t_preproc_def09.pl +++ b/test_regress/t/t_preproc_def09.pl @@ -7,13 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; -compile ( +compile( verilator_flags2 => ['-E'], - verilator_make_gcc=>0, + verilator_make_gcc => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_dos.pl b/test_regress/t/t_preproc_dos.pl index 04041384c..c43722876 100755 --- a/test_regress/t/t_preproc_dos.pl +++ b/test_regress/t/t_preproc_dos.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("$Self->{obj_dir}/$Self->{name}.v"); # Rather then having to maintain a new .v and .out, simply add returns diff --git a/test_regress/t/t_preproc_ifdef.pl b/test_regress/t/t_preproc_ifdef.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_preproc_ifdef.pl +++ b/test_regress/t/t_preproc_ifdef.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_preproc_inc_bad.pl b/test_regress/t/t_preproc_inc_bad.pl index aa3d0eae9..70c332798 100755 --- a/test_regress/t/t_preproc_inc_bad.pl +++ b/test_regress/t/t_preproc_inc_bad.pl @@ -7,13 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); -compile ( - verilator_flags2 => ["--lint-only"], - fails=>1, +compile( + verilator_flags2 => ["--lint-only"], + fails => 1, # The .vh file has the error, not the .v file - expect=> + expect => '%Error: t/t_preproc_inc_inc_bad.vh:10: syntax error, unexpected endmodule, expecting IDENTIFIER' ); diff --git a/test_regress/t/t_preproc_kwd.pl b/test_regress/t/t_preproc_kwd.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_preproc_kwd.pl +++ b/test_regress/t/t_preproc_kwd.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_preproc_noline.pl b/test_regress/t/t_preproc_noline.pl index 0bb99340a..6f878a40c 100755 --- a/test_regress/t/t_preproc_noline.pl +++ b/test_regress/t/t_preproc_noline.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; top_filename("t/t_preproc_noline.v"); -compile ( +compile( verilator_flags2 => ['-E -P'], - verilator_make_gcc=>0, + verilator_make_gcc => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_persist.pl b/test_regress/t/t_preproc_persist.pl index 87fc25f66..bdb83fc1e 100755 --- a/test_regress/t/t_preproc_persist.pl +++ b/test_regress/t/t_preproc_persist.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; -compile ( +compile( # Override default flags v_flags => [''], v_other_filenames => ["t_preproc_persist2.v"], diff --git a/test_regress/t/t_preproc_ttempty.pl b/test_regress/t/t_preproc_ttempty.pl index c76f0a87a..c17481020 100755 --- a/test_regress/t/t_preproc_ttempty.pl +++ b/test_regress/t/t_preproc_ttempty.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; -compile ( +compile( # Override default flags v_flags => [''], verilator_flags => ["-E -P +incdir+t -Mdir $Self->{obj_dir}", ], diff --git a/test_regress/t/t_preproc_undefineall.pl b/test_regress/t/t_preproc_undefineall.pl index 9324c83cb..51080a82b 100755 --- a/test_regress/t/t_preproc_undefineall.pl +++ b/test_regress/t/t_preproc_undefineall.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ['+define+PREDEF_COMMAND_LINE'], verilator_flags2 => ["--lint-only"], verilator_make_gcc => 0, diff --git a/test_regress/t/t_program.pl b/test_regress/t/t_program.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_program.pl +++ b/test_regress/t/t_program.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_repeat.pl b/test_regress/t/t_repeat.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_repeat.pl +++ b/test_regress/t/t_repeat.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_rnd.pl b/test_regress/t/t_rnd.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_rnd.pl +++ b/test_regress/t/t_rnd.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_savable.pl b/test_regress/t/t_savable.pl index f74dcf0fd..942feae4d 100755 --- a/test_regress/t/t_savable.pl +++ b/test_regress/t/t_savable.pl @@ -7,21 +7,23 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--savable"], save_time => 500, ); -execute ( - check_finished=>0, +execute( + check_finished => 0, all_run_flags => ['+save_time=500'], ); --r "$Self->{obj_dir}/saved.vltsv" or $Self->error("Saved.vltsv not created\n"); +-r "$Self->{obj_dir}/saved.vltsv" or error("Saved.vltsv not created\n"); -execute ( +execute( all_run_flags => ['+save_restore=1'], - check_finished=>1, + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_scope_map.cpp b/test_regress/t/t_scope_map.cpp index 4c8ebdd20..9b7863f0c 100644 --- a/test_regress/t/t_scope_map.cpp +++ b/test_regress/t/t_scope_map.cpp @@ -13,6 +13,9 @@ #include "Vt_scope_map.h" +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + using namespace std; unsigned long long main_time = 0; @@ -30,7 +33,7 @@ int main(int argc, char **argv, char **env) { VerilatedVcdC* tfp = new VerilatedVcdC; top->trace(tfp,99); - tfp->open("obj_dir/t_scope_map/simx.vcd"); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/simx.vcd"); top->CLK = 0; top->eval(); diff --git a/test_regress/t/t_scope_map.pl b/test_regress/t/t_scope_map.pl index d3e6e19b0..e93d68454 100755 --- a/test_regress/t/t_scope_map.pl +++ b/test_regress/t/t_scope_map.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["--trace --exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_select_bad_msb.pl b/test_regress/t/t_select_bad_msb.pl index e81c0312e..8fe0627aa 100755 --- a/test_regress/t/t_select_bad_msb.pl +++ b/test_regress/t/t_select_bad_msb.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - fails=>1, - expect=> +compile( + fails => 1, + expect => '%Warning-LITENDIAN: t/t_select_bad_msb.v:\d+: Little bit endian vector: MSB < LSB of bit range: 0:22 .* %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_select_bad_range.pl b/test_regress/t/t_select_bad_range.pl index db2b0202e..9fcd9df23 100755 --- a/test_regress/t/t_select_bad_range.pl +++ b/test_regress/t/t_select_bad_range.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Warning-SELRANGE: t/t_select_bad_range.v:\d+: Selection index out of range: 44:44 outside 43:0 %Warning-SELRANGE: Use .* %Warning-SELRANGE: t/t_select_bad_range.v:\d+: Selection index out of range: 44:41 outside 43:0 %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_select_bad_range2.pl b/test_regress/t/t_select_bad_range2.pl index f127f0494..9f7ddd7b2 100755 --- a/test_regress/t/t_select_bad_range2.pl +++ b/test_regress/t/t_select_bad_range2.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Warning-SELRANGE: t/t_select_bad_range2.v:\d+: Selection index out of range: 3:2 outside 1:0 %Warning-SELRANGE: Use .* %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_select_bad_range3.pl b/test_regress/t/t_select_bad_range3.pl index c7f200d12..9f8ee62e7 100755 --- a/test_regress/t/t_select_bad_range3.pl +++ b/test_regress/t/t_select_bad_range3.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Warning-SELRANGE: t/t_select_bad_range3.v:\d+: Selection index out of range: 13 outside 12:10 %Warning-SELRANGE: Use .* %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_select_bad_tri.pl b/test_regress/t/t_select_bad_tri.pl index 1dd2d0389..a6879d9cf 100755 --- a/test_regress/t/t_select_bad_tri.pl +++ b/test_regress/t/t_select_bad_tri.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => q{%Error: t/t_select_bad_tri.v:\d+: Selection index is constantly unknown or tristated: lsb=7'bxxxxxxx width=32'sh47 %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_select_bound1.pl b/test_regress/t/t_select_bound1.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_select_bound1.pl +++ b/test_regress/t/t_select_bound1.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_select_bound2.pl b/test_regress/t/t_select_bound2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_select_bound2.pl +++ b/test_regress/t/t_select_bound2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_select_index.pl b/test_regress/t/t_select_index.pl index 98dc46682..c9adf6d32 100755 --- a/test_regress/t/t_select_index.pl +++ b/test_regress/t/t_select_index.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_index2.pl b/test_regress/t/t_select_index2.pl index 514f638f2..dd4decbdb 100755 --- a/test_regress/t/t_select_index2.pl +++ b/test_regress/t/t_select_index2.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_select_lhs_oob.pl b/test_regress/t/t_select_lhs_oob.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_select_lhs_oob.pl +++ b/test_regress/t/t_select_lhs_oob.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_select_lhs_oob2.pl b/test_regress/t/t_select_lhs_oob2.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_select_lhs_oob2.pl +++ b/test_regress/t/t_select_lhs_oob2.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_little.pl b/test_regress/t/t_select_little.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_select_little.pl +++ b/test_regress/t/t_select_little.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_little_pack.pl b/test_regress/t/t_select_little_pack.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_select_little_pack.pl +++ b/test_regress/t/t_select_little_pack.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_loop.pl b/test_regress/t/t_select_loop.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_select_loop.pl +++ b/test_regress/t/t_select_loop.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_negative.pl b/test_regress/t/t_select_negative.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_select_negative.pl +++ b/test_regress/t/t_select_negative.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_param.pl b/test_regress/t/t_select_param.pl index 98dc46682..c9adf6d32 100755 --- a/test_regress/t/t_select_param.pl +++ b/test_regress/t/t_select_param.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_plus.pl b/test_regress/t/t_select_plus.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_select_plus.pl +++ b/test_regress/t/t_select_plus.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_plusloop.pl b/test_regress/t/t_select_plusloop.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_select_plusloop.pl +++ b/test_regress/t/t_select_plusloop.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_runtime_range.pl b/test_regress/t/t_select_runtime_range.pl index 98dc46682..c9adf6d32 100755 --- a/test_regress/t/t_select_runtime_range.pl +++ b/test_regress/t/t_select_runtime_range.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_select_set.pl b/test_regress/t/t_select_set.pl index 98dc46682..c9adf6d32 100755 --- a/test_regress/t/t_select_set.pl +++ b/test_regress/t/t_select_set.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_slice_cond.pl b/test_regress/t/t_slice_cond.pl index 385b6a57e..5c448de7c 100755 --- a/test_regress/t/t_slice_cond.pl +++ b/test_regress/t/t_slice_cond.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); ok(1); diff --git a/test_regress/t/t_slice_init.pl b/test_regress/t/t_slice_init.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_slice_init.pl +++ b/test_regress/t/t_slice_init.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_slice_struct_array_modport.pl b/test_regress/t/t_slice_struct_array_modport.pl index 086fa8d0c..62c359668 100755 --- a/test_regress/t/t_slice_struct_array_modport.pl +++ b/test_regress/t/t_slice_struct_array_modport.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--lint-only"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_static_elab.pl b/test_regress/t/t_static_elab.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_static_elab.pl +++ b/test_regress/t/t_static_elab.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_stream.pl b/test_regress/t/t_stream.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_stream.pl +++ b/test_regress/t/t_stream.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_stream2.pl b/test_regress/t/t_stream2.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_stream2.pl +++ b/test_regress/t/t_stream2.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_stream3.pl b/test_regress/t/t_stream3.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_stream3.pl +++ b/test_regress/t/t_stream3.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_string.pl b/test_regress/t/t_string.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_string.pl +++ b/test_regress/t/t_string.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_string_type_methods.pl b/test_regress/t/t_string_type_methods.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_string_type_methods.pl +++ b/test_regress/t/t_string_type_methods.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_anon.pl b/test_regress/t/t_struct_anon.pl index 1774aab4f..76bfa062d 100755 --- a/test_regress/t/t_struct_anon.pl +++ b/test_regress/t/t_struct_anon.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_struct_array.pl b/test_regress/t/t_struct_array.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_struct_array.pl +++ b/test_regress/t/t_struct_array.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_init.pl b/test_regress/t/t_struct_init.pl index 4f0058853..c9adf6d32 100755 --- a/test_regress/t/t_struct_init.pl +++ b/test_regress/t/t_struct_init.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_init_bad.pl b/test_regress/t/t_struct_init_bad.pl index 4e56c027f..cb1856bf2 100755 --- a/test_regress/t/t_struct_init_bad.pl +++ b/test_regress/t/t_struct_init_bad.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_struct_init.v"); - -compile ( +compile( v_flags2 => ['+define+T_STRUCT_INIT_BAD'], fails => 1, - expect=> + expect => '%Error: t/t_struct_init.v:\d+: Assignment pattern contains duplicate entry: b1 %Error: Exiting due to.*' ); diff --git a/test_regress/t/t_struct_init_trace.pl b/test_regress/t/t_struct_init_trace.pl index d3c5875b3..972550651 100755 --- a/test_regress/t/t_struct_init_trace.pl +++ b/test_regress/t/t_struct_init_trace.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_struct_init.v"); -compile ( - verilator_flags2 => ['--cc --trace'], - ); +compile( + verilator_flags2 => ['--cc --trace'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_struct_nest.pl b/test_regress/t/t_struct_nest.pl index 1774aab4f..76bfa062d 100755 --- a/test_regress/t/t_struct_nest.pl +++ b/test_regress/t/t_struct_nest.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_struct_notfound_bad.pl b/test_regress/t/t_struct_notfound_bad.pl index 702415cb8..54190c119 100755 --- a/test_regress/t/t_struct_notfound_bad.pl +++ b/test_regress/t/t_struct_notfound_bad.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '%Error: t/t_struct_notfound_bad.v:\d+: Member \'nfmember\' not found in structure %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_struct_packed_sysfunct.pl b/test_regress/t/t_struct_packed_sysfunct.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_struct_packed_sysfunct.pl +++ b/test_regress/t/t_struct_packed_sysfunct.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_struct_packed_value_list.pl b/test_regress/t/t_struct_packed_value_list.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_struct_packed_value_list.pl +++ b/test_regress/t/t_struct_packed_value_list.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_struct_packed_write_read.pl b/test_regress/t/t_struct_packed_write_read.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_struct_packed_write_read.pl +++ b/test_regress/t/t_struct_packed_write_read.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_struct_param.pl b/test_regress/t/t_struct_param.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_struct_param.pl +++ b/test_regress/t/t_struct_param.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_pat_width.pl b/test_regress/t/t_struct_pat_width.pl index 4f0058853..c9adf6d32 100755 --- a/test_regress/t/t_struct_pat_width.pl +++ b/test_regress/t/t_struct_pat_width.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_port.pl b/test_regress/t/t_struct_port.pl index 4f0058853..c9adf6d32 100755 --- a/test_regress/t/t_struct_port.pl +++ b/test_regress/t/t_struct_port.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_portsel.pl b/test_regress/t/t_struct_portsel.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_struct_portsel.pl +++ b/test_regress/t/t_struct_portsel.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_unaligned.pl b/test_regress/t/t_struct_unaligned.pl index 3608a5acd..35849af98 100755 --- a/test_regress/t/t_struct_unaligned.pl +++ b/test_regress/t/t_struct_unaligned.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Note: need to run at a higher optimization level to reproduce the issue $Self->{benchmark} = 1; -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_unpacked.pl b/test_regress/t/t_struct_unpacked.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_struct_unpacked.pl +++ b/test_regress/t/t_struct_unpacked.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_struct_unpacked_bad.pl b/test_regress/t/t_struct_unpacked_bad.pl index 095c3500c..27d15d1fe 100755 --- a/test_regress/t/t_struct_unpacked_bad.pl +++ b/test_regress/t/t_struct_unpacked_bad.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + fails => $Self->{vlt}, + expect => q{%Warning-UNPACKED: t/t_struct_unpacked_bad.v:\d+: Unsupported: Unpacked struct/union %Warning-UNPACKED: Use .* .*%Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_sv_bus_mux_demux.pl b/test_regress/t/t_sv_bus_mux_demux.pl index 43179dd12..b1562d434 100755 --- a/test_regress/t/t_sv_bus_mux_demux.pl +++ b/test_regress/t/t_sv_bus_mux_demux.pl @@ -7,14 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug181"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug181"); -compile ( - ); +compile( + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_sv_conditional.pl b/test_regress/t/t_sv_conditional.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_sv_conditional.pl +++ b/test_regress/t/t_sv_conditional.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_sv_cpu.pl b/test_regress/t/t_sv_cpu.pl index 2d864dc4a..4ffed6304 100755 --- a/test_regress/t/t_sv_cpu.pl +++ b/test_regress/t/t_sv_cpu.pl @@ -7,36 +7,38 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # 22-Mar-2012: Modifications for this test contributed by Jeremy Bennett, # Embecosm. -compile ( +compile( # Taken from the original VCS command line. v_flags2 => ["t/t_sv_cpu_code/timescale.sv", - "t/t_sv_cpu_code/program_h.sv", - "t/t_sv_cpu_code/pads_h.sv", - "t/t_sv_cpu_code/ports_h.sv", - "t/t_sv_cpu_code/pinout_h.sv", - "t/t_sv_cpu_code/genbus_if.sv", - "t/t_sv_cpu_code/pads_if.sv", - "t/t_sv_cpu_code/adrdec.sv", - "t/t_sv_cpu_code/pad_gpio.sv", - "t/t_sv_cpu_code/pad_vdd.sv", - "t/t_sv_cpu_code/pad_gnd.sv", - "t/t_sv_cpu_code/pads.sv", - "t/t_sv_cpu_code/ports.sv", - "t/t_sv_cpu_code/ac_dig.sv", - "t/t_sv_cpu_code/ac_ana.sv", - "t/t_sv_cpu_code/ac.sv", - "t/t_sv_cpu_code/cpu.sv", - "t/t_sv_cpu_code/chip.sv"], + "t/t_sv_cpu_code/program_h.sv", + "t/t_sv_cpu_code/pads_h.sv", + "t/t_sv_cpu_code/ports_h.sv", + "t/t_sv_cpu_code/pinout_h.sv", + "t/t_sv_cpu_code/genbus_if.sv", + "t/t_sv_cpu_code/pads_if.sv", + "t/t_sv_cpu_code/adrdec.sv", + "t/t_sv_cpu_code/pad_gpio.sv", + "t/t_sv_cpu_code/pad_vdd.sv", + "t/t_sv_cpu_code/pad_gnd.sv", + "t/t_sv_cpu_code/pads.sv", + "t/t_sv_cpu_code/ports.sv", + "t/t_sv_cpu_code/ac_dig.sv", + "t/t_sv_cpu_code/ac_ana.sv", + "t/t_sv_cpu_code/ac.sv", + "t/t_sv_cpu_code/cpu.sv", + "t/t_sv_cpu_code/chip.sv"], vcs_flags2 => ["-R -sverilog +memcbk -y t/t_sv_cpu_code +libext+.sv+ +incdir+t/t_sv_cpu_code"], verilator_flags2 => ["-y t/t_sv_cpu_code +libext+.sv+ +incdir+t/t_sv_cpu_code --top-module t"], iv_flags2 => ["-yt/t_sv_cpu_code -It/t_sv_cpu_code -Y.sv"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_sys_file_autoflush.pl b/test_regress/t/t_sys_file_autoflush.pl index aeafbe7e3..db9de3301 100755 --- a/test_regress/t/t_sys_file_autoflush.pl +++ b/test_regress/t/t_sys_file_autoflush.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_sys_file_basic.v"); -compile ( - v_flags2 => ['+incdir+../include', - '+define+AUTOFLUSH'], - verilator_flags2 => ['--autoflush'], - ); +compile( + v_flags2 => ['+incdir+../include', + '+define+AUTOFLUSH'], + verilator_flags2 => ['--autoflush'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_sys_file_basic.pl b/test_regress/t/t_sys_file_basic.pl index 2cc1da6ba..8d31206d5 100755 --- a/test_regress/t/t_sys_file_basic.pl +++ b/test_regress/t/t_sys_file_basic.pl @@ -7,20 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + unlink("$Self->{obj_dir}/t_sys_file_basic_test.log"); -compile ( +compile( v_flags2 => ['+incdir+../include'], # Build without cached objects, see bug363 verilator_flags2 => ["--exe ../$Self->{main_filename}"], - make_flags=>'MAKE_MAIN=0 VM_PARALLEL_BUILDS=0', + make_flags => 'MAKE_MAIN=0 VM_PARALLEL_BUILDS=0', ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -file_grep ("$Self->{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 182e8fa27..13b477d95 100644 --- a/test_regress/t/t_sys_file_basic.v +++ b/test_regress/t/t_sys_file_basic.v @@ -5,6 +5,8 @@ `include "verilated.v" +`define STRINGIFY(x) `"x`" + module t; `verilator_file_descriptor file; @@ -36,10 +38,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/t_sys_file_autoflush.log","w"); + file = $fopen({`STRINGIFY(`TEST_OBJ_DIR),"/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/t_sys_file_basic_test.log","w"); + file = $fopen({`STRINGIFY(`TEST_OBJ_DIR),"/t_sys_file_basic_test.log"},"w"); `endif if ($feof(file)) $stop; @@ -56,7 +58,7 @@ module t; begin // Check for opening errors // The "r" is required so we get a FD not a MFD - file = $fopen("obj_dir/t_sys_file_basic/DOES_NOT_EXIST","r"); + file = $fopen("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 3a610d7c3..037bb339b 100755 --- a/test_regress/t/t_sys_file_scan.pl +++ b/test_regress/t/t_sys_file_scan.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + unlink("$Self->{obj_dir}/t_sys_file_scan_test.log"); -compile ( - ); +compile( + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); -file_grep ("$Self->{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 1bb4ea4a6..30efafadf 100644 --- a/test_regress/t/t_sys_file_scan.v +++ b/test_regress/t/t_sys_file_scan.v @@ -5,13 +5,15 @@ `include "verilated.v" +`define STRINGIFY(x) `"x`" + module t; `verilator_file_descriptor infile, outfile; integer count, a; initial begin infile = $fopen("t/t_sys_file_scan_input.dat", "r"); - outfile = $fopen("obj_dir/t_sys_file_scan/t_sys_file_scan_test.log", "w"); + outfile = $fopen({`STRINGIFY(`TEST_OBJ_DIR),"/t_sys_file_scan_test.log"}, "w"); count = 1234; `ifdef TEST_VERBOSE diff --git a/test_regress/t/t_sys_plusargs.pl b/test_regress/t/t_sys_plusargs.pl index a58e3c1f8..587bd97e3 100755 --- a/test_regress/t/t_sys_plusargs.pl +++ b/test_regress/t/t_sys_plusargs.pl @@ -1,14 +1,22 @@ #!/usr/bin/perl if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. -compile ( - v_flags2 => ['-v', 't/t_flag_libinc.v'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - all_run_flags => ['+PLUS +INT=1234 +STRSTR'], - ); +compile( + v_flags2 => ['-v', 't/t_flag_libinc.v'], + ); + +execute( + check_finished => 1, + all_run_flags => ['+PLUS +INT=1234 +STRSTR'], + ); ok(1); 1; diff --git a/test_regress/t/t_sys_plusargs_bad.pl b/test_regress/t/t_sys_plusargs_bad.pl index 4f0058853..c9adf6d32 100755 --- a/test_regress/t/t_sys_plusargs_bad.pl +++ b/test_regress/t/t_sys_plusargs_bad.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_sys_rand.pl b/test_regress/t/t_sys_rand.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_sys_rand.pl +++ b/test_regress/t/t_sys_rand.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_sys_readmem.pl b/test_regress/t/t_sys_readmem.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_sys_readmem.pl +++ b/test_regress/t/t_sys_readmem.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_sys_readmem_bad_addr.pl b/test_regress/t/t_sys_readmem_bad_addr.pl index ba732c4f1..f2a330eeb 100755 --- a/test_regress/t/t_sys_readmem_bad_addr.pl +++ b/test_regress/t/t_sys_readmem_bad_addr.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - fails=>$Self->{v3}, - expect=> +compile( + ); + +execute( + fails => $Self->{vlt}, + expect => '%Error: t/t_sys_readmem_bad_addr.mem:\d+: \$readmem file address beyond bounds of array', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_sys_readmem_bad_digit.pl b/test_regress/t/t_sys_readmem_bad_digit.pl index 744ac56a1..e9af99d49 100755 --- a/test_regress/t/t_sys_readmem_bad_digit.pl +++ b/test_regress/t/t_sys_readmem_bad_digit.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - fails=>$Self->{v3}, - expect=> +compile( + ); + +execute( + fails => $Self->{vlt}, + expect => '%Error: t/t_sys_readmem_bad_digit.mem:\d+: \$readmemb \(binary\) file contains hex characters', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_sys_readmem_bad_end.pl b/test_regress/t/t_sys_readmem_bad_end.pl index fe6606021..17603bbbf 100755 --- a/test_regress/t/t_sys_readmem_bad_end.pl +++ b/test_regress/t/t_sys_readmem_bad_end.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - fails=>$Self->{v3}, - expect=> +compile( + ); + +execute( + fails => $Self->{vlt}, + expect => '%Error: t/t_sys_readmem_bad_end.mem:\d+: \$readmem file ended before specified ending-address', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_sys_readmem_bad_notfound.pl b/test_regress/t/t_sys_readmem_bad_notfound.pl index 1b9384fca..30677cb48 100755 --- a/test_regress/t/t_sys_readmem_bad_notfound.pl +++ b/test_regress/t/t_sys_readmem_bad_notfound.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - fails=>$Self->{v3}, - expect=> +compile( + ); + +execute( + fails => $Self->{vlt}, + expect => '%Error: t/t_sys_readmem_bad_NOTFOUND.mem:\d+: \$readmem file not found', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_sys_sformat.pl b/test_regress/t/t_sys_sformat.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_sys_sformat.pl +++ b/test_regress/t/t_sys_sformat.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_sys_sformat_noopt.pl b/test_regress/t/t_sys_sformat_noopt.pl index c6d831138..dc7e03f51 100755 --- a/test_regress/t/t_sys_sformat_noopt.pl +++ b/test_regress/t/t_sys_sformat_noopt.pl @@ -7,20 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_sys_sformat.v"); -compile ( +compile( # Avoid inlining our simple example, to make sure verilated.h works right verilator_flags2 => ["-O0"], ); if ($Self->cxx_version =~ /clang version ([0-9]+\.[0-9]+)/ && ($1 >= 3.8 && $1 <= 5.0)) { - $Self->skip("Known clang bug"); + skip("Known clang bug"); #Here: if (VL_UNLIKELY(VL_NEQ_W(12, __Vtemp1, vlSymsp->TOP__t.__PVT__str))) } else{ - execute ( - check_finished=>1, + execute( + check_finished => 1, ); } diff --git a/test_regress/t/t_sys_system.pl b/test_regress/t/t_sys_system.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_sys_system.pl +++ b/test_regress/t/t_sys_system.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_sys_time.pl b/test_regress/t/t_sys_time.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_sys_time.pl +++ b/test_regress/t/t_sys_time.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_sys_writemem.pl b/test_regress/t/t_sys_writemem.pl index 523a44835..29bdb8210 100755 --- a/test_regress/t/t_sys_writemem.pl +++ b/test_regress/t/t_sys_writemem.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_sys_readmem.v"); # Use random reset to ensure we're fully initializing arrays before @@ -22,8 +24,8 @@ compile(v_flags2 => [ "+define+OUT_TMP5=\\\"$Self->{obj_dir}/tmp5.mem\\\"", ]); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); for (my $i = 1; $i <= 5; $i++) { @@ -33,7 +35,7 @@ for (my $i = 1; $i <= 5; $i++) { my @diffs = `diff $gold $out`; if (0 < scalar @diffs) { print @diffs; - $Self->error("Got unexpected diffs against gold."); + error("Got unexpected diffs against gold."); } } diff --git a/test_regress/t/t_table_fsm.pl b/test_regress/t/t_table_fsm.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_table_fsm.pl +++ b/test_regress/t/t_table_fsm.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_threads_counter_0.pl b/test_regress/t/t_threads_counter_0.pl index 3bcf004fd..b7ad02b32 100755 --- a/test_regress/t/t_threads_counter_0.pl +++ b/test_regress/t/t_threads_counter_0.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_threads_counter.v"); -compile ( +compile( verilator_flags2 => ['--cc --no-threads'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_threads_counter_1.pl b/test_regress/t/t_threads_counter_1.pl index 186cc575e..2f4f64743 100755 --- a/test_regress/t/t_threads_counter_1.pl +++ b/test_regress/t/t_threads_counter_1.pl @@ -7,16 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("No thread support") if !$Self->cfg_with_threaded; +scenarios(simulator => 1); +$Self->cfg_with_threaded or skip("No thread support"); top_filename("t/t_threads_counter.v"); -compile ( +compile( verilator_flags2 => ['--cc --threads 1'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_threads_counter_2.pl b/test_regress/t/t_threads_counter_2.pl index 3a7c975fb..e016b8253 100755 --- a/test_regress/t/t_threads_counter_2.pl +++ b/test_regress/t/t_threads_counter_2.pl @@ -7,16 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("No thread support") if !$Self->cfg_with_threaded; +scenarios(simulator => 1); +$Self->cfg_with_threaded or skip("No thread support"); top_filename("t/t_threads_counter.v"); -compile ( +compile( verilator_flags2 => ['--cc --threads 2'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_trace_array.pl b/test_regress/t/t_trace_array.pl index 12e9fb138..09cc25625 100755 --- a/test_regress/t/t_trace_array.pl +++ b/test_regress/t/t_trace_array.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--cc --trace --trace-structs'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); diff --git a/test_regress/t/t_trace_cat.cpp b/test_regress/t/t_trace_cat.cpp index 27978f647..dc8256350 100644 --- a/test_regress/t/t_trace_cat.cpp +++ b/test_regress/t/t_trace_cat.cpp @@ -10,6 +10,9 @@ #include VM_PREFIX_INCLUDE +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + unsigned long long main_time = 0; double sc_time_stamp() { return (double)main_time; @@ -17,15 +20,7 @@ double sc_time_stamp() { const char* trace_name() { static char name[1000]; -#if defined(T_TRACE_CAT) - VL_SNPRINTF(name,1000,"obj_dir/t_trace_cat/simpart_%04d.vcd", (int)main_time); -#elif defined(T_TRACE_CAT_REOPEN) - VL_SNPRINTF(name,1000,"obj_dir/t_trace_cat_reopen/simpart_%04d.vcd", (int)main_time); -#elif defined(T_TRACE_CAT_RENEW) - VL_SNPRINTF(name,1000,"obj_dir/t_trace_cat_renew/simpart_%04d.vcd", (int)main_time); -#else -# error "Unknown test" -#endif + VL_SNPRINTF(name, 1000, STRINGIFY(TEST_OBJ_DIR) "/simpart_%04d.vcd", (int)main_time); return name; } diff --git a/test_regress/t/t_trace_cat.pl b/test_regress/t/t_trace_cat.pl index 272de8c92..8ff497018 100755 --- a/test_regress/t/t_trace_cat.pl +++ b/test_regress/t/t_trace_cat.pl @@ -7,22 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["--trace --exe $Self->{t_dir}/t_trace_cat.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); system("cat $Self->{obj_dir}/simpart*.vcd > $Self->{obj_dir}/simall.vcd"); -vcd_identical ("$Self->{obj_dir}/simall.vcd", - "t/$Self->{name}.out"); +vcd_identical("$Self->{obj_dir}/simall.vcd", + "t/$Self->{name}.out"); ok(1); 1; diff --git a/test_regress/t/t_trace_cat_renew.pl b/test_regress/t/t_trace_cat_renew.pl index a42810232..7ab142802 100755 --- a/test_regress/t/t_trace_cat_renew.pl +++ b/test_regress/t/t_trace_cat_renew.pl @@ -7,24 +7,24 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t_trace_cat.v"); -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["--trace --exe $Self->{t_dir}/t_trace_cat.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -vcd_identical ("$Self->{obj_dir}/simpart_0000.vcd", - "t/$Self->{name}_0000.out"); -vcd_identical ("$Self->{obj_dir}/simpart_0100.vcd", - "t/$Self->{name}_0100.out"); +vcd_identical("$Self->{obj_dir}/simpart_0000.vcd", + "t/$Self->{name}_0000.out"); +vcd_identical("$Self->{obj_dir}/simpart_0100.vcd", + "t/$Self->{name}_0100.out"); ok(1); 1; diff --git a/test_regress/t/t_trace_cat_reopen.pl b/test_regress/t/t_trace_cat_reopen.pl index a42810232..7ab142802 100755 --- a/test_regress/t/t_trace_cat_reopen.pl +++ b/test_regress/t/t_trace_cat_reopen.pl @@ -7,24 +7,24 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t_trace_cat.v"); -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["--trace --exe $Self->{t_dir}/t_trace_cat.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -vcd_identical ("$Self->{obj_dir}/simpart_0000.vcd", - "t/$Self->{name}_0000.out"); -vcd_identical ("$Self->{obj_dir}/simpart_0100.vcd", - "t/$Self->{name}_0100.out"); +vcd_identical("$Self->{obj_dir}/simpart_0000.vcd", + "t/$Self->{name}_0000.out"); +vcd_identical("$Self->{obj_dir}/simpart_0100.vcd", + "t/$Self->{name}_0100.out"); ok(1); 1; diff --git a/test_regress/t/t_trace_complex.pl b/test_regress/t/t_trace_complex.pl index 1e6cacc6c..fa1699b30 100755 --- a/test_regress/t/t_trace_complex.pl +++ b/test_regress/t/t_trace_complex.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ['--cc --trace'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + verilator_flags2 => ['--cc --trace'], + ); + +execute( + check_finished => 1, + ); file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); diff --git a/test_regress/t/t_trace_complex_params.pl b/test_regress/t/t_trace_complex_params.pl index 5979d34ff..48a06b82e 100755 --- a/test_regress/t/t_trace_complex_params.pl +++ b/test_regress/t/t_trace_complex_params.pl @@ -7,19 +7,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t_trace_complex.v"); -compile ( - verilator_flags2 => ['--cc --trace --no-trace-structs --trace-params'], - ); +compile( + verilator_flags2 => ['--cc --trace --no-trace-structs --trace-params'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); file_grep ("$Self->{obj_dir}/simx.vcd", qr/ PARAM /); -vcd_identical ("$Self->{obj_dir}/simx.vcd", "t/$Self->{name}.out"); +vcd_identical("$Self->{obj_dir}/simx.vcd", "t/$Self->{name}.out"); ok(1); 1; diff --git a/test_regress/t/t_trace_complex_structs.pl b/test_regress/t/t_trace_complex_structs.pl index cf1ca30c9..7f0530dca 100755 --- a/test_regress/t/t_trace_complex_structs.pl +++ b/test_regress/t/t_trace_complex_structs.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t_trace_complex.v"); -compile ( - verilator_flags2 => ['--cc --trace --trace-structs --no-trace-params'], - ); +compile( + verilator_flags2 => ['--cc --trace --trace-structs --no-trace-params'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp /); file_grep ("$Self->{obj_dir}/simx.vcd", qr/ v_strp_strp /); diff --git a/test_regress/t/t_trace_decoration.pl b/test_regress/t/t_trace_decoration.pl index e8744e81d..f63f24f0a 100755 --- a/test_regress/t/t_trace_decoration.pl +++ b/test_regress/t/t_trace_decoration.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--cc --trace --no-decoration'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); file_grep_not ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr!// Body!x); diff --git a/test_regress/t/t_trace_ena_cc.pl b/test_regress/t/t_trace_ena_cc.pl index 899c1c275..c26fdb7fe 100755 --- a/test_regress/t/t_trace_ena_cc.pl +++ b/test_regress/t/t_trace_ena_cc.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_trace_ena.v"); -compile ( +compile( verilator_flags2 => ['-trace'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); if ($Self->{vlt}) { diff --git a/test_regress/t/t_trace_ena_sc.pl b/test_regress/t/t_trace_ena_sc.pl index 4f5d30882..d05bb369b 100755 --- a/test_regress/t/t_trace_ena_sc.pl +++ b/test_regress/t/t_trace_ena_sc.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + if (!$Self->have_sc) { - $Self->skip("No SystemC installed"); + skip("No SystemC installed"); } else { top_filename("t/t_trace_ena.v"); - compile ( + compile( verilator_flags2 => ['-trace -sc'], ); - execute ( - check_finished=>1, + execute( + check_finished => 1, ); if ($Self->{vlt}) { diff --git a/test_regress/t/t_trace_off_cc.pl b/test_regress/t/t_trace_off_cc.pl index da3f35561..33c430ccb 100755 --- a/test_regress/t/t_trace_off_cc.pl +++ b/test_regress/t/t_trace_off_cc.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_trace_ena.v"); -compile ( - verilator_flags2 => ['-notrace'], - ); +compile( + verilator_flags2 => ['-notrace'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); if ($Self->{vlt}) { - !-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n"); + !-r "$Self->{obj_dir}/simx.vcd" or 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 009dadb33..e1865f560 100755 --- a/test_regress/t/t_trace_off_sc.pl +++ b/test_regress/t/t_trace_off_sc.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_trace_ena.v"); -compile ( - verilator_flags2 => ['-notrace -sc'], - ); +compile( + verilator_flags2 => ['-notrace -sc'], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); if ($Self->{vlt}) { - !-r "$Self->{obj_dir}/simx.vcd" or $Self->error("Tracing should be off\n"); + !-r "$Self->{obj_dir}/simx.vcd" or error("Tracing should be off\n"); } ok(1); diff --git a/test_regress/t/t_trace_packed_struct.pl b/test_regress/t/t_trace_packed_struct.pl index f1d1f6c41..a25a14034 100755 --- a/test_regress/t/t_trace_packed_struct.pl +++ b/test_regress/t/t_trace_packed_struct.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--trace"] ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_trace_param.pl b/test_regress/t/t_trace_param.pl index abf8ed786..527cc3283 100755 --- a/test_regress/t/t_trace_param.pl +++ b/test_regress/t/t_trace_param.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--trace"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_trace_primitive.pl b/test_regress/t/t_trace_primitive.pl index 17dfb5e3d..ad5c14ca8 100755 --- a/test_regress/t/t_trace_primitive.pl +++ b/test_regress/t/t_trace_primitive.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--trace"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); if ($Self->{vlt}) { - file_grep ("$Self->{obj_dir}/simx.vcd", "sub_t_i"); + file_grep("$Self->{obj_dir}/simx.vcd", "sub_t_i"); }; ok(1); diff --git a/test_regress/t/t_trace_public_func.cpp b/test_regress/t/t_trace_public_func.cpp index a69bbca8d..e47283715 100644 --- a/test_regress/t/t_trace_public_func.cpp +++ b/test_regress/t/t_trace_public_func.cpp @@ -12,6 +12,9 @@ #include "Vt_trace_public_func_t.h" #include "Vt_trace_public_func_glbl.h" +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + unsigned long long main_time = 0; double sc_time_stamp() { return (double)main_time; @@ -27,7 +30,7 @@ int main(int argc, char **argv, char **env) { VerilatedVcdC* tfp = new VerilatedVcdC; top->trace(tfp,99); - tfp->open("obj_dir/t_trace_public_func/simx.vcd"); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/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 d9d882a3c..a8fa99330 100755 --- a/test_regress/t/t_trace_public_func.pl +++ b/test_regress/t/t_trace_public_func.pl @@ -7,22 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_trace_public.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["-DPUB_FUNC --trace --exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -vcd_identical ("$Self->{obj_dir}/simx.vcd", - "t/t_trace_public.out"); +vcd_identical("$Self->{obj_dir}/simx.vcd", + "t/t_trace_public.out"); ok(1); 1; diff --git a/test_regress/t/t_trace_public_sig.cpp b/test_regress/t/t_trace_public_sig.cpp index 03283a514..2a437729a 100644 --- a/test_regress/t/t_trace_public_sig.cpp +++ b/test_regress/t/t_trace_public_sig.cpp @@ -12,6 +12,9 @@ #include "Vt_trace_public_sig_t.h" #include "Vt_trace_public_sig_glbl.h" +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + unsigned long long main_time = 0; double sc_time_stamp() { return (double)main_time; @@ -27,7 +30,7 @@ int main(int argc, char **argv, char **env) { VerilatedVcdC* tfp = new VerilatedVcdC; top->trace(tfp,99); - tfp->open("obj_dir/t_trace_public_sig/simx.vcd"); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/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 45eace968..7d69b207c 100755 --- a/test_regress/t/t_trace_public_sig.pl +++ b/test_regress/t/t_trace_public_sig.pl @@ -7,25 +7,25 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_trace_public.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["--trace --exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -vcd_identical ("$Self->{obj_dir}/simx.vcd", - "t/t_trace_public.out"); +vcd_identical("$Self->{obj_dir}/simx.vcd", + "t/t_trace_public.out"); # vcd_identical doesn't detect "$var a.b;" vs "$scope module a; $var b;" -file_grep ("$Self->{obj_dir}/simx.vcd", qr/module glbl/i); +file_grep("$Self->{obj_dir}/simx.vcd", qr/module glbl/i); ok(1); 1; diff --git a/test_regress/t/t_trace_scstruct.pl b/test_regress/t/t_trace_scstruct.pl index 9c08b40ef..51382a932 100755 --- a/test_regress/t/t_trace_scstruct.pl +++ b/test_regress/t/t_trace_scstruct.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--sc --trace --trace-structs --pins-bv 2'], ); -#execute (); # didn't bother with top shell +#execute(); # didn't bother with top shell ok(1); 1; diff --git a/test_regress/t/t_trace_timescale.cpp b/test_regress/t/t_trace_timescale.cpp index 284a8515a..d1bddcd38 100644 --- a/test_regress/t/t_trace_timescale.cpp +++ b/test_regress/t/t_trace_timescale.cpp @@ -10,6 +10,9 @@ #include VM_PREFIX_INCLUDE +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + unsigned long long main_time = 0; double sc_time_stamp() { return ((double)main_time) / VL_TIME_MULTIPLIER; @@ -27,7 +30,7 @@ int main(int argc, char **argv, char **env) { top->trace(tfp,99); - tfp->open("obj_dir/t_trace_timescale/t_trace_timescale.vcd"); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/simx.vcd"); top->clk = 0; diff --git a/test_regress/t/t_trace_timescale.pl b/test_regress/t/t_trace_timescale.pl index 0b2f13c0a..6d186b276 100755 --- a/test_regress/t/t_trace_timescale.pl +++ b/test_regress/t/t_trace_timescale.pl @@ -7,21 +7,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( make_top_shell => 0, make_main => 0, v_flags2 => ["--trace --exe $Self->{t_dir}/t_trace_timescale.cpp"], make_flags => 'CPPFLAGS_ADD=-DVL_TIME_MULTIPLIER=1000', ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); -vcd_identical ("$Self->{obj_dir}/$Self->{name}.vcd", - "t/$Self->{name}.out"); +vcd_identical("$Self->{obj_dir}/simx.vcd", + "t/$Self->{name}.out"); ok(1); 1; diff --git a/test_regress/t/t_tri_array.pl b/test_regress/t/t_tri_array.pl index cc522f7b4..3dc957163 100755 --- a/test_regress/t/t_tri_array.pl +++ b/test_regress/t/t_tri_array.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -# When fix, update ifdefs in t_sv_cpu files; search for t_tri_array -$Self->{vlt} and $Self->unsupported("Verilator unsupported, tristate arrays"); +scenarios(simulator => 1); -compile ( +# When fix, update ifdefs in t_sv_cpu files; search for t_tri_array +$Self->{vlt} and unsupported("Verilator unsupported, tristate arrays"); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_array_bufif.pl b/test_regress/t/t_tri_array_bufif.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_tri_array_bufif.pl +++ b/test_regress/t/t_tri_array_bufif.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_tri_array_pull.pl b/test_regress/t/t_tri_array_pull.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_tri_array_pull.pl +++ b/test_regress/t/t_tri_array_pull.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_dangle.pl b/test_regress/t/t_tri_dangle.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_tri_dangle.pl +++ b/test_regress/t/t_tri_dangle.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_tri_eqcase.pl b/test_regress/t/t_tri_eqcase.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_tri_eqcase.pl +++ b/test_regress/t/t_tri_eqcase.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_tri_gate_bufif0.pl b/test_regress/t/t_tri_gate_bufif0.pl index d3b38fe3d..f7f617e73 100755 --- a/test_regress/t/t_tri_gate_bufif0.pl +++ b/test_regress/t/t_tri_gate_bufif0.pl @@ -7,20 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_tri_gate.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ['+define+T_BUFIF0',], - make_flags => 'CPPFLAGS_ADD=-DT_BUFIF0', - verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ['+define+T_BUFIF0',], + make_flags => 'CPPFLAGS_ADD=-DT_BUFIF0', + verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_gate_bufif1.pl b/test_regress/t/t_tri_gate_bufif1.pl index 45e566012..1e1ba6013 100755 --- a/test_regress/t/t_tri_gate_bufif1.pl +++ b/test_regress/t/t_tri_gate_bufif1.pl @@ -1,5 +1,4 @@ #!/usr/bin/perl -if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } # DESCRIPTION: Verilator: Verilog Test driver/expect definition # # Copyright 2003-2009 by Wilson Snyder. This program is free software; you can @@ -7,20 +6,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_tri_gate.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ['+define+T_BUFIF1',], - make_flags => 'CPPFLAGS_ADD=-DT_BUFIF1', - verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ['+define+T_BUFIF1',], + make_flags => 'CPPFLAGS_ADD=-DT_BUFIF1', + verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_gate_cond.pl b/test_regress/t/t_tri_gate_cond.pl index a86dc81a2..41695b762 100755 --- a/test_regress/t/t_tri_gate_cond.pl +++ b/test_regress/t/t_tri_gate_cond.pl @@ -7,20 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_tri_gate.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ['+define+T_COND',], - make_flags => 'CPPFLAGS_ADD=-DT_COND', - verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ['+define+T_COND',], + make_flags => 'CPPFLAGS_ADD=-DT_COND', + verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_gate_nmos.pl b/test_regress/t/t_tri_gate_nmos.pl index ea2b89c32..024edd03e 100755 --- a/test_regress/t/t_tri_gate_nmos.pl +++ b/test_regress/t/t_tri_gate_nmos.pl @@ -7,20 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_tri_gate.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ['+define+T_NMOS',], - make_flags => 'CPPFLAGS_ADD=-DT_NMOS', - verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ['+define+T_NMOS',], + make_flags => 'CPPFLAGS_ADD=-DT_NMOS', + verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_gate_notif0.pl b/test_regress/t/t_tri_gate_notif0.pl index 531f9bdf0..d0bd5f0ec 100755 --- a/test_regress/t/t_tri_gate_notif0.pl +++ b/test_regress/t/t_tri_gate_notif0.pl @@ -7,20 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_tri_gate.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ['+define+T_NOTIF0',], - make_flags => 'CPPFLAGS_ADD=-DT_NOTIF0', - verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ['+define+T_NOTIF0',], + make_flags => 'CPPFLAGS_ADD=-DT_NOTIF0', + verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_gate_notif1.pl b/test_regress/t/t_tri_gate_notif1.pl index 88bbc13d5..ba4d5997e 100755 --- a/test_regress/t/t_tri_gate_notif1.pl +++ b/test_regress/t/t_tri_gate_notif1.pl @@ -7,20 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_tri_gate.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ['+define+T_NOTIF1',], - make_flags => 'CPPFLAGS_ADD=-DT_NOTIF1', - verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ['+define+T_NOTIF1',], + make_flags => 'CPPFLAGS_ADD=-DT_NOTIF1', + verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_gate_pmos.pl b/test_regress/t/t_tri_gate_pmos.pl index f61945fae..5cc799f74 100755 --- a/test_regress/t/t_tri_gate_pmos.pl +++ b/test_regress/t/t_tri_gate_pmos.pl @@ -7,20 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_tri_gate.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - make_top_shell => 0, - make_main => 0, - v_flags2 => ['+define+T_PMOS',], - make_flags => 'CPPFLAGS_ADD=-DT_PMOS', - verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + v_flags2 => ['+define+T_PMOS',], + make_flags => 'CPPFLAGS_ADD=-DT_PMOS', + verilator_flags2 => ["--exe $Self->{t_dir}/t_tri_gate.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_gen.pl b/test_regress/t/t_tri_gen.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_tri_gen.pl +++ b/test_regress/t/t_tri_gen.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_tri_graph.pl b/test_regress/t/t_tri_graph.pl index 3d2231550..6312119ef 100755 --- a/test_regress/t/t_tri_graph.pl +++ b/test_regress/t/t_tri_graph.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Compile only test -compile ( +compile( ); ok(1); diff --git a/test_regress/t/t_tri_ifbegin.pl b/test_regress/t/t_tri_ifbegin.pl index fb2f3bf0c..96d9ccfa3 100755 --- a/test_regress/t/t_tri_ifbegin.pl +++ b/test_regress/t/t_tri_ifbegin.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); # No exeecution diff --git a/test_regress/t/t_tri_inout.pl b/test_regress/t/t_tri_inout.pl index e1b68002f..6c781245e 100755 --- a/test_regress/t/t_tri_inout.pl +++ b/test_regress/t/t_tri_inout.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_inout2.pl b/test_regress/t/t_tri_inout2.pl index cdae47250..9904360ae 100755 --- a/test_regress/t/t_tri_inout2.pl +++ b/test_regress/t/t_tri_inout2.pl @@ -6,12 +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. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_tri_inz.pl b/test_regress/t/t_tri_inz.pl index be0af3f3d..e50597b5e 100755 --- a/test_regress/t/t_tri_inz.pl +++ b/test_regress/t/t_tri_inz.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( make_top_shell => 0, make_main => 0, verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_public.pl b/test_regress/t/t_tri_public.pl index 3d2231550..6312119ef 100755 --- a/test_regress/t/t_tri_public.pl +++ b/test_regress/t/t_tri_public.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Compile only test -compile ( +compile( ); ok(1); diff --git a/test_regress/t/t_tri_pull01.pl b/test_regress/t/t_tri_pull01.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_tri_pull01.pl +++ b/test_regress/t/t_tri_pull01.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_tri_pull2_bad.pl b/test_regress/t/t_tri_pull2_bad.pl index 185d1b763..c2de1b6e9 100755 --- a/test_regress/t/t_tri_pull2_bad.pl +++ b/test_regress/t/t_tri_pull2_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + fails => $Self->{vlt}, + expect => '%Error: t/t_tri_pull2_bad.v:\d+: Unsupported: Conflicting pull directions. %Error: t/t_tri_pull2_bad.v:\d+: ... Location of conflicting pull. %Error: Exiting due to', diff --git a/test_regress/t/t_tri_pull_bad.pl b/test_regress/t/t_tri_pull_bad.pl index f1244c602..1e7247324 100755 --- a/test_regress/t/t_tri_pull_bad.pl +++ b/test_regress/t/t_tri_pull_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + fails => $Self->{vlt}, + expect => '%Error: t/t_tri_pull_bad.v:\d+: Unsupported: Conflicting pull directions. %Error: t/t_tri_pull_bad.v:\d+: ... Location of conflicting pull. %Error: Exiting due to', diff --git a/test_regress/t/t_tri_pullup.pl b/test_regress/t/t_tri_pullup.pl index e1b68002f..6c781245e 100755 --- a/test_regress/t/t_tri_pullup.pl +++ b/test_regress/t/t_tri_pullup.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_pullvec_bad.pl b/test_regress/t/t_tri_pullvec_bad.pl index 8c2848e04..ebc9922ca 100755 --- a/test_regress/t/t_tri_pullvec_bad.pl +++ b/test_regress/t/t_tri_pullvec_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( +compile( v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> + fails => $Self->{vlt}, + expect => '%Error: t/t_tri_pullvec_bad.v:\d+: Unsupported: Conflicting pull directions. %Error: t/t_tri_pullvec_bad.v:\d+: ... Location of conflicting pull. %Error: t/t_tri_pullvec_bad.v:\d+: Unsupported: Conflicting pull directions. diff --git a/test_regress/t/t_tri_select.pl b/test_regress/t/t_tri_select.pl index e1b68002f..6c781245e 100755 --- a/test_regress/t/t_tri_select.pl +++ b/test_regress/t/t_tri_select.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_select_unsized.pl b/test_regress/t/t_tri_select_unsized.pl index 2051c3122..bbe51465d 100755 --- a/test_regress/t/t_tri_select_unsized.pl +++ b/test_regress/t/t_tri_select_unsized.pl @@ -7,8 +7,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + # Compile only test -compile ( +compile( verilator_flags2 => ["-Wno-WIDTH"], ); diff --git a/test_regress/t/t_tri_unconn.pl b/test_regress/t/t_tri_unconn.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_tri_unconn.pl +++ b/test_regress/t/t_tri_unconn.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_tri_various.pl b/test_regress/t/t_tri_various.pl index db0de10ee..1be18a66c 100755 --- a/test_regress/t/t_tri_various.pl +++ b/test_regress/t/t_tri_various.pl @@ -1,12 +1,20 @@ #!/usr/bin/perl if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003-2009 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_typedef.pl b/test_regress/t/t_typedef.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_typedef.pl +++ b/test_regress/t/t_typedef.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_typedef_array.pl b/test_regress/t/t_typedef_array.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_typedef_array.pl +++ b/test_regress/t/t_typedef_array.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_typedef_param.pl b/test_regress/t/t_typedef_param.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_typedef_param.pl +++ b/test_regress/t/t_typedef_param.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_typedef_port.pl b/test_regress/t/t_typedef_port.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_typedef_port.pl +++ b/test_regress/t/t_typedef_port.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_typedef_signed.pl b/test_regress/t/t_typedef_signed.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_typedef_signed.pl +++ b/test_regress/t/t_typedef_signed.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_udp_bad.pl b/test_regress/t/t_udp_bad.pl index 49c258096..cf7375ce5 100755 --- a/test_regress/t/t_udp_bad.pl +++ b/test_regress/t/t_udp_bad.pl @@ -7,17 +7,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_udp.v"); -compile ( - fails=>$Self->{vlt}, - expect=> +compile( + fails => $Self->{vlt}, + expect => '%Error: t/t_udp.v:\d+: Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables. %Error: Exiting due to ' - ); + ); -execute ( - ) if !$Self->{vlt}; +execute( + ) if !$Self->{vlt}; ok(1); 1; diff --git a/test_regress/t/t_udp_lint.pl b/test_regress/t/t_udp_lint.pl index 718e795a3..38f3852a1 100755 --- a/test_regress/t/t_udp_lint.pl +++ b/test_regress/t/t_udp_lint.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_udp.v"); -compile ( +compile( # Unsupported: UDP Tables make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_udp_noname.pl b/test_regress/t/t_udp_noname.pl index e6cf2a5b4..e1cea4cf7 100755 --- a/test_regress/t/t_udp_noname.pl +++ b/test_regress/t/t_udp_noname.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug468"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug468"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_uniqueif.pl b/test_regress/t/t_uniqueif.pl index 4eada89db..f97a8c4aa 100755 --- a/test_regress/t/t_uniqueif.pl +++ b/test_regress/t/t_uniqueif.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['--assert'], nc_flags2 => ['+assert'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_uniqueif_fail1.pl b/test_regress/t/t_uniqueif_fail1.pl index 19b745598..5f05d5e83 100755 --- a/test_regress/t/t_uniqueif_fail1.pl +++ b/test_regress/t/t_uniqueif_fail1.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_uniqueif.v"); -compile ( +compile( v_flags2 => ['+define+FAILING_ASSERTION1'], verilator_flags2 => ['--assert'], nc_flags2 => ['+assert'], fails => $Self->{nc}, ); -execute ( +execute( fails => $Self->{vlt}, - expect=> + expect => '.*%Error: t_uniqueif.v:\d+: Assertion failed in top.t: \'unique if\' statement violated %Error: t/t_uniqueif.v:\d+: Verilog \$stop .*', diff --git a/test_regress/t/t_uniqueif_fail2.pl b/test_regress/t/t_uniqueif_fail2.pl index a534ca47b..621a91162 100755 --- a/test_regress/t/t_uniqueif_fail2.pl +++ b/test_regress/t/t_uniqueif_fail2.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_uniqueif.v"); -compile ( +compile( v_flags2 => ['+define+FAILING_ASSERTION2'], verilator_flags2 => ['--assert'], nc_flags2 => ['+assert'], fails => $Self->{nc}, ); -execute ( +execute( fails => $Self->{vlt}, - expect=> + expect => '.*%Error: t_uniqueif.v:\d+: Assertion failed in top.t: \'unique if\' statement violated %Error: t/t_uniqueif.v:\d+: Verilog \$stop .*', diff --git a/test_regress/t/t_uniqueif_fail3.pl b/test_regress/t/t_uniqueif_fail3.pl index 43d8b0194..aa60344b8 100755 --- a/test_regress/t/t_uniqueif_fail3.pl +++ b/test_regress/t/t_uniqueif_fail3.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_uniqueif.v"); -compile ( +compile( v_flags2 => ['+define+FAILING_ASSERTION3'], verilator_flags2 => ['--assert'], nc_flags2 => ['+assert'], fails => $Self->{nc}, ); -execute ( +execute( fails => $Self->{vlt}, - expect=> + expect => '.*%Error: t_uniqueif.v:\d+: Assertion failed in top.t: \'unique if\' statement violated %Error: t/t_uniqueif.v:\d+: Verilog \$stop .*', diff --git a/test_regress/t/t_uniqueif_fail4.pl b/test_regress/t/t_uniqueif_fail4.pl index 29170b282..e6aa8eaa2 100755 --- a/test_regress/t/t_uniqueif_fail4.pl +++ b/test_regress/t/t_uniqueif_fail4.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_uniqueif.v"); -compile ( +compile( v_flags2 => ['+define+FAILING_ASSERTION4'], verilator_flags2 => ['--assert'], nc_flags2 => ['+assert'], fails => $Self->{nc}, ); -execute ( +execute( fails => $Self->{vlt}, - expect=> + expect => '.*%Error: t_uniqueif.v:\d+: Assertion failed in top.t: \'unique if\' statement violated %Error: t/t_uniqueif.v:\d+: Verilog \$stop .*', diff --git a/test_regress/t/t_unopt_array.pl b/test_regress/t/t_unopt_array.pl index d4d101b66..e9c629464 100755 --- a/test_regress/t/t_unopt_array.pl +++ b/test_regress/t/t_unopt_array.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2=>["-Wno-UNOPTFLAT"], ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_unopt_array_csplit.pl b/test_regress/t/t_unopt_array_csplit.pl index 42beadc2b..27ec9551f 100755 --- a/test_regress/t/t_unopt_array_csplit.pl +++ b/test_regress/t/t_unopt_array_csplit.pl @@ -7,15 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_unopt_array.v"); -compile ( +compile( v_flags2 => ["--trace --output-split 1 --output-split-cfuncs 1 -Wno-UNOPTFLAT"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_unopt_bound.pl b/test_regress/t/t_unopt_bound.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_unopt_bound.pl +++ b/test_regress/t/t_unopt_bound.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_unopt_combo.pl b/test_regress/t/t_unopt_combo.pl index 9da774c63..d8968a2c2 100755 --- a/test_regress/t/t_unopt_combo.pl +++ b/test_regress/t/t_unopt_combo.pl @@ -7,13 +7,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ['+define+ALLOW_UNOPT'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + v_flags2 => ['+define+ALLOW_UNOPT'], + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_unopt_combo_bad.pl b/test_regress/t/t_unopt_combo_bad.pl index a5a4c3e20..d1bd76527 100755 --- a/test_regress/t/t_unopt_combo_bad.pl +++ b/test_regress/t/t_unopt_combo_bad.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unopt_combo.v"); -compile ( - fails=>$Self->{vlt}, - expect=> +compile( + fails => $Self->{vlt}, + expect => '%Warning-UNOPTFLAT: t/t_unopt_combo.v:\d+: Signal unoptimizable: Feedback to clock or circular logic: t.c %Warning-UNOPTFLAT: Use "/\* verilator lint_off UNOPTFLAT \*/" and lint_on around source to disable this message. %Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: t.c @@ -20,10 +22,10 @@ compile ( %Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: ALWAYS %Warning-UNOPTFLAT: Example path: t/t_unopt_combo.v:\d+: t.c %Error: Exiting due to ' - ); + ); -execute ( - ) if !$Self->{vlt}; +execute( + ) if !$Self->{vlt}; ok(1); 1; diff --git a/test_regress/t/t_unopt_combo_isolate.pl b/test_regress/t/t_unopt_combo_isolate.pl index dd4b17130..1279cfb42 100755 --- a/test_regress/t/t_unopt_combo_isolate.pl +++ b/test_regress/t/t_unopt_combo_isolate.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unopt_combo.v"); -compile ( - verilator_flags2 => ['+define+ISOLATE --stats'], - ); +compile( + verilator_flags2 => ['+define+ISOLATE --stats'], + ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, isolate_assignments blocks\s+5/i); + file_grep($Self->{stats}, qr/Optimizations, isolate_assignments blocks\s+5/i); } -execute ( - ); +execute( + ); ok(1); 1; diff --git a/test_regress/t/t_unopt_converge_initial_run_bad.pl b/test_regress/t/t_unopt_converge_initial_run_bad.pl index 497906511..b6ce226bf 100755 --- a/test_regress/t/t_unopt_converge_initial_run_bad.pl +++ b/test_regress/t/t_unopt_converge_initial_run_bad.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unopt_converge_initial.v"); -compile ( +compile( v_flags2 => ['+define+ALLOW_UNOPT'], ); -execute ( - fails=>1, - expect=> '%Error: \S+:\d+: Verilated model didn\'t DC converge', +execute( + fails => 1, + expect => '%Error: \S+:\d+: Verilated model didn\'t DC converge', ) if $Self->{vlt}; ok(1); diff --git a/test_regress/t/t_unopt_converge_print_bad.pl b/test_regress/t/t_unopt_converge_print_bad.pl index 95340a4e7..98597ca0b 100755 --- a/test_regress/t/t_unopt_converge_print_bad.pl +++ b/test_regress/t/t_unopt_converge_print_bad.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unopt_converge.v"); #$Self->{verilated_debug} = 1; -compile ( - v_flags2 => ['+define+ALLOW_UNOPT'], - make_flags => 'CPPFLAGS_ADD=-DVL_DEBUG', - ); +compile( + v_flags2 => ['+define+ALLOW_UNOPT'], + make_flags => 'CPPFLAGS_ADD=-DVL_DEBUG', + ); -execute ( - fails=>1, - expect=> '%Error: \S+:\d+: Verilated model didn\'t converge', - ) if $Self->{vlt}; +execute( + fails => 1, + expect => '%Error: \S+:\d+: Verilated model didn\'t converge', + ) if $Self->{vlt}; 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 2fa20cfd1..380c08025 100755 --- a/test_regress/t/t_unopt_converge_run_bad.pl +++ b/test_regress/t/t_unopt_converge_run_bad.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unopt_converge.v"); -compile ( - v_flags2 => ['+define+ALLOW_UNOPT'], - ); +compile( + v_flags2 => ['+define+ALLOW_UNOPT'], + ); -execute ( - fails=>1, - expect=> '%Error: \S+:\d+: Verilated model didn\'t converge', - ) if $Self->{vlt}; +execute( + fails => 1, + expect => '%Error: \S+:\d+: Verilated model didn\'t converge', + ) if $Self->{vlt}; 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 916ac4713..517b15153 100755 --- a/test_regress/t/t_unopt_converge_unopt_bad.pl +++ b/test_regress/t/t_unopt_converge_unopt_bad.pl @@ -7,16 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + top_filename("t/t_unopt_converge.v"); -$Self->{vlt} or $Self->skip("Verilator only test"); - -compile ( - fails=>1, - expect=> '%Warning-UNOPT: t/t_unopt_converge.v:\d+: Signal unoptimizable: Feedback to public clock or circular logic: x +compile( + fails => 1, + expect => '%Warning-UNOPT: t/t_unopt_converge.v:\d+: Signal unoptimizable: Feedback to public clock or circular logic: x .* %Error: Exiting due to ' - ); + ); ok(1); 1; diff --git a/test_regress/t/t_unoptflat_simple_2_bad.pl b/test_regress/t/t_unoptflat_simple_2_bad.pl index e3db81c7e..6323be90f 100755 --- a/test_regress/t/t_unoptflat_simple_2_bad.pl +++ b/test_regress/t/t_unoptflat_simple_2_bad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unoptflat_simple_2.v"); # Compile only -compile ( +compile( verilator_flags3 => [], verilator_flags2 => ["--report-unoptflat"], fails => 1, - expect=> + expect => '.*%Warning-UNOPTFLAT: Widest candidate vars to split: %Warning-UNOPTFLAT: t/t_unoptflat_simple_2.v:\d+: t.x, width 3, fanout \d+ .*%Error: Exiting due to ', diff --git a/test_regress/t/t_unoptflat_simple_3_bad.pl b/test_regress/t/t_unoptflat_simple_3_bad.pl index 0c2bf1c5c..a16bb204b 100755 --- a/test_regress/t/t_unoptflat_simple_3_bad.pl +++ b/test_regress/t/t_unoptflat_simple_3_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unoptflat_simple_3.v"); # Compile only -compile ( +compile( fails => 1 ); diff --git a/test_regress/t/t_unoptflat_simple_bad.pl b/test_regress/t/t_unoptflat_simple_bad.pl index ab27f0d1b..179c80e5a 100755 --- a/test_regress/t/t_unoptflat_simple_bad.pl +++ b/test_regress/t/t_unoptflat_simple_bad.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_unoptflat_simple.v"); # Compile only -compile ( +compile( fails => 1 ); diff --git a/test_regress/t/t_unpacked_array_order.pl b/test_regress/t/t_unpacked_array_order.pl index 814a9a3bb..89a4e77d9 100755 --- a/test_regress/t/t_unpacked_array_order.pl +++ b/test_regress/t/t_unpacked_array_order.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( -); +scenarios(simulator => 1); -execute ( - check_finished=>1, -); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_unroll_complexcond.pl b/test_regress/t/t_unroll_complexcond.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_unroll_complexcond.pl +++ b/test_regress/t/t_unroll_complexcond.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_unroll_forfor.pl b/test_regress/t/t_unroll_forfor.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_unroll_forfor.pl +++ b/test_regress/t/t_unroll_forfor.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_unroll_genf.pl b/test_regress/t/t_unroll_genf.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_unroll_genf.pl +++ b/test_regress/t/t_unroll_genf.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_unroll_signed.pl b/test_regress/t/t_unroll_signed.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_unroll_signed.pl +++ b/test_regress/t/t_unroll_signed.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_vams_basic.pl b/test_regress/t/t_vams_basic.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_vams_basic.pl +++ b/test_regress/t/t_vams_basic.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_vams_wreal.pl b/test_regress/t/t_vams_wreal.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_vams_wreal.pl +++ b/test_regress/t/t_vams_wreal.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_assign_landr.pl b/test_regress/t/t_var_assign_landr.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_var_assign_landr.pl +++ b/test_regress/t/t_var_assign_landr.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_var_bad_hide.pl b/test_regress/t/t_var_bad_hide.pl index f6b7ad616..731d091d7 100755 --- a/test_regress/t/t_var_bad_hide.pl +++ b/test_regress/t/t_var_bad_hide.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only -Wwarn-VARHIDDEN"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only -Wwarn-VARHIDDEN"], + fails => $Self->{vlt}, + expect => '%Warning-VARHIDDEN: t/t_var_bad_hide.v:\d+: Declaration of signal hides declaration in upper scope: top .* %Warning-VARHIDDEN: t/t_var_bad_hide.v:\d+: ... Location of original declaration %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_bad_hide2.pl b/test_regress/t/t_var_bad_hide2.pl index 737577c6c..5c8578c4b 100755 --- a/test_regress/t/t_var_bad_hide2.pl +++ b/test_regress/t/t_var_bad_hide2.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only -Wwarn-VARHIDDEN"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only -Wwarn-VARHIDDEN"], + fails => $Self->{vlt}, + expect => '%Warning-VARHIDDEN: t/t_var_bad_hide2.v:\d+: Declaration of signal hides declaration in upper scope: t %Warning-VARHIDDEN: t/t_var_bad_hide2.v:\d+: ... Location of original declaration .* %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_bad_sameas.pl b/test_regress/t/t_var_bad_sameas.pl index bc2f9d763..474386b36 100755 --- a/test_regress/t/t_var_bad_sameas.pl +++ b/test_regress/t/t_var_bad_sameas.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '%Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Cell has the same name as variable: varfirst %Error: t/t_var_bad_sameas.v:\d+: ... Location of original declaration %Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Task has the same name as (variable|cell): varfirst @@ -21,7 +23,7 @@ compile ( %Error: t/t_var_bad_sameas.v:\d+: Unsupported in C: Cell has the same name as task: taskfirst %Error: t/t_var_bad_sameas.v:\d+: ... Location of original declaration %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_bad_sv.pl b/test_regress/t/t_var_bad_sv.pl index 36ad3a1b5..d9fc51154 100755 --- a/test_regress/t/t_var_bad_sv.pl +++ b/test_regress/t/t_var_bad_sv.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - v_flags2 => ["--lint-only"], - fails=>$Self->{v3}, - expect=> +scenarios(simulator => 1); + +compile( + v_flags2 => ["--lint-only"], + fails => $Self->{vlt}, + expect => '%Error: t/t_var_bad_sv.v:\d+: Unexpected "do": "do" is a SystemVerilog keyword misused as an identifier. %Error: t/t_var_bad_sv.v:\d+: Modify the Verilog-2001 code to avoid SV keywords, or use `begin_keywords or --language. %Error: t/t_var_bad_sv.v:\d+: Unexpected "do": "do" is a SystemVerilog keyword misused as an identifier. .* %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_const.pl b/test_regress/t/t_var_const.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_var_const.pl +++ b/test_regress/t/t_var_const.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_const_bad.pl b/test_regress/t/t_var_const_bad.pl index 9441b355c..0dc969173 100755 --- a/test_regress/t/t_var_const_bad.pl +++ b/test_regress/t/t_var_const_bad.pl @@ -7,12 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["--lint-only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only"], + fails => 1, + expect => '%Error: t/t_var_const_bad.v:\d+: Assigning to const variable: five %Error: Exiting due to.*', ); diff --git a/test_regress/t/t_var_dotted_inl0.pl b/test_regress/t/t_var_dotted_inl0.pl index fb835d676..73474fc47 100755 --- a/test_regress/t/t_var_dotted_inl0.pl +++ b/test_regress/t/t_var_dotted_inl0.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_var_dotted.v"); -compile ( - v_flags2 => ['+define+NOUSE_INLINE',], - ); +compile( + v_flags2 => ['+define+NOUSE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_dotted_inl1.pl b/test_regress/t/t_var_dotted_inl1.pl index 285dd50b6..2dca3e9a2 100755 --- a/test_regress/t/t_var_dotted_inl1.pl +++ b/test_regress/t/t_var_dotted_inl1.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_var_dotted.v"); -compile ( - v_flags2 => ['+define+USE_INLINE',], - ); +compile( + v_flags2 => ['+define+USE_INLINE',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_dotted_inl2.pl b/test_regress/t/t_var_dotted_inl2.pl index 10221950a..9d713d5ee 100755 --- a/test_regress/t/t_var_dotted_inl2.pl +++ b/test_regress/t/t_var_dotted_inl2.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_var_dotted.v"); -compile ( - v_flags2 => ['+define+USE_INLINE_MID',], - ); +compile( + v_flags2 => ['+define+USE_INLINE_MID',], + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_escape.pl b/test_regress/t/t_var_escape.pl index 40047aea4..0c36855e8 100755 --- a/test_regress/t/t_var_escape.pl +++ b/test_regress/t/t_var_escape.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - # Access is so we can dump waves - v_flags2 => [$Self->{v3}?'-trace':' +access+rwc'], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + # Access is so we can dump waves + v_flags2 => [$Self->{vlt}?'-trace':' +access+rwc'], + ); + +execute( + check_finished => 1, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x); @@ -23,7 +25,7 @@ if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/simx.vcd", qr/ other\.cyc /); file_grep ("$Self->{obj_dir}/simx.vcd", qr/ module mod\.with_dot /); vcd_identical ("$Self->{obj_dir}/simx.vcd", - "t/$Self->{name}.out"); + "t/$Self->{name}.out"); } ok(1); diff --git a/test_regress/t/t_var_in_assign.pl b/test_regress/t/t_var_in_assign.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_var_in_assign.pl +++ b/test_regress/t/t_var_in_assign.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_in_assign_bad.pl b/test_regress/t/t_var_in_assign_bad.pl index f57fc8450..798ea257b 100755 --- a/test_regress/t/t_var_in_assign_bad.pl +++ b/test_regress/t/t_var_in_assign_bad.pl @@ -7,17 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); -compile ( - v_flags2 => ["--lint-only --Mdir obj_lint_only"], - fails=>1, - expect=> +compile( + v_flags2 => ["--lint-only --Mdir obj_lint_only"], + fails => 1, + expect => '%Error-ASSIGNIN: t/t_var_in_assign_bad.v:\d+: Assigning to input variable: value %Error-ASSIGNIN: t/t_var_in_assign_bad.v:\d+: Assigning to input variable: valueSub %Error: Exiting due to.*', ); -(!-d "obj_lint_only") or $Self->error("%Error: lint-only shouldn't make output directory"); +(!-d "obj_lint_only") or error("%Error: lint-only shouldn't make output directory"); ok(1); 1; diff --git a/test_regress/t/t_var_init.pl b/test_regress/t/t_var_init.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_var_init.pl +++ b/test_regress/t/t_var_init.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_life.pl b/test_regress/t/t_var_life.pl index 47d4211f0..8e4600cdd 100755 --- a/test_regress/t/t_var_life.pl +++ b/test_regress/t/t_var_life.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2 => ["--stats"], - ); +scenarios(simulator => 1); + +compile( + verilator_flags2 => ["--stats"], + ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, Lifetime assign deletions\s+(\d+)/i, 4); - file_grep ($Self->{stats}, qr/Optimizations, Lifetime constant prop\s+(\d+)/i, 2); + file_grep($Self->{stats}, qr/Optimizations, Lifetime assign deletions\s+(\d+)/i, 4); + file_grep($Self->{stats}, qr/Optimizations, Lifetime constant prop\s+(\d+)/i, 2); } -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_local.pl b/test_regress/t/t_var_local.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_var_local.pl +++ b/test_regress/t/t_var_local.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_nonamebegin.pl b/test_regress/t/t_var_nonamebegin.pl index fea02309b..1c424c79c 100755 --- a/test_regress/t/t_var_nonamebegin.pl +++ b/test_regress/t/t_var_nonamebegin.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ['-trace'], ); -execute ( - expect=>quotemeta( +execute( + expect => quotemeta( 'ingen: {mod}.genblk1 top.t.genblk1 d3a: {mod}.d3nameda top.t.d3nameda b2: {mod} top.t @@ -25,8 +27,8 @@ t2 {mod}.tsk top.t ); if ($Self->{vlt}) { - vcd_identical ("$Self->{obj_dir}/simx.vcd", - "t/$Self->{name}.out"); + vcd_identical("$Self->{obj_dir}/simx.vcd", + "t/$Self->{name}.out"); } ok(1); 1; diff --git a/test_regress/t/t_var_notfound_bad.pl b/test_regress/t/t_var_notfound_bad.pl index fb793da88..458a8d8e5 100755 --- a/test_regress/t/t_var_notfound_bad.pl +++ b/test_regress/t/t_var_notfound_bad.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '%Error: t/t_var_notfound_bad.v:\d+: Can\'t find definition of variable: nf %Error: t/t_var_notfound_bad.v:\d+: Can\'t find definition of \'subsubz\' in dotted scope/variable: sub.subsubz %Error: Known scopes under \'sub\': subsub @@ -17,7 +19,7 @@ compile ( %Error: t/t_var_notfound_bad.v:\d+: Can\'t find definition of task/function: notask %Error: t/t_var_notfound_bad.v:\d+: Found definition of \'a_var\' as a VAR but expected a task/function %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_outoforder.pl b/test_regress/t/t_var_outoforder.pl index 29bf04d49..b1acebe26 100755 --- a/test_regress/t/t_var_outoforder.pl +++ b/test_regress/t/t_var_outoforder.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_overcmp.pl b/test_regress/t/t_var_overcmp.pl index f91289753..89a4e77d9 100755 --- a/test_regress/t/t_var_overcmp.pl +++ b/test_regress/t/t_var_overcmp.pl @@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_var_overwidth_bad.pl b/test_regress/t/t_var_overwidth_bad.pl index 16a1b18c2..ae65608f2 100755 --- a/test_regress/t/t_var_overwidth_bad.pl +++ b/test_regress/t/t_var_overwidth_bad.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( make_main => 0, verilator_flags2 => ["--exe $Self->{t_dir}/t_var_overwidth_bad.cpp"], ); -execute ( - fails=>1, - expect=> +execute( + fails => 1, + expect => qr{%Error: unknown:0: Testbench C set input 'clk' to value that overflows what the signal's width can fit Aborting....*} ); diff --git a/test_regress/t/t_var_overzero.pl b/test_regress/t/t_var_overzero.pl index 067f038a8..8477d8386 100755 --- a/test_regress/t/t_var_overzero.pl +++ b/test_regress/t/t_var_overzero.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--x-initial fast"], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_var_pins_cc.pl b/test_regress/t/t_var_pins_cc.pl index f37155e78..2ec1c5ae7 100755 --- a/test_regress/t/t_var_pins_cc.pl +++ b/test_regress/t/t_var_pins_cc.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ['-cc'], - verilator_make_gcc => 0, - ); +compile( + verilator_flags2 => ['-cc'], + verilator_make_gcc => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/Vt_var_pins_cc.h", qr/VL_IN8 \(i1,0,0\);/x); diff --git a/test_regress/t/t_var_pins_sc1.pl b/test_regress/t/t_var_pins_sc1.pl index cd42fa7d9..cd4079487 100755 --- a/test_regress/t/t_var_pins_sc1.pl +++ b/test_regress/t/t_var_pins_sc1.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc -pins-bv 1 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc -pins-bv 1 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in\s> \s+ i1;/x); diff --git a/test_regress/t/t_var_pins_sc2.pl b/test_regress/t/t_var_pins_sc2.pl index 9846c7174..a7091e0dd 100755 --- a/test_regress/t/t_var_pins_sc2.pl +++ b/test_regress/t/t_var_pins_sc2.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc -pins-bv 2 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc -pins-bv 2 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in \s+ i1;/x); diff --git a/test_regress/t/t_var_pins_sc32.pl b/test_regress/t/t_var_pins_sc32.pl index 92976f474..4f1338a3c 100755 --- a/test_regress/t/t_var_pins_sc32.pl +++ b/test_regress/t/t_var_pins_sc32.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc -no-pins64 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc -no-pins64 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in \s+ i1;/x); diff --git a/test_regress/t/t_var_pins_sc64.pl b/test_regress/t/t_var_pins_sc64.pl index f5d06e70f..401e56be1 100755 --- a/test_regress/t/t_var_pins_sc64.pl +++ b/test_regress/t/t_var_pins_sc64.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc -pins64 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc -pins64 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in \s+ i1;/x); diff --git a/test_regress/t/t_var_pins_sc_biguint.pl b/test_regress/t/t_var_pins_sc_biguint.pl index 439abd874..5313eac05 100755 --- a/test_regress/t/t_var_pins_sc_biguint.pl +++ b/test_regress/t/t_var_pins_sc_biguint.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc --pins-sc-biguint --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc --pins-sc-biguint --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in \s+ i1;/x); diff --git a/test_regress/t/t_var_pins_sc_uint.pl b/test_regress/t/t_var_pins_sc_uint.pl index 9c8146733..8646cd9f1 100755 --- a/test_regress/t/t_var_pins_sc_uint.pl +++ b/test_regress/t/t_var_pins_sc_uint.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc --pins-sc-uint --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc --pins-sc-uint --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in \s+ i1;/x); diff --git a/test_regress/t/t_var_pins_sc_uint_biguint.pl b/test_regress/t/t_var_pins_sc_uint_biguint.pl index 258f3ba44..39b2455a2 100755 --- a/test_regress/t/t_var_pins_sc_uint_biguint.pl +++ b/test_regress/t/t_var_pins_sc_uint_biguint.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc --pins-sc-uint --pins-sc-biguint --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc --pins-sc-uint --pins-sc-biguint --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in \s+ i1;/x); diff --git a/test_regress/t/t_var_pins_scui.pl b/test_regress/t/t_var_pins_scui.pl index 3c5408585..46fc561ed 100755 --- a/test_regress/t/t_var_pins_scui.pl +++ b/test_regress/t/t_var_pins_scui.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt_all => 1); top_filename("t/t_var_pinsizes.v"); -compile ( - verilator_flags2 => ["-sc -pins-uint8 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], - make_main => 0, - ); +compile( + verilator_flags2 => ["-sc -pins-uint8 --trace --exe $Self->{t_dir}/t_var_pinsizes.cpp"], + make_main => 0, + ); if ($Self->{vlt}) { file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}.h", qr/sc_in \s+ i1;/x); diff --git a/test_regress/t/t_var_port_bad.pl b/test_regress/t/t_var_port_bad.pl index 9be596e69..e9f3c1e38 100755 --- a/test_regress/t/t_var_port_bad.pl +++ b/test_regress/t/t_var_port_bad.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - fails=>1, - expect=> +scenarios(simulator => 1); + +compile( + fails => 1, + expect => '%Error: t/t_var_port_bad.v:\d+: Input/output/inout does not appear in port list: b %Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_rsvd.pl b/test_regress/t/t_var_rsvd.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_var_rsvd.pl +++ b/test_regress/t/t_var_rsvd.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_rsvd_bad.pl b/test_regress/t/t_var_rsvd_bad.pl index 4f318565c..6a2e4a9fb 100755 --- a/test_regress/t/t_var_rsvd_bad.pl +++ b/test_regress/t/t_var_rsvd_bad.pl @@ -7,16 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + top_filename("t/t_var_rsvd_port.v"); -compile ( - fails=>$Self->{v3}, - expect=> +compile( + fails => $Self->{vlt}, + expect => q{%Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ keyword: 'bool' .* %Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ keyword: 'switch' %Error: Exiting due to.*}, - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_rsvd_port.pl b/test_regress/t/t_var_rsvd_port.pl index 187aefc1a..816372e7e 100755 --- a/test_regress/t/t_var_rsvd_port.pl +++ b/test_regress/t/t_var_rsvd_port.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - verilator_flags2=>["-Wno-SYMRSVDWORD"], - ); +scenarios(simulator => 1); + +compile( + verilator_flags2=>["-Wno-SYMRSVDWORD"], + ); execute(); diff --git a/test_regress/t/t_var_set_link.pl b/test_regress/t/t_var_set_link.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_var_set_link.pl +++ b/test_regress/t/t_var_set_link.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_static.pl b/test_regress/t/t_var_static.pl index 823ae5c9b..73c135498 100755 --- a/test_regress/t/t_var_static.pl +++ b/test_regress/t/t_var_static.pl @@ -7,13 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug546"); +scenarios(simulator => 1); +$Self->{vlt} and unsupported("Verilator unsupported, bug546"); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_var_tieout.pl b/test_regress/t/t_var_tieout.pl index 7058e622f..89a4e77d9 100755 --- a/test_regress/t/t_var_tieout.pl +++ b/test_regress/t/t_var_tieout.pl @@ -7,12 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - ); +scenarios(simulator => 1); -execute ( - check_finished=>1, - ); +compile( + ); + +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_types.pl b/test_regress/t/t_var_types.pl index 3deae9536..2ac96a92f 100755 --- a/test_regress/t/t_var_types.pl +++ b/test_regress/t/t_var_types.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{verilated_randReset} = 1; # allow checking if we initialize vars to zero only when needed -compile ( - ); +compile( + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_var_types_bad.pl b/test_regress/t/t_var_types_bad.pl index 795407c97..fb26beffd 100755 --- a/test_regress/t/t_var_types_bad.pl +++ b/test_regress/t/t_var_types_bad.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{verilated_randReset} = 1; # allow checking if we initialize vars to zero only when needed -compile ( - fails=>1, - expect=> +compile( + fails => 1, + expect => '%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is bit .*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic .*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is logic .*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is real .*%Error: t/t_var_types_bad.v:\d+: Illegal bit or array select; type does not have a bit range, or bad dimension: type is real .*%Error: Exiting due to.*', - ); + ); ok(1); 1; diff --git a/test_regress/t/t_var_vec_sel.pl b/test_regress/t/t_var_vec_sel.pl index 10dc9a1ff..0a3119351 100755 --- a/test_regress/t/t_var_vec_sel.pl +++ b/test_regress/t/t_var_vec_sel.pl @@ -7,9 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( v_flags2 => ["--lint-only"], - fails=>0, + fails => 0, verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_var_xref_gen.pl b/test_regress/t/t_var_xref_gen.pl index d0b997efb..1f7906aae 100755 --- a/test_regress/t/t_var_xref_gen.pl +++ b/test_regress/t/t_var_xref_gen.pl @@ -7,7 +7,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( verilator_flags2 => ["--debug-check"], ); diff --git a/test_regress/t/t_verilated_all.pl b/test_regress/t/t_verilated_all.pl index 5799c25a2..1e4721eb0 100755 --- a/test_regress/t/t_verilated_all.pl +++ b/test_regress/t/t_verilated_all.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + my $root = ".."; -compile ( +compile( # Can't use --coverage and --savable together, so cheat and compile inline verilator_flags2 => ['--cc --coverage-toggle --coverage-line --coverage-user --trace --vpi $root/include/verilated_save.cpp'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); my %hit; @@ -36,7 +38,7 @@ foreach my $dfile (glob("$Self->{obj_dir}/*.d")) { foreach my $file (sort keys %hit) { if (!$hit{$file} && $file !~ /_sc/) { - $Self->error("Include file not covered by t_verilated_all test: ",$file); + error("Include file not covered by t_verilated_all test: ",$file); } } diff --git a/test_regress/t/t_verilated_all_newest.pl b/test_regress/t/t_verilated_all_newest.pl index 6e4f5eb51..a763d7ab2 100755 --- a/test_regress/t/t_verilated_all_newest.pl +++ b/test_regress/t/t_verilated_all_newest.pl @@ -7,18 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt => 1); + top_filename("t/t_verilated_all.v"); my $root = ".."; -compile ( +compile( # Can't use --coverage and --savable together, so cheat and compile inline verilator_flags2 => ['--cc --coverage-toggle --coverage-line --coverage-user --trace --vpi $root/include/verilated_save.cpp'], make_flags => 'DRIVER_STD=newest', ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_verilated_all_oldest.pl b/test_regress/t/t_verilated_all_oldest.pl index 4a539d114..131f80c6f 100755 --- a/test_regress/t/t_verilated_all_oldest.pl +++ b/test_regress/t/t_verilated_all_oldest.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(dist => 1); + # This test now does nothing, because using DRIVER_STD=oldest tends to blow up glibc. ok(1); diff --git a/test_regress/t/t_verilated_debug.pl b/test_regress/t/t_verilated_debug.pl index c364d3809..508e62ae0 100755 --- a/test_regress/t/t_verilated_debug.pl +++ b/test_regress/t/t_verilated_debug.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(vlt_all => 1); + $Self->{verilated_debug} = 1; -compile ( +compile( verilator_flags2 => [], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(files_identical("$Self->{obj_dir}/vlt_sim.log", "t/$Self->{name}.out")); diff --git a/test_regress/t/t_verilated_threaded.pl b/test_regress/t/t_verilated_threaded.pl index c6585d885..a61548dbc 100755 --- a/test_regress/t/t_verilated_threaded.pl +++ b/test_regress/t/t_verilated_threaded.pl @@ -7,19 +7,20 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("No thread support") if !$Self->cfg_with_threaded; +scenarios(simulator => 1); +$Self->cfg_with_threaded or skip("No thread support"); top_filename("t/t_verilated_all.v"); my $root = ".."; -compile ( +compile( # Can't use --coverage and --savable together, so cheat and compile inline verilator_flags2 => ['--cc --coverage-toggle --coverage-line --coverage-user --trace --threads 1 --vpi $root/include/verilated_save.cpp'], ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_vgen.pl b/test_regress/t/t_vgen.pl index 0ef1423e5..6ebbec5f2 100755 --- a/test_regress/t/t_vgen.pl +++ b/test_regress/t/t_vgen.pl @@ -7,20 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -if (eval "use Bit::Vector; return 2;" != 2) { $Self->error("Please install Bit::Vector"); } +scenarios(simulator => 1); + +if (eval "use Bit::Vector; return 2;" != 2) { error("Please install Bit::Vector"); } top_filename("$Self->{obj_dir}/vgen.v"); -$Self->run(cmd=>["./vgen.pl", - "-o $Self->{top_filename}", - #"--seed 0", +run(cmd => ["./vgen.pl", + "-o $Self->{top_filename}", + #"--seed 0", ]); -compile ( +compile( ); -execute ( - check_finished=>1, +execute( + check_finished => 1, ); ok(1); diff --git a/test_regress/t/t_vlcov_merge.pl b/test_regress/t/t_vlcov_merge.pl index da25bdd87..6a0e57121 100755 --- a/test_regress/t/t_vlcov_merge.pl +++ b/test_regress/t/t_vlcov_merge.pl @@ -7,24 +7,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(dist => 1); -$Self->run(cmd=>["../bin/verilator_coverage", - "--write", "$Self->{obj_dir}/coverage.dat", - "t/t_vlcov_data_a.dat", - "t/t_vlcov_data_b.dat", - "t/t_vlcov_data_c.dat", - "t/t_vlcov_data_d.dat", - ], - ); +run(cmd => ["../bin/verilator_coverage", + "--write", "$Self->{obj_dir}/coverage.dat", + "t/t_vlcov_data_a.dat", + "t/t_vlcov_data_b.dat", + "t/t_vlcov_data_c.dat", + "t/t_vlcov_data_d.dat", + ]); # Older clib's didn't properly sort maps, but the coverage data doesn't # really care about ordering. So avoid false failures by sorting. -$Self->run(cmd=>["sort", - "$Self->{obj_dir}/coverage.dat", - "> $Self->{obj_dir}/coverage-sort.dat", - ], - ); +run(cmd => ["sort", + "$Self->{obj_dir}/coverage.dat", + "> $Self->{obj_dir}/coverage-sort.dat", + ]); ok(files_identical("$Self->{obj_dir}/coverage-sort.dat", "t/$Self->{name}.out")); 1; diff --git a/test_regress/t/t_vlcov_rank.pl b/test_regress/t/t_vlcov_rank.pl index c013fddab..9f5eefe72 100755 --- a/test_regress/t/t_vlcov_rank.pl +++ b/test_regress/t/t_vlcov_rank.pl @@ -7,17 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(dist => 1); -$Self->run(cmd=>["../bin/verilator_coverage", - "--rank", - "t/t_vlcov_data_a.dat", - "t/t_vlcov_data_b.dat", - "t/t_vlcov_data_c.dat", - "t/t_vlcov_data_d.dat", - ], - logfile=>"$Self->{obj_dir}/vlcov.log", - tee => 0, +run(cmd => ["../bin/verilator_coverage", + "--rank", + "t/t_vlcov_data_a.dat", + "t/t_vlcov_data_b.dat", + "t/t_vlcov_data_c.dat", + "t/t_vlcov_data_d.dat", + ], + logfile => "$Self->{obj_dir}/vlcov.log", + tee => 0, ); + ok(files_identical("$Self->{obj_dir}/vlcov.log", "t/$Self->{name}.out")); 1; diff --git a/test_regress/t/t_vlcov_rewrite.pl b/test_regress/t/t_vlcov_rewrite.pl index 4e175473b..d636c45a4 100755 --- a/test_regress/t/t_vlcov_rewrite.pl +++ b/test_regress/t/t_vlcov_rewrite.pl @@ -7,18 +7,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(dist => 1); foreach my $basename ("t_vlcov_data_a.dat", - "t_vlcov_data_b.dat", - "t_vlcov_data_c.dat", - "t_vlcov_data_d.dat", + "t_vlcov_data_b.dat", + "t_vlcov_data_c.dat", + "t_vlcov_data_d.dat", ) { - $Self->run(cmd=>["../bin/verilator_coverage", - "t/${basename}", - "--write", "$Self->{obj_dir}/${basename}" - ], - tee=>0, + run(cmd => ["../bin/verilator_coverage", + "t/${basename}", + "--write", "$Self->{obj_dir}/${basename}" + ], + tee => 0, ); ok(files_identical("$Self->{obj_dir}/${basename}", "t/${basename}")); } diff --git a/test_regress/t/t_vlt_warn.pl b/test_regress/t/t_vlt_warn.pl index df822d44f..0888801bc 100755 --- a/test_regress/t/t_vlt_warn.pl +++ b/test_regress/t/t_vlt_warn.pl @@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Verilator only test") if !$Self->{vlt}; +scenarios(vlt => 1); -compile ( - make_top_shell => 0, - make_main => 0, - verilator_make_gcc => 0, - v_flags2 => ["--lint-only t/t_vlt_warn.vlt"], - ); +compile( + make_top_shell => 0, + make_main => 0, + verilator_make_gcc => 0, + v_flags2 => ["--lint-only t/t_vlt_warn.vlt"], + ); ok(1); 1; diff --git a/test_regress/t/t_vpi_get.cpp b/test_regress/t/t_vpi_get.cpp index e862d321d..4cd41d87a 100644 --- a/test_regress/t/t_vpi_get.cpp +++ b/test_regress/t/t_vpi_get.cpp @@ -46,6 +46,9 @@ using namespace std; unsigned int main_time = false; +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + //====================================================================== #define CHECK_RESULT_VH(got, exp) \ @@ -248,8 +251,8 @@ int main(int argc, char **argv, char **env) { Verilated::traceEverOn(true); VL_PRINTF("Enabling waves...\n"); VerilatedVcdC* tfp = new VerilatedVcdC; - topp->trace (tfp, 99); - tfp->open ("obj_dir/t_vpi_var/simx.vcd"); + topp->trace(tfp, 99); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/simx.vcd"); #endif topp->eval(); diff --git a/test_regress/t/t_vpi_get.pl b/test_regress/t/t_vpi_get.pl index 195facc86..893ef732c 100755 --- a/test_regress/t/t_vpi_get.pl +++ b/test_regress/t/t_vpi_get.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Known compiler limitation") +scenarios(simulator => 1); + +skip("Known compiler limitation") if $Self->cxx_version =~ /\(GCC\) 4.4/; -compile ( +compile( make_top_shell => 0, make_main => 0, verilator_flags2 => ["-CFLAGS '-DVL_DEBUG -ggdb' --exe --vpi --no-l2name $Self->{t_dir}/t_vpi_get.cpp"], @@ -19,9 +21,9 @@ compile ( v_flags2 => ["+define+USE_VPI_NOT_DPI"], ); -execute ( +execute( iv_pli => 1, - check_finished=>1 + check_finished => 1 ); ok(1); diff --git a/test_regress/t/t_vpi_memory.cpp b/test_regress/t/t_vpi_memory.cpp index a6277a5b7..fe7ed580f 100644 --- a/test_regress/t/t_vpi_memory.cpp +++ b/test_regress/t/t_vpi_memory.cpp @@ -46,6 +46,9 @@ using namespace std; unsigned int main_time = false; +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + //====================================================================== #define CHECK_RESULT_VH(got, exp) \ @@ -231,8 +234,8 @@ int main(int argc, char **argv, char **env) { Verilated::traceEverOn(true); VL_PRINTF("Enabling waves...\n"); VerilatedVcdC* tfp = new VerilatedVcdC; - topp->trace (tfp, 99); - tfp->open ("obj_dir/t_vpi_var/simx.vcd"); + topp->trace(tfp, 99); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/simx.vcd"); #endif topp->eval(); diff --git a/test_regress/t/t_vpi_memory.pl b/test_regress/t/t_vpi_memory.pl index 6042b3b7d..4e1d4d3e6 100755 --- a/test_regress/t/t_vpi_memory.pl +++ b/test_regress/t/t_vpi_memory.pl @@ -7,10 +7,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->skip("Known compiler limitation") +scenarios(simulator => 1); + +skip("Known compiler limitation") if $Self->cxx_version =~ /\(GCC\) 4.4/; -compile ( +compile( make_top_shell => 0, make_main => 0, make_pli => 1, @@ -19,9 +21,9 @@ compile ( verilator_flags2 => ["-CFLAGS '-DVL_DEBUG -ggdb' --exe --vpi --no-l2name $Self->{t_dir}/t_vpi_memory.cpp"], ); -execute ( +execute( iv_pli => 1, - check_finished=>1 + check_finished => 1 ); ok(1); diff --git a/test_regress/t/t_vpi_sc.pl b/test_regress/t/t_vpi_sc.pl index 13d5edfd0..bc9248d9f 100755 --- a/test_regress/t/t_vpi_sc.pl +++ b/test_regress/t/t_vpi_sc.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( +scenarios(simulator => 1); + +compile( # Must not make shell/main or hides bug make_top_shell => 0, make_main => 0, verilator_flags2 => ["--exe --vpi --sc $Self->{t_dir}/t_vpi_sc.cpp"], ); -execute ( - check_finished=>1 +execute( + check_finished => 1 ); ok(1); diff --git a/test_regress/t/t_vpi_unimpl.cpp b/test_regress/t/t_vpi_unimpl.cpp index 15c05eee9..8e19d6ef3 100644 --- a/test_regress/t/t_vpi_unimpl.cpp +++ b/test_regress/t/t_vpi_unimpl.cpp @@ -34,6 +34,9 @@ unsigned int main_time = false; unsigned int callback_count = false; +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + //====================================================================== #define CHECK_RESULT_VH(got, exp) \ @@ -162,8 +165,8 @@ int main(int argc, char **argv, char **env) { Verilated::traceEverOn(true); VL_PRINTF("Enabling waves...\n"); VerilatedVcdC* tfp = new VerilatedVcdC; - topp->trace (tfp, 99); - tfp->open ("obj_dir/t_vpi_var/simx.vcd"); + topp->trace(tfp, 99); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/simx.vcd"); #endif topp->eval(); diff --git a/test_regress/t/t_vpi_unimpl.pl b/test_regress/t/t_vpi_unimpl.pl index 78c55b76d..0b01888b4 100755 --- a/test_regress/t/t_vpi_unimpl.pl +++ b/test_regress/t/t_vpi_unimpl.pl @@ -7,15 +7,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - make_top_shell => 0, - make_main => 0, - verilator_flags2 => ["-CFLAGS '-DVL_DEBUG -ggdb' --exe --vpi --no-l2name $Self->{t_dir}/t_vpi_unimpl.cpp"], - ); +scenarios(simulator => 1); -execute ( - check_finished=>1 - ); +compile( + make_top_shell => 0, + make_main => 0, + verilator_flags2 => ["-CFLAGS '-DVL_DEBUG -ggdb' --exe --vpi --no-l2name $Self->{t_dir}/t_vpi_unimpl.cpp"], + ); + +execute( + check_finished => 1 + ); ok(1); 1; diff --git a/test_regress/t/t_vpi_var.cpp b/test_regress/t/t_vpi_var.cpp index 2b28a1d35..dd87ddcae 100644 --- a/test_regress/t/t_vpi_var.cpp +++ b/test_regress/t/t_vpi_var.cpp @@ -91,11 +91,14 @@ unsigned int callback_count_strs_max = 500; #define CHECK_RESULT_CSTR_STRIP(got, exp) \ CHECK_RESULT_CSTR(got+strspn(got, " "), exp) +#define STRINGIFY(x) STRINGIFY2(x) +#define STRINGIFY2(x) #x + int _mon_check_mcd() { PLI_INT32 status; PLI_UINT32 mcd; - PLI_BYTE8* filename = (PLI_BYTE8*)"obj_dir/t_vpi_var/mcd_open.tmp"; + PLI_BYTE8* filename = (PLI_BYTE8*)(STRINGIFY(TEST_OBJ_DIR) "/mcd_open.tmp"); mcd = vpi_mcd_open(filename); CHECK_RESULT_NZ(mcd); @@ -622,8 +625,8 @@ int main(int argc, char **argv, char **env) { Verilated::traceEverOn(true); VL_PRINTF("Enabling waves...\n"); VerilatedVcdC* tfp = new VerilatedVcdC; - topp->trace (tfp, 99); - tfp->open ("obj_dir/t_vpi_var/simx.vcd"); + topp->trace(tfp, 99); + tfp->open(STRINGIFY(TEST_OBJ_DIR) "/simx.vcd"); #endif topp->eval(); diff --git a/test_regress/t/t_vpi_var.pl b/test_regress/t/t_vpi_var.pl index 750bced9a..48387ade3 100755 --- a/test_regress/t/t_vpi_var.pl +++ b/test_regress/t/t_vpi_var.pl @@ -7,21 +7,23 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -compile ( - make_top_shell => 0, - make_main => 0, - make_pli => 1, - sim_time => 2100, - iv_flags2 => ["-g2005-sv -D USE_VPI_NOT_DPI -DWAVES"], - v_flags2 => ["+define+USE_VPI_NOT_DPI"], - verilator_flags2 => ["-CFLAGS '-DVL_DEBUG -ggdb' --exe --vpi --no-l2name $Self->{t_dir}/t_vpi_var.cpp"], - ); +scenarios(simulator => 1); -execute ( - iv_pli => 1, - check_finished=>1, - all_run_flags => ['+PLUS +INT=1234 +STRSTR'] - ); +compile( + make_top_shell => 0, + make_main => 0, + make_pli => 1, + sim_time => 2100, + iv_flags2 => ["-g2005-sv -D USE_VPI_NOT_DPI -DWAVES"], + v_flags2 => ["+define+USE_VPI_NOT_DPI"], + verilator_flags2 => ["-CFLAGS '-DVL_DEBUG -ggdb' --exe --vpi --no-l2name $Self->{t_dir}/t_vpi_var.cpp"], + ); + +execute( + iv_pli => 1, + check_finished => 1, + all_run_flags => ['+PLUS +INT=1234 +STRSTR'] + ); ok(1); 1; diff --git a/test_regress/t/t_wire_types.pl b/test_regress/t/t_wire_types.pl index 3deae9536..2ac96a92f 100755 --- a/test_regress/t/t_wire_types.pl +++ b/test_regress/t/t_wire_types.pl @@ -7,14 +7,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +scenarios(simulator => 1); + $Self->{verilated_randReset} = 1; # allow checking if we initialize vars to zero only when needed -compile ( - ); +compile( + ); -execute ( - check_finished=>1, - ); +execute( + check_finished => 1, + ); ok(1); 1; diff --git a/test_regress/t/t_xml_first.out b/test_regress/t/t_xml_first.out index a8c29db29..76575f0ca 100644 --- a/test_regress/t/t_xml_first.out +++ b/test_regress/t/t_xml_first.out @@ -4,67 +4,68 @@ + - + - - - - - - - - + + + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - - - - - - + + + + + + + + - - - + + + - - - - - - - + + + + + + + - - + + diff --git a/test_regress/t/t_xml_first.pl b/test_regress/t/t_xml_first.pl index a544448e5..8d800ff69 100755 --- a/test_regress/t/t_xml_first.pl +++ b/test_regress/t/t_xml_first.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); my $out_filename = "$Self->{obj_dir}/V$Self->{name}.xml"; -compile ( +compile( verilator_flags2 => ['--xml-only'], verilator_make_gcc => 0, ); diff --git a/test_regress/t/t_xml_tag.out b/test_regress/t/t_xml_tag.out index 0edec2e4a..8ab36d6b3 100644 --- a/test_regress/t/t_xml_tag.out +++ b/test_regress/t/t_xml_tag.out @@ -4,38 +4,39 @@ + - + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - + diff --git a/test_regress/t/t_xml_tag.pl b/test_regress/t/t_xml_tag.pl index 31b7a1d91..58526cc8e 100755 --- a/test_regress/t/t_xml_tag.pl +++ b/test_regress/t/t_xml_tag.pl @@ -7,11 +7,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. -$Self->{vlt} or $Self->skip("Verilator only test"); +scenarios(vlt => 1); my $out_filename = "$Self->{obj_dir}/V$Self->{name}.xml"; -compile ( +compile( verilator_flags2 => ['--xml-only'], verilator_make_gcc => 0, );