diff --git a/nodist/invoke_atsim b/nodist/invoke_atsim new file mode 100755 index 000000000..3abcdced9 --- /dev/null +++ b/nodist/invoke_atsim @@ -0,0 +1,59 @@ +#!/usr/bin/perl -w +# See copyright, etc in below POD section. +###################################################################### + +require 5.006_001; +use strict; + +#====================================================================== +# main + +delete $ENV{MODULE_VERSION}; +_setup_modules(); +module('add','axiom-athdl'); +exec('atsim',@ARGV); + +####################################################################### +# Modules package + +sub _setup_modules { + # Load the 'module' command into the environment + my $init = "$ENV{MODULESHOME}/init/perl"; + (-f $init) or die "%Error: Script not found: $init,"; + require $init; +} + +####################################################################### +__END__ + +=pod + +=head1 NAME + +invoke_atsim - Invoke tool under "modules" command + +=head1 SYNOPSIS + + invoke_atsim {ncv arguments} + +=head1 DESCRIPTION + +=head1 DISTRIBUTION + +Copyright 2005-2010 by Wilson Snyder. This package 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. + +=head1 AUTHORS + +Wilson Snyder + +=head1 SEE ALSO + +=cut + +###################################################################### +### Local Variables: +### compile-command: "./invoke_atsim -help" +### End: diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 08783dbed..c307817ec 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -40,6 +40,7 @@ our @Orig_ARGV = @ARGV; our @Orig_ARGV_Sw; foreach (@Orig_ARGV) { push @Orig_ARGV_Sw, $_ if /^-/ && !/^-j/; } $Debug = 0; +my $opt_atsim; my $opt_benchmark; my @opt_tests; my $opt_gdb; @@ -61,6 +62,7 @@ Getopt::Long::config ("pass_through"); if (! GetOptions ( "benchmark:i" => sub { $opt_benchmark = $_[1] ? $_[1] : 1; }, "debug" => \&debug, + "atsim|athdl!"=> \$opt_atsim, "gdb!" => \$opt_gdb, "gdbbt!" => \$opt_gdbbt, "gdbsim!" => \$opt_gdbsim, @@ -86,7 +88,7 @@ $opt_jobs = calc_jobs() if defined $opt_jobs && $opt_jobs==0; $Fork->max_proc($opt_jobs); -if (!$opt_iv && !$opt_vcs && !$opt_nc && !$opt_vlt) { +if (!$opt_atsim && !$opt_iv && !$opt_vcs && !$opt_nc && !$opt_vlt) { $opt_vlt = 1; } @@ -101,6 +103,7 @@ my $leftcnt=0; my $okcnt=0; my $failcnt=0; my $skcnt=0; my @fails; foreach my $testpl (@opt_tests) { + one_test(pl_filename => $testpl, atsim=>1) if $opt_atsim; one_test(pl_filename => $testpl, iv=>1) if $opt_iv; one_test(pl_filename => $testpl, nc=>1) if $opt_nc; one_test(pl_filename => $testpl, vcs=>1) if $opt_vcs; @@ -261,6 +264,12 @@ sub new { v_flags2 => [], # Overridden in some sim files v_other_filenames => [], # After the filename so we can spec multiple files all_run_flags => [], + # ATSIM + atsim => 0, + atsim_flags => [split(/\s+/,"-c +sv +define+atsim"), + "+sv_dir+$self->{obj_dir}/.athdl_compile"], + atsim_flags2 => [], # Overridden in some sim files + atsimrun_flags => [], # IV iv => 0, iv_flags => [split(/\s+/,"+define+iverilog -o $self->{obj_dir}/simiv")], @@ -288,6 +297,7 @@ sub new { %$self}; bless $self, $class; + $self->{mode} ||= "atsim" if $self->{atsim}; $self->{mode} ||= "vcs" if $self->{vcs}; $self->{mode} ||= "vlt" if $self->{vlt}; $self->{mode} ||= "nc" if $self->{nc}; @@ -387,6 +397,20 @@ sub compile { $self->{trace} = 1 if ($opt_trace || $checkflags =~ /-trace\b/); $self->{coverage} = 1 if ($checkflags =~ /-coverage\b/); + if ($param{atsim}) { + $self->_make_top(); + $self->_run(logfile=>"$self->{obj_dir}/atsim_compile.log", + fails=>$param{fails}, + cmd=>[($ENV{VERILATOR_ATSIM}||"atsim"), + @{$param{atsim_flags}}, + @{$param{atsim_flags2}}, + @{$param{v_flags}}, + @{$param{v_flags2}}, + $param{top_filename}, + $param{top_shell_filename}, + @{$param{v_other_filenames}}, + ]); + } if ($param{vcs}) { $self->_make_top(); $self->_run(logfile=>"$self->{obj_dir}/vcs_compile.log", @@ -511,6 +535,14 @@ sub execute { my $run_env = $param{run_env}; $run_env .= ' ' if $run_env; + if ($param{atsim}) { + $self->_run(logfile=>"$self->{obj_dir}/atsim_sim.log", + fails=>$param{fails}, + cmd=>["echo q | ".$run_env."$self->{obj_dir}/athdl_sv", + @{$param{atsimrun_flags}}, + @{$param{all_run_flags}}, + ]); + } if ($param{iv}) { $self->_run(logfile=>"$self->{obj_dir}/iv_sim.log", fails=>$param{fails}, @@ -522,7 +554,7 @@ sub execute { if ($param{nc}) { $self->_run(logfile=>"$self->{obj_dir}/nc_sim.log", fails=>$param{fails}, - cmd=>[$run_env.($ENV{VERILATOR_NCVERILOG}||"ncverilog"), + cmd=>["echo q | ".$run_env.($ENV{VERILATOR_NCVERILOG}||"ncverilog"), @{$param{ncrun_flags}}, @{$param{all_run_flags}}, ]); @@ -531,7 +563,7 @@ sub execute { #my $fh = IO::File->new(">simv.key") or die "%Error: $! simv.key,"; #$fh->print("quit\n"); $fh->close; $self->_run(logfile=>"$self->{obj_dir}/vcs_sim.log", - cmd=>[$run_env."./simv", + cmd=>["echo q | ".$run_env."./simv", @{$param{all_run_flags}}, ], %param, @@ -1166,6 +1198,10 @@ driver.pl invokes Verilator or another simulator on each little test file. =over 4 +=item --atsim + +Run using ATSIM. + =item --benchmark [] Show execution times of each step. If an optional number is given, diff --git a/test_regress/t/t_alw_split.pl b/test_regress/t/t_alw_split.pl index 7df4b44de..d26471e64 100755 --- a/test_regress/t/t_alw_split.pl +++ b/test_regress/t/t_alw_split.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => ["--stats"], + verilator_flags2 => ["--stats"], ); if ($Self->{v3}) { diff --git a/test_regress/t/t_alw_splitord.pl b/test_regress/t/t_alw_splitord.pl index 224435f0c..28664c281 100755 --- a/test_regress/t/t_alw_splitord.pl +++ b/test_regress/t/t_alw_splitord.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => ["--stats"], + verilator_flags2 => ["--stats"], ); if ($Self->{v3}) { diff --git a/test_regress/t/t_assert_basic_fail.pl b/test_regress/t/t_assert_basic_fail.pl index 762b010e1..7f32d9b12 100755 --- a/test_regress/t/t_assert_basic_fail.pl +++ b/test_regress/t/t_assert_basic_fail.pl @@ -16,7 +16,7 @@ compile ( ); execute ( - fails => 1, + fails => $Self->{vlt}, ); ok(1); diff --git a/test_regress/t/t_assert_synth_full.pl b/test_regress/t/t_assert_synth_full.pl index 308f0aa32..3fcf338c9 100755 --- a/test_regress/t/t_assert_synth_full.pl +++ b/test_regress/t/t_assert_synth_full.pl @@ -16,7 +16,7 @@ compile ( execute ( check_finished=>0, - fails=>1, + fails=> $Self->{vlt}, expect=> '%Error: t_assert_synth.v:\d+: Assertion failed in top.v: synthesis full_case' ); diff --git a/test_regress/t/t_assert_synth_parallel.pl b/test_regress/t/t_assert_synth_parallel.pl index 762a3dc9e..19f0646c1 100755 --- a/test_regress/t/t_assert_synth_parallel.pl +++ b/test_regress/t/t_assert_synth_parallel.pl @@ -16,7 +16,7 @@ compile ( execute ( check_finished=>0, - fails=>1, + fails => $Self->{v3}, expect=> '%Error: t_assert_synth.v:\d+: Assertion failed in top.v: synthesis parallel_case' ); diff --git a/test_regress/t/t_case_write1.pl b/test_regress/t/t_case_write1.pl index 8ff03e216..b0a0163c6 100755 --- a/test_regress/t/t_case_write1.pl +++ b/test_regress/t/t_case_write1.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di $Self->{golden_out} ||= "t/$Self->{name}.out"; compile ( - v_flags2 => [$Self->{v3}?"--stats --O3 -x-assign fast":""], + verilator_flags2 => ["--stats --O3 -x-assign fast"], ); execute ( diff --git a/test_regress/t/t_case_write2.pl b/test_regress/t/t_case_write2.pl index f19e4f4e5..0d5c0beb2 100755 --- a/test_regress/t/t_case_write2.pl +++ b/test_regress/t/t_case_write2.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di $Self->{golden_out} ||= "t/$Self->{name}.out"; compile ( - v_flags2 => [$Self->{v3}?"--stats --O3 -x-assign fast":""], + verilator_flags2 => ["--stats --O3 -x-assign fast"], ); execute ( diff --git a/test_regress/t/t_case_x.pl b/test_regress/t/t_case_x.pl index 4d32d3bd4..bbefb98ca 100755 --- a/test_regress/t/t_case_x.pl +++ b/test_regress/t/t_case_x.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => ["--x-assign 0"], + verilator_flags2 => ["--x-assign 0"], ); execute ( diff --git a/test_regress/t/t_clk_gater.pl b/test_regress/t/t_clk_gater.pl index e06e83042..4dc82a1a0 100755 --- a/test_regress/t/t_clk_gater.pl +++ b/test_regress/t/t_clk_gater.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => ["--stats"], + verilator_flags2 => ["--stats"], ); execute ( diff --git a/test_regress/t/t_cover_line.pl b/test_regress/t/t_cover_line.pl index 70958a9aa..14d2fe474 100755 --- a/test_regress/t/t_cover_line.pl +++ b/test_regress/t/t_cover_line.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - verilator_flags2 => [$Self->{v3}?'--sp --coverage-line':''], + verilator_flags2 => ['--sp --coverage-line'], ); execute ( diff --git a/test_regress/t/t_cover_line.v b/test_regress/t/t_cover_line.v index 4a57dff9c..65c8d521a 100644 --- a/test_regress/t/t_cover_line.v +++ b/test_regress/t/t_cover_line.v @@ -48,7 +48,11 @@ module t (/*AUTOARG*/ toggle <= '1; end else if (cyc==5) begin +`ifdef VERILATOR $c("call_task();"); +`else + call_task(); +`endif end else if (cyc==10) begin $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_cover_sva_notflat.pl b/test_regress/t/t_cover_sva_notflat.pl index b398e38ad..5d55d601e 100755 --- a/test_regress/t/t_cover_sva_notflat.pl +++ b/test_regress/t/t_cover_sva_notflat.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => [$Self->{v3}?'--assert --sp --coverage-user':''], + verilator_flags2 => ['--assert --sp --coverage-user'], ); execute ( @@ -20,7 +20,8 @@ execute ( # Allow old Perl format dump, or new binary dump # Check that the hierarchy doesn't include __PVT__ # Otherwise our coverage reports would look really ugly -file_grep ($Self->{coverage_filename}, qr/(top\.v\.sub.*.cyc_eq_5)/); +file_grep ($Self->{coverage_filename}, qr/(top\.v\.sub.*.cyc_eq_5)/) + if $Self->{vlt}; ok(1); 1; diff --git a/test_regress/t/t_cover_toggle.pl b/test_regress/t/t_cover_toggle.pl index 3478b4472..23acfc141 100755 --- a/test_regress/t/t_cover_toggle.pl +++ b/test_regress/t/t_cover_toggle.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - verilator_flags2 => [$Self->{v3}?'--sp --coverage-toggle --stats':''], + verilator_flags2 => ['--sp --coverage-toggle --stats'], ); execute ( @@ -18,7 +18,8 @@ execute ( # Read the input .v file and do any CHECK_COVER requests inline_checks(); -file_grep ($Self->{stats}, qr/Coverage, Toggle points joined\s+25/i); +file_grep ($Self->{stats}, qr/Coverage, Toggle points joined\s+25/i) + if $Self->{vlt}; ok(1); 1; diff --git a/test_regress/t/t_flag_ldflags.pl b/test_regress/t/t_flag_ldflags.pl index 4d9800a49..2a52f5bcd 100755 --- a/test_regress/t/t_flag_ldflags.pl +++ b/test_regress/t/t_flag_ldflags.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + $Self->_run (cmd=>["cd $Self->{obj_dir}" ." && g++ -c ../../t/t_flag_ldflags_a.cpp" ." && ar r t_flag_ldflags_a.a t_flag_ldflags_a.o" diff --git a/test_regress/t/t_func_check.v b/test_regress/t/t_func_check.v index 943e79820..32e391d15 100644 --- a/test_regress/t/t_func_check.v +++ b/test_regress/t/t_func_check.v @@ -12,7 +12,7 @@ module t ( chk chk (.clk (clk), .rst_l (1'b1), - .expr (|crc), + .expr (|crc) ); always @ (posedge clk) begin diff --git a/test_regress/t/t_func_first.v b/test_regress/t/t_func_first.v index 16841e680..1ee1f80b8 100644 --- a/test_regress/t/t_func_first.v +++ b/test_regress/t/t_func_first.v @@ -3,7 +3,7 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003 by Wilson Snyder. -module t_task (/*AUTOARG*/ +module t (/*AUTOARG*/ // Inputs clk ); diff --git a/test_regress/t/t_func_graphcirc.v b/test_regress/t/t_func_graphcirc.v index 8773c24a3..bc28e5b17 100644 --- a/test_regress/t/t_func_graphcirc.v +++ b/test_regress/t/t_func_graphcirc.v @@ -37,10 +37,14 @@ module t (clk); if ( cyc >= 4 ) begin dindex = dindex + 2; //*** Error line $display("%m: DIndex increment %d", cyc); +`ifdef VERILATOR $c("VL_PRINTF(\"Hello1?\\n\");"); +`endif end +`ifdef VERILATOR $c("VL_PRINTF(\"Hello2?\\n\");"); $c("VL_PRINTF(\"Hello3?\\n\");"); +`endif end end endtask diff --git a/test_regress/t/t_func_grey.v b/test_regress/t/t_func_grey.v index cebdffc0f..fac134607 100644 --- a/test_regress/t/t_func_grey.v +++ b/test_regress/t/t_func_grey.v @@ -3,7 +3,7 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003 by Wilson Snyder. -module t_func (/*AUTOARG*/ +module t (/*AUTOARG*/ // Inputs clk ); diff --git a/test_regress/t/t_func_lib_sub.pl b/test_regress/t/t_func_lib_sub.pl index d5af9027a..79580b4a7 100755 --- a/test_regress/t/t_func_lib_sub.pl +++ b/test_regress/t/t_func_lib_sub.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + compile ( ); # No execute diff --git a/test_regress/t/t_func_public_trace.pl b/test_regress/t/t_func_public_trace.pl index bcc777159..bc1d49232 100755 --- a/test_regress/t/t_func_public_trace.pl +++ b/test_regress/t/t_func_public_trace.pl @@ -12,7 +12,7 @@ my $pubtask = ($Self->{v3} && verilator_version() =~ /\(public_tasks\)/); # TBD top_filename("t/t_func_public.v"); compile ( - v_flags2 => [($pubtask?'-DVERILATOR_PUBLIC_TASKS':''), "--trace"], + verilator_flags2 => [($pubtask?'-DVERILATOR_PUBLIC_TASKS':''), "--trace"], fails => $fail, ); diff --git a/test_regress/t/t_help.pl b/test_regress/t/t_help.pl index c646f70b1..ba73b7641 100755 --- a/test_regress/t/t_help.pl +++ b/test_regress/t/t_help.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + $Self->_run(fails=>1, cmd=>["perl","../bin/verilator", "--help"], logfile=>"$Self->{obj_dir}/t_help.log", tee=>0, - ) if $Self->{v3}; + ); file_grep ("$Self->{obj_dir}/t_help.log", qr/DISTRIBUTION/i); diff --git a/test_regress/t/t_initial.v b/test_regress/t/t_initial.v index 7cb6d14b8..0749fbdbf 100644 --- a/test_regress/t/t_initial.v +++ b/test_regress/t/t_initial.v @@ -3,7 +3,7 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003 by Wilson Snyder. -module t_initial (/*AUTOARG*/ +module t (/*AUTOARG*/ // Inputs clk ); diff --git a/test_regress/t/t_inst_tree_inl0_pub1.pl b/test_regress/t/t_inst_tree_inl0_pub1.pl index d0ed70613..8bfe8677b 100755 --- a/test_regress/t/t_inst_tree_inl0_pub1.pl +++ b/test_regress/t/t_inst_tree_inl0_pub1.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_inst_tree.v"); compile ( - v_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats'], + verilator_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats'], ); if ($Self->{v3}) { diff --git a/test_regress/t/t_inst_wideconst.pl b/test_regress/t/t_inst_wideconst.pl index 96d6aa1b1..fb2c8172c 100755 --- a/test_regress/t/t_inst_wideconst.pl +++ b/test_regress/t/t_inst_wideconst.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => ['-public'], + verilator_flags2 => ['-public'], ); execute ( diff --git a/test_regress/t/t_lint_implicit_port.pl b/test_regress/t/t_lint_implicit_port.pl index 4dfa9b44a..bd5d46c3e 100755 --- a/test_regress/t/t_lint_implicit_port.pl +++ b/test_regress/t/t_lint_implicit_port.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + compile ( v_flags => ["-Wno-IMPLICIT"], ); diff --git a/test_regress/t/t_math_arith.v b/test_regress/t/t_math_arith.v index f54a9c2ef..a001cdafc 100644 --- a/test_regress/t/t_math_arith.v +++ b/test_regress/t/t_math_arith.v @@ -3,7 +3,7 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003 by Wilson Snyder. -module t_arith(/*AUTOARG*/ +module t (/*AUTOARG*/ // Inputs clk ); diff --git a/test_regress/t/t_math_imm2.pl b/test_regress/t/t_math_imm2.pl index aef545263..c151ce6a6 100755 --- a/test_regress/t/t_math_imm2.pl +++ b/test_regress/t/t_math_imm2.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. +$Self->skip("Verilator only test") if !$Self->{vlt}; + compile ( make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_mem_fifo.v b/test_regress/t/t_mem_fifo.v index a84389d04..df378260d 100644 --- a/test_regress/t/t_mem_fifo.v +++ b/test_regress/t/t_mem_fifo.v @@ -90,7 +90,6 @@ module fifo (/*AUTOARG*/ // verilator lint_off VARHIDDEN reg [65:0] fifo[0:fifoDepth-1]; // verilator lint_on VARHIDDEN - reg [`PTRBITSM1:0] wrPtr, rdPtr; //reg [65:0] temp; diff --git a/test_regress/t/t_mem_first.v b/test_regress/t/t_mem_first.v index 2a7685ef9..de95f7f1c 100644 --- a/test_regress/t/t_mem_first.v +++ b/test_regress/t/t_mem_first.v @@ -3,7 +3,7 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003 by Wilson Snyder. -module t_mem (/*AUTOARG*/ +module t (/*AUTOARG*/ // Inputs clk ); diff --git a/test_regress/t/t_mem_shift.pl b/test_regress/t/t_mem_shift.pl index e3cdd650b..6be6d65d5 100755 --- a/test_regress/t/t_mem_shift.pl +++ b/test_regress/t/t_mem_shift.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => ["--stats"], + verilator_flags2 => ["--stats"], ); if ($Self->{v3}) { diff --git a/test_regress/t/t_mod_dup_bad.pl b/test_regress/t/t_mod_dup_bad.pl index de99944e2..c08302fbc 100755 --- a/test_regress/t/t_mod_dup_bad.pl +++ b/test_regress/t/t_mod_dup_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->skip("Verilator only test") if !$Self->{vlt}; + compile ( - fails=>$Self->{v3}, - nc=>0, # Need to get it not to give the prompt + 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.*', - ) if $Self->{v3}; + ); ok(1); 1; diff --git a/test_regress/t/t_mod_dup_ign.pl b/test_regress/t/t_mod_dup_ign.pl index acfee1103..09e214c4a 100755 --- a/test_regress/t/t_mod_dup_ign.pl +++ b/test_regress/t/t_mod_dup_ign.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. +$Self->skip("Verilator only test") if !$Self->{vlt}; + compile ( make_top_shell => 0, make_main => 0, diff --git a/test_regress/t/t_preproc_kwd.v b/test_regress/t/t_preproc_kwd.v index 412767d61..853e8a5b2 100644 --- a/test_regress/t/t_preproc_kwd.v +++ b/test_regress/t/t_preproc_kwd.v @@ -9,25 +9,45 @@ module t (/*AUTOARG*/ ); input clk; -`begin_keywords "1364-1995" - integer signed; initial signed = 1; -`end_keywords -`begin_keywords "1364-2001" - integer bit; initial bit = 1; -`end_keywords -`begin_keywords "1364-2005" - integer final; initial final = 1; -`end_keywords -`begin_keywords "1800-2005" - integer global; initial global = 1; - `begin_keywords "1800-2009" - final begin - $write("*-* All Finished *-*\n"); - end - `end_keywords -`end_keywords + s1 s1 (); + s2 s2 (); + s3 s3 (); + s4 s4 (); + s5 s5 (); initial begin $finish; end endmodule + +`begin_keywords "1364-1995" +module s1; + integer signed; initial signed = 1; +endmodule +`end_keywords + +`begin_keywords "1364-2001" +module s2; + integer bit; initial bit = 1; +endmodule +`end_keywords + +`begin_keywords "1364-2005" +module s3; + integer final; initial final = 1; +endmodule +`end_keywords + +`begin_keywords "1800-2005" +module s4; + integer global; initial global = 1; +endmodule +`end_keywords + +`begin_keywords "1800-2009" +module s5; + final begin + $write("*-* All Finished *-*\n"); + end +endmodule +`end_keywords diff --git a/test_regress/t/t_rnd.v b/test_regress/t/t_rnd.v index 18629bb9f..c080df8a3 100644 --- a/test_regress/t/t_rnd.v +++ b/test_regress/t/t_rnd.v @@ -3,7 +3,7 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2003 by Wilson Snyder. -module t_rnd(/*AUTOARG*/ +module t (/*AUTOARG*/ // Inputs clk ); diff --git a/test_regress/t/t_unopt_combo_isolate.pl b/test_regress/t/t_unopt_combo_isolate.pl index c4b2d2ad6..814e80865 100755 --- a/test_regress/t/t_unopt_combo_isolate.pl +++ b/test_regress/t/t_unopt_combo_isolate.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di top_filename("t/t_unopt_combo.v"); compile ( - v_flags2 => ['+define+ISOLATE --stats'], + verilator_flags2 => ['+define+ISOLATE --stats'], ); if ($Self->{v3}) { diff --git a/test_regress/t/t_var_life.pl b/test_regress/t/t_var_life.pl index 73a02e5c5..f9a8818de 100755 --- a/test_regress/t/t_var_life.pl +++ b/test_regress/t/t_var_life.pl @@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Version 2.0. compile ( - v_flags2 => ["--stats"], + verilator_flags2 => ["--stats"], ); if ($Self->{v3}) { diff --git a/test_regress/t/t_var_pins_cc.pl b/test_regress/t/t_var_pins_cc.pl index 9fbf82fc4..8f8385b71 100755 --- a/test_regress/t/t_var_pins_cc.pl +++ b/test_regress/t/t_var_pins_cc.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + top_filename("t/t_var_pinsizes.v"); compile ( diff --git a/test_regress/t/t_var_pins_sc1.pl b/test_regress/t/t_var_pins_sc1.pl index 4c2b488e4..163d12056 100755 --- a/test_regress/t/t_var_pins_sc1.pl +++ b/test_regress/t/t_var_pins_sc1.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + top_filename("t/t_var_pinsizes.v"); compile ( diff --git a/test_regress/t/t_var_pins_sc2.pl b/test_regress/t/t_var_pins_sc2.pl index 36624e1b8..e3a8522f0 100755 --- a/test_regress/t/t_var_pins_sc2.pl +++ b/test_regress/t/t_var_pins_sc2.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + top_filename("t/t_var_pinsizes.v"); compile ( diff --git a/test_regress/t/t_var_pins_sc32.pl b/test_regress/t/t_var_pins_sc32.pl index c65cdc125..feca995f4 100755 --- a/test_regress/t/t_var_pins_sc32.pl +++ b/test_regress/t/t_var_pins_sc32.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + top_filename("t/t_var_pinsizes.v"); compile ( diff --git a/test_regress/t/t_var_pins_sc64.pl b/test_regress/t/t_var_pins_sc64.pl index a22da2328..20a8cb72e 100755 --- a/test_regress/t/t_var_pins_sc64.pl +++ b/test_regress/t/t_var_pins_sc64.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + top_filename("t/t_var_pinsizes.v"); compile ( diff --git a/test_regress/t/t_var_pins_scui.pl b/test_regress/t/t_var_pins_scui.pl index 0958273f1..26b69c522 100755 --- a/test_regress/t/t_var_pins_scui.pl +++ b/test_regress/t/t_var_pins_scui.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. +$Self->{vlt} or $Self->skip("Verilator only test"); + top_filename("t/t_var_pinsizes.v"); compile (