Make test_regress now places each test result in unique obj_dir
This commit is contained in:
parent
41dbfc9e1c
commit
314c9de845
|
|
@ -113,6 +113,7 @@ sub one_test {
|
|||
my $test = new VTest(@params);
|
||||
$test->oprint("="x50,"\n");
|
||||
unlink $test->{status_filename};
|
||||
$test->prep;
|
||||
$test->read;
|
||||
if ($test->ok) {
|
||||
$test->oprint("Test PASSED\n");
|
||||
|
|
@ -205,12 +206,18 @@ use Data::Dumper;
|
|||
use Carp;
|
||||
use Cwd;
|
||||
|
||||
use vars qw ($Last_Self);
|
||||
use vars qw ($Self $Self);
|
||||
use strict;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {
|
||||
my $self = {@_};
|
||||
|
||||
$self->{name} ||= $1 if $self->{pl_filename} =~ m!.*/([^/]*)\.pl$!;
|
||||
$self->{obj_dir} ||= "obj_dir/$self->{name}";
|
||||
$self->{t_dir} ||= cwd()."/t"; # Used both absolutely and under obj_dir
|
||||
|
||||
$self = {
|
||||
name => undef, # Set below, name of this test
|
||||
mode => "",
|
||||
pl_filename => undef, # Name of .pl file to get setup from
|
||||
|
|
@ -222,6 +229,7 @@ sub new {
|
|||
v_flags => [split(/\s+/,(" -f input.vc --debug-check"
|
||||
.($opt_verbose ? " +define+TEST_VERBOSE=1":"")
|
||||
.($opt_benchmark ? " +define+TEST_BENCHMARK=$opt_benchmark":"")
|
||||
." -Mdir $self->{obj_dir}"
|
||||
))],
|
||||
v_flags2 => [], # Overridden in some sim files
|
||||
v_other_filenames => [], # After the filename so we can spec multiple files
|
||||
|
|
@ -241,22 +249,22 @@ sub new {
|
|||
verilator_make_gcc => 1,
|
||||
verilated_debug => $Opt_Verilated_Debug,
|
||||
stdout_filename => undef, # Redirect stdout
|
||||
@_};
|
||||
%$self};
|
||||
bless $self, $class;
|
||||
|
||||
$self->{name} ||= $1 if $self->{pl_filename} =~ m!.*/([^/]*)\.pl$!;
|
||||
$self->{mode} ||= "vcs" if $self->{vcs};
|
||||
$self->{mode} ||= "v3" if $self->{v3};
|
||||
$self->{mode} ||= "nc" if $self->{nc};
|
||||
$self->{VM_PREFIX} ||= "V".$self->{name};
|
||||
$self->{stats} ||= "obj_dir/V".$self->{name}."__stats.txt";
|
||||
$self->{status_filename} ||= "obj_dir/V".$self->{name}.".status";
|
||||
$self->{coverage_filename} ||= "obj_dir/V".$self->{name}."_coverage.pl";
|
||||
$self->{stats} ||= "$self->{obj_dir}/V".$self->{name}."__stats.txt";
|
||||
$self->{status_filename} ||= "$self->{obj_dir}/V".$self->{name}.".status";
|
||||
$self->{run_log_filename} ||= "$self->{obj_dir}/vl_sim.log";
|
||||
$self->{coverage_filename} ||= "$self->{obj_dir}/V".$self->{name}."_coverage.pl";
|
||||
($self->{top_filename} = $self->{pl_filename}) =~ s/\.pl$/\.v/;
|
||||
if (!$self->{make_top_shell}) {
|
||||
$self->{top_shell_filename} = $self->{top_filename};
|
||||
} else {
|
||||
$self->{top_shell_filename} = "obj_dir/$self->{VM_PREFIX}__top.v";
|
||||
$self->{top_shell_filename} = "$self->{obj_dir}/$self->{VM_PREFIX}__top.v";
|
||||
}
|
||||
return $self;
|
||||
}
|
||||
|
|
@ -287,12 +295,18 @@ sub skip {
|
|||
$self->{errors} ||= "Skip: ".$msg;
|
||||
}
|
||||
|
||||
sub prep {
|
||||
my $self = shift;
|
||||
mkdir $self->{obj_dir}; # Ok if already exists
|
||||
}
|
||||
|
||||
sub read {
|
||||
my $self = shift;
|
||||
# Read the control file
|
||||
(-r $self->{pl_filename})
|
||||
or return $self->error("Can't open $self->{pl_filename}\n");
|
||||
$Last_Self = $self;
|
||||
$Self = $self;
|
||||
$Self = $self;
|
||||
delete $INC{$self->{pl_filename}};
|
||||
require $self->{pl_filename};
|
||||
}
|
||||
|
|
@ -319,7 +333,7 @@ sub read_status {
|
|||
# Methods invoked by tests
|
||||
|
||||
sub compile {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my %param = (%{$self}, @_); # Default arguments are from $self
|
||||
return 1 if $self->errors;
|
||||
$self->oprint("Compile\n");
|
||||
|
|
@ -331,7 +345,7 @@ sub compile {
|
|||
|
||||
if ($param{vcs}) {
|
||||
$self->_make_top();
|
||||
$self->_run(logfile=>"obj_dir/".$self->{name}."__vcs_compile.log",
|
||||
$self->_run(logfile=>"$self->{obj_dir}/vcs_compile.log",
|
||||
fails=>$param{fails},
|
||||
cmd=>[($ENV{VERILATOR_VCS}||"vcs"),
|
||||
@{$param{vcs_flags}},
|
||||
|
|
@ -345,7 +359,7 @@ sub compile {
|
|||
}
|
||||
if ($param{nc}) {
|
||||
$self->_make_top();
|
||||
$self->_run(logfile=>"obj_dir/".$self->{name}."__nc_compile.log",
|
||||
$self->_run(logfile=>"$self->{obj_dir}/nc_compile.log",
|
||||
fails=>$param{fails},
|
||||
cmd=>[($ENV{VERILATOR_NCVERILOG}||"ncverilog"),
|
||||
@{$param{nc_flags}},
|
||||
|
|
@ -393,7 +407,7 @@ sub compile {
|
|||
return 1;
|
||||
}
|
||||
|
||||
$self->_run(logfile=>"obj_dir/".$self->{name}."__simx_compile.log",
|
||||
$self->_run(logfile=>"$self->{obj_dir}/vl_compile.log",
|
||||
fails=>$param{fails},
|
||||
expect=>$param{expect},
|
||||
cmd=>\@v3args);
|
||||
|
|
@ -407,8 +421,8 @@ sub compile {
|
|||
$self->_sp_preproc(%param);
|
||||
}
|
||||
$self->oprint("GCC\n");
|
||||
$self->_run(logfile=>"obj_dir/".$self->{name}."__simx_gcc.log",
|
||||
cmd=>["cd obj_dir && ",
|
||||
$self->_run(logfile=>"$self->{obj_dir}/vl_gcc.log",
|
||||
cmd=>["cd $self->{obj_dir} && ",
|
||||
"make", "-f".getcwd()."/Makefile_obj",
|
||||
"VM_PREFIX=$self->{VM_PREFIX}",
|
||||
($param{make_main}?"":"MAKE_MAIN=0"),
|
||||
|
|
@ -421,12 +435,12 @@ sub compile {
|
|||
}
|
||||
|
||||
sub execute {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
return 1 if $self->errors;
|
||||
my %param = (%{$self}, @_); # Default arguments are from $self
|
||||
$self->oprint("Run\n");
|
||||
if ($param{nc}) {
|
||||
$self->_run(logfile=>"obj_dir/".$self->{name}."__simnc.log",
|
||||
$self->_run(logfile=>"$self->{obj_dir}/nc_sim.log",
|
||||
fails=>$param{fails},
|
||||
cmd=>[($ENV{VERILATOR_NCVERILOG}||"ncverilog"),
|
||||
@{$param{ncrun_flags}},
|
||||
|
|
@ -435,7 +449,7 @@ sub execute {
|
|||
if ($param{vcs}) {
|
||||
#my $fh = IO::File->new(">simv.key") or die "%Error: $! simv.key,";
|
||||
#$fh->print("quit\n"); $fh->close;
|
||||
$self->_run(logfile=>"obj_dir/".$self->{name}."__simv.log",
|
||||
$self->_run(logfile=>"$self->{obj_dir}/vcs_sim.log",
|
||||
cmd=>["./simv",],
|
||||
%param,
|
||||
expect=>undef, # vcs expect isn't the same
|
||||
|
|
@ -444,8 +458,8 @@ sub execute {
|
|||
if ($param{v3}
|
||||
#&& (!$param{needs_v4} || -r "$ENV{VERILATOR_ROOT}/src/V3Gate.cpp")
|
||||
) {
|
||||
$self->_run(logfile=>"obj_dir/".$self->{name}."__simx.log",
|
||||
cmd=>["obj_dir/$param{VM_PREFIX}",
|
||||
$self->_run(logfile=>"$self->{obj_dir}/vl_sim.log",
|
||||
cmd=>["$self->{obj_dir}/$param{VM_PREFIX}",
|
||||
],
|
||||
%param,
|
||||
);
|
||||
|
|
@ -456,30 +470,30 @@ sub execute {
|
|||
# Accessors
|
||||
|
||||
sub ok {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
$self->{ok} = $_[0] if defined $_[0];
|
||||
$self->{ok} = 0 if $self->{errors};
|
||||
return $self->{ok};
|
||||
}
|
||||
|
||||
sub errors {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
return $self->{errors};
|
||||
}
|
||||
|
||||
sub top_filename {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
$self->{top_filename} = shift if defined $_[0];
|
||||
return $self->{top_filename};
|
||||
}
|
||||
|
||||
sub sp {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
return $self->{sp};
|
||||
}
|
||||
|
||||
sub sc {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
return $self->{sc};
|
||||
}
|
||||
|
||||
|
|
@ -490,7 +504,7 @@ sub sc_or_sp {
|
|||
#----------------------------------------------------------------------
|
||||
|
||||
sub _run {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my %param = (tee=>1,
|
||||
@_);
|
||||
my $command = join(' ',@{$param{cmd}});
|
||||
|
|
@ -584,7 +598,7 @@ sub _make_main {
|
|||
|
||||
$self->_read_inputs();
|
||||
|
||||
my $filename = "obj_dir/$self->{VM_PREFIX}__main.cpp";
|
||||
my $filename = "$self->{obj_dir}/$self->{VM_PREFIX}__main.cpp";
|
||||
my $fh = IO::File->new(">$filename") or die "%Error: $! $filename,";
|
||||
|
||||
print $fh "// Test defines\n";
|
||||
|
|
@ -646,7 +660,7 @@ sub _make_main {
|
|||
$fh->print(" SpTraceVcdCFile* tfp = new SpTraceVcdCFile;\n");
|
||||
}
|
||||
$fh->print(" topp->trace (tfp, 99);\n");
|
||||
$fh->print(" tfp->open (\"obj_dir/".$self->{name}."__simx.vcd\");\n");
|
||||
$fh->print(" tfp->open (\"$self->{obj_dir}/simx.vcd\");\n");
|
||||
$fh->print("#endif\n");
|
||||
}
|
||||
|
||||
|
|
@ -743,7 +757,7 @@ sub _sp_preproc {
|
|||
|
||||
$self->_run(logfile=>"simx.log",
|
||||
fails=>0,
|
||||
cmd=>["cd obj_dir ; sp_preproc",
|
||||
cmd=>["cd $self->{obj_dir} ; sp_preproc",
|
||||
"--preproc",
|
||||
"$self->{VM_PREFIX}.sp",
|
||||
]);
|
||||
|
|
@ -805,7 +819,7 @@ sub files_identical {
|
|||
}
|
||||
|
||||
sub vcd_identical {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my $fn1 = shift;
|
||||
my $fn2 = shift;
|
||||
if (!-r $fn1) { $self->error("File does not exist $fn1\n"); return 0; }
|
||||
|
|
@ -822,7 +836,7 @@ sub vcd_identical {
|
|||
}
|
||||
|
||||
sub file_grep_not {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my $filename = shift;
|
||||
my $regexp = shift;
|
||||
|
||||
|
|
@ -834,7 +848,7 @@ sub file_grep_not {
|
|||
}
|
||||
|
||||
sub file_grep {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my $filename = shift;
|
||||
my $regexp = shift;
|
||||
|
||||
|
|
@ -848,7 +862,7 @@ sub file_grep {
|
|||
my %_File_Contents_Cache;
|
||||
|
||||
sub file_contents {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my $filename = shift;
|
||||
|
||||
if (!$_File_Contents_Cache{$filename}) {
|
||||
|
|
@ -868,7 +882,7 @@ sub file_contents {
|
|||
}
|
||||
|
||||
sub write_wholefile {
|
||||
my $self = (ref $_[0]? shift : $Last_Self);
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my $filename = shift;
|
||||
my $contents = shift;
|
||||
my $fh = IO::File->new(">$filename") or die "%Error: $! writing $filename,";
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ compile (
|
|||
v_flags2 => ["--stats"],
|
||||
);
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
file_grep ($Last_Self->{stats}, qr/Optimizations, Split always\s+6/i);
|
||||
if ($Self->{v3}) {
|
||||
file_grep ($Self->{stats}, qr/Optimizations, Split always\s+6/i);
|
||||
}
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ compile (
|
|||
v_flags2 => ["--stats"],
|
||||
);
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
file_grep ($Last_Self->{stats}, qr/Optimizations, Split always\s+0/i);
|
||||
if ($Self->{v3}) {
|
||||
file_grep ($Self->{stats}, qr/Optimizations, Split always\s+0/i);
|
||||
}
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')],
|
||||
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_assert_basic.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--assert --sp --coverage-user':''],
|
||||
v_flags2 => [$Self->{v3}?'--assert --sp --coverage-user':''],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
@ -18,9 +18,9 @@ execute (
|
|||
|
||||
#Needs work
|
||||
print "-Info: NOT checking for coverage\n";
|
||||
#file_grep ($Last_Self->{coverage_filename}, qr/t=>'psl_cover',o=>'cover',c=>2\);/);
|
||||
#file_grep ($Last_Self->{coverage_filename}, qr/DefaultClock.*,c=>1\);/);
|
||||
#file_grep ($Last_Self->{coverage_filename}, qr/ToggleLogIf.*,c=>9\);/);
|
||||
#file_grep ($Self->{coverage_filename}, qr/t=>'psl_cover',o=>'cover',c=>2\);/);
|
||||
#file_grep ($Self->{coverage_filename}, qr/DefaultClock.*,c=>1\);/);
|
||||
#file_grep ($Self->{coverage_filename}, qr/ToggleLogIf.*,c=>9\);/);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ top_filename("t/t_assert_basic.v");
|
|||
|
||||
compile (
|
||||
v_flags2 => ['+define+FAILING_ASSERTIONS',
|
||||
$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')],
|
||||
fails => $Last_Self->{nc},
|
||||
$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')],
|
||||
fails => $Self->{nc},
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,36 +9,36 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_assert_cover.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--assert --sp --coverage-user':''],
|
||||
nc_flags2 => ["+nccovoverwrite +nccoverage+all +nccovtest+$Last_Self->{name}"]
|
||||
v_flags2 => [$Self->{v3}?'--assert --sp --coverage-user':''],
|
||||
nc_flags2 => ["+nccovoverwrite +nccoverage+all +nccovtest+$Self->{name}"]
|
||||
);
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
|
||||
if ($Last_Self->{nc}) {
|
||||
my $name = $Last_Self->{name};
|
||||
my $cf = "obj_dir/${name}__nccover.cf";
|
||||
if ($Self->{nc}) {
|
||||
my $name = $Self->{name};
|
||||
my $cf = "$Self->{obj_dir}/${name}__nccover.cf";
|
||||
{
|
||||
my $fh = IO::File->new(">$cf") or die "%Error: $! writing $cf,";
|
||||
$fh->printf("report_summary -module *\n");
|
||||
$fh->printf("report_detail -both -instance *\n");
|
||||
$fh->printf("report_html -both -instance * > obj_dir/${name}__nccover.html\n");
|
||||
$fh->printf("report_html -both -instance * > $Self->{obj_dir}/${name}__nccover.html\n");
|
||||
$fh->close;
|
||||
}
|
||||
$Last_Self->_run (logfile=>"obj_dir/${name}__nccover.log",
|
||||
$Self->_run (logfile=>"$Self->{obj_dir}/${name}__nccover.log",
|
||||
tee=>0,
|
||||
cmd=>[($ENV{VERILATOR_ICCR}||'iccr'),
|
||||
"-test ${name} ${cf}"]);
|
||||
}
|
||||
|
||||
file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==4/);
|
||||
file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==5/);
|
||||
file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==6/);
|
||||
file_grep ($Self->{run_log_filename}, qr/COVER: Cyc==4/);
|
||||
file_grep ($Self->{run_log_filename}, qr/COVER: Cyc==5/);
|
||||
file_grep ($Self->{run_log_filename}, qr/COVER: Cyc==6/);
|
||||
|
||||
# Allow old Perl format dump, or new binary dump
|
||||
file_grep ($Last_Self->{coverage_filename}, qr/(cyc_eq_5.*,c=>[^0]|cyc_eq_5.* [1-9][0-9]*\n)/);
|
||||
file_grep ($Self->{coverage_filename}, qr/(cyc_eq_5.*,c=>[^0]|cyc_eq_5.* [1-9][0-9]*\n)/);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')],
|
||||
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_assert_synth.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':''),
|
||||
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':''),
|
||||
'+define+FAILING_FULL',],
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_assert_synth.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':''),
|
||||
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':''),
|
||||
'+define+FAILING_PARALLEL',],
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ compile (
|
|||
verilator_flags2 => ["--stats --profile-cfuncs"],
|
||||
);
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
file_grep ($Last_Self->{stats}, qr/Optimizations, Tables created\s+10/i);
|
||||
file_grep ($Last_Self->{stats}, qr/Optimizations, Combined CFuncs\s+10/i);
|
||||
if ($Self->{v3}) {
|
||||
file_grep ($Self->{stats}, qr/Optimizations, Tables created\s+10/i);
|
||||
file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+10/i);
|
||||
}
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -207,5 +207,3 @@ module t (/*AUTOARG*/
|
|||
end
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -288,4 +288,3 @@ module t_case_huge_sub (/*AUTOARG*/
|
|||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -288,4 +288,3 @@ module t_case_huge_sub2 (/*AUTOARG*/
|
|||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -289,4 +289,3 @@ module t_case_huge_sub3 (/*AUTOARG*/
|
|||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -60,4 +60,3 @@ module t_case_huge_sub4 (/*AUTOARG*/
|
|||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,15 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
$golden_out ||= "t/$Last_Self->{name}.out";
|
||||
$golden_out ||= "t/$Self->{name}.out";
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?"--stats --O3 -x-assign fast":""],
|
||||
v_flags2 => [$Self->{v3}?"--stats --O3 -x-assign fast":""],
|
||||
);
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
|
||||
ok(files_identical("obj_dir/$Last_Self->{name}_logger.log", $golden_out));
|
||||
|
||||
ok(files_identical("$Self->{obj_dir}/$Self->{name}_logger.log", $golden_out));
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ module t (/*AUTOARG*/
|
|||
crc <= {crc[62:0], crc[63]^crc[2]^crc[0]};
|
||||
if (cyc==1) begin
|
||||
crc <= 64'h00000000_00000097;
|
||||
$write("Open obj_dir/t_case_write1_logger.log\n");
|
||||
fd = $fopen("obj_dir/t_case_write1_logger.log", "w");
|
||||
$write("Open obj_dir/t_case_write1/t_case_write1_logger.log\n");
|
||||
fd = $fopen("obj_dir/t_case_write1/t_case_write1_logger.log", "w");
|
||||
end
|
||||
if (cyc==90) begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
$golden_out ||= "t/$Last_Self->{name}.out";
|
||||
$golden_out ||= "t/$Self->{name}.out";
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?"--stats --O3 -x-assign fast":""],
|
||||
v_flags2 => [$Self->{v3}?"--stats --O3 -x-assign fast":""],
|
||||
);
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
|
||||
ok(files_identical("obj_dir/$Last_Self->{name}_logger.log", $golden_out));
|
||||
ok(files_identical("$Self->{obj_dir}/$Self->{name}_logger.log", $golden_out));
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ module t (/*AUTOARG*/
|
|||
crc <= {crc[62:0], crc[63]^crc[2]^crc[0]};
|
||||
if (cyc==1) begin
|
||||
crc <= 64'h00000000_00000097;
|
||||
$write("Open obj_dir/t_case_write2_logger.log\n");
|
||||
fd = $fopen("obj_dir/t_case_write2_logger.log", "w");
|
||||
$write("Open obj_dir/t_case_write2/t_case_write2_logger.log\n");
|
||||
fd = $fopen("obj_dir/t_case_write2/t_case_write2_logger.log", "w");
|
||||
end
|
||||
if (cyc==90) begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
|
||||
compile (
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
|
||||
compile (
|
||||
);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
top_filename("t/t_clk_latch.v");
|
||||
|
||||
my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
|
||||
compile (
|
||||
v_flags2 => ['+define+EDGE_DETECT_STYLE'],
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
|
||||
compile (
|
||||
);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'-Wno-STMTDLY':''],
|
||||
v_flags2 => [$Self->{v3}?'-Wno-STMTDLY':''],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ compile (
|
|||
expect=>
|
||||
'%Warning-STMTDLY: t/t_delay.v:\d+: Ignoring delay on this delayed statement.
|
||||
.*%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_display.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?"-O0":""],
|
||||
v_flags2 => [$Self->{v3}?"-O0":""],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_display_signed.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?"-O0":""],
|
||||
v_flags2 => [$Self->{v3}?"-O0":""],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
$Last_Self->{vl_time_multiplier} = 1000;
|
||||
$Self->{vl_time_multiplier} = 1000;
|
||||
|
||||
compile (
|
||||
verilator_flags2 => ['-DVL_TIME_MULTIPLER=1000'],
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ foreach my $file (sort keys %files) {
|
|||
." $file\n") if $Debug;
|
||||
|
||||
if ($dir && !$tar && !$skip) {
|
||||
$Last_Self->error("File not in manifest or MANIFEST.SKIP: $file");
|
||||
$Self->error("File not in manifest or MANIFEST.SKIP: $file");
|
||||
} elsif (!$dir && $tar && !$skip) {
|
||||
$Last_Self->error("File in manifest, but not directory: $file");
|
||||
$Self->error("File in manifest, but not directory: $file");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--Ox':''],
|
||||
v_flags2 => [$Self->{v3}?'--Ox':''],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
if ($Self->{v3}) {
|
||||
compile (
|
||||
make_flags => 'CPPFLAGS_ADD=-I../t',
|
||||
make_flags => "CPPFLAGS_ADD=-I$Self->{t_dir}",
|
||||
);
|
||||
execute (
|
||||
check_finished=>1,
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
compile (
|
||||
v_flags2 => ["--lint-only"],
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: No top level module found
|
||||
%Error: Exiting due to',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
if ($Self->{v3}) {
|
||||
compile ();
|
||||
|
||||
my $outfile = "obj_dir/V".$Last_Self->{name}.".cpp";
|
||||
my $outfile = "$Self->{obj_dir}/V".$Self->{name}.".cpp";
|
||||
my @oldstats = stat($outfile);
|
||||
print "Old mtime=",$oldstats[9],"\n";
|
||||
$oldstats[9] or $Last_Self->error("No output file found: $outfile\n");
|
||||
$oldstats[9] or $Self->error("No output file found: $outfile\n");
|
||||
|
||||
sleep (1); # Or else it might take < 1 second to compile and see no diff.
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ if ($Last_Self->{v3}) {
|
|||
print "New mtime=",$newstats[9],"\n";
|
||||
|
||||
($oldstats[9] == $newstats[9])
|
||||
or $Last_Self->error("--skip-identical was ignored -- recompiled\n");
|
||||
or $Self->error("--skip-identical was ignored -- recompiled\n");
|
||||
}
|
||||
|
||||
ok(1);
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
compile (
|
||||
v_flags2 => ["--top-module b"],
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -28,4 +28,3 @@ module d;
|
|||
$finish;
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_flag_topmodule.v");
|
||||
|
||||
compile (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
nc=>0, # Need to get it not to give the prompt
|
||||
expect=>
|
||||
'%Error-MULTITOP: t/t_flag_topmodule.v:\d+: Unsupported: Multiple top level modules: .*
|
||||
%Error-MULTITOP: t/t_flag_topmodule.v:\d+: Fix, or use --top-module option to select which you want.
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_flag_topmodule.v");
|
||||
|
||||
compile (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
v_flags2 => ["--top-module notfound"],
|
||||
nc=>0, # Need to get it not to give the prompt
|
||||
expect=>
|
||||
'%Error: Specified --top-module \'notfound\' was not found in design.
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ top_filename("t/t_flag_werror.v");
|
|||
|
||||
compile (
|
||||
v_flags2 => ["--lint-only"],
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Warning-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST generates 6 bits.
|
||||
%Warning-WIDTH: Use .* and lint_on around source to disable this message.
|
||||
%Error: Exiting due to',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ top_filename("t/t_flag_werror.v");
|
|||
|
||||
compile (
|
||||
v_flags2 => ["--lint-only"],
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
verilator_flags=> [qw(-sp -Werror-WIDTH)],
|
||||
expect=>
|
||||
'%Error-WIDTH: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST generates 6 bits.
|
||||
%Error: Exiting due to',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_func_bad2.v:\d+: Unsupported: Recursive function or task call
|
||||
%Error: Exiting due to',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
compile (
|
||||
v_flags2 => ["--lint-only"],
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Warning-WIDTH: t/t_func_bad_width.v:\d+: Operator FUNCREF expects 40 bits on the Function Argument, but Function Argument.s VARREF generates 39 bits.
|
||||
%Warning-WIDTH: Use [^\n]+
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
$Last_Self->{verilated_randReset} = 1;
|
||||
$Self->{verilated_randReset} = 1;
|
||||
|
||||
compile (
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,4 +9,3 @@ module t;
|
|||
$finish;
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -92,4 +92,3 @@ module mytop (
|
|||
ftest u0( a, b, clk, z );
|
||||
|
||||
endmodule // mytop
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'+define+VERILATOR_PUBLIC_TASKS':''],
|
||||
v_flags2 => [$Self->{v3}?'+define+VERILATOR_PUBLIC_TASKS':''],
|
||||
fails => $fail,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $pubtask = ($Last_Self->{v3} && verilator_version() =~ /\(public_tasks\)/); # TBD
|
||||
my $pubtask = ($Self->{v3} && verilator_version() =~ /\(public_tasks\)/); # TBD
|
||||
|
||||
top_filename("t/t_func_public.v");
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
compile (
|
||||
make_top_shell => 0,
|
||||
make_main => 0,
|
||||
v_flags2 => ["--exe t/$Last_Self->{name}.cpp"],
|
||||
) if $Last_Self->{v3};
|
||||
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
|
||||
) if $Self->{v3};
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -119,4 +119,3 @@ module te (
|
|||
q <= qmid;
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -81,4 +81,3 @@ module fnxtclk (u, reset, clk, w );
|
|||
end
|
||||
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ module t (/*AUTOARG*/
|
|||
//`define WAVES
|
||||
`ifdef WAVES
|
||||
initial begin
|
||||
$dumpfile("obj_dir/t_gen_intdot.vcd");
|
||||
$dumpfile("obj_dir/t_gen_intdot/t_gen_intdot.vcd");
|
||||
$dumpvars(12, t);
|
||||
end
|
||||
`endif
|
||||
|
|
@ -103,4 +103,3 @@ module Genit (clk, value, result);
|
|||
end
|
||||
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ module t (/*AUTOARG*/
|
|||
//`define WAVES
|
||||
`ifdef WAVES
|
||||
initial begin
|
||||
$dumpfile("obj_dir/t_gen_intdot.vcd");
|
||||
$dumpfile("obj_dir/t_gen_intdot2/t_gen_intdot.vcd");
|
||||
$dumpvars(12, t);
|
||||
end
|
||||
`endif
|
||||
|
|
@ -162,4 +162,3 @@ module Genit (
|
|||
`endif
|
||||
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
$Last_Self->_run(fails=>1,
|
||||
$Self->_run(fails=>1,
|
||||
cmd=>["perl","../bin/verilator",
|
||||
"--help"],
|
||||
logfile=>"obj_dir/t_help.log",
|
||||
logfile=>"$Self->{obj_dir}/t_help.log",
|
||||
tee=>0,
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
file_grep ("obj_dir/t_help.log", qr/DISTRIBUTION/i);
|
||||
file_grep ("$Self->{obj_dir}/t_help.log", qr/DISTRIBUTION/i);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ compile (
|
|||
make_top_shell=>0,
|
||||
verilator_flags=> [qw(-sp)],
|
||||
verilator_make_gcc=>0,
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Warning-WIDTH: t/t_inst_overwide.v:\d+: Output port connection outy_w92 expects 92 bits but connection\'s VARREF generates 30 bits.
|
||||
%Warning-WIDTH: Use .* to disable this message.
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ compile (
|
|||
v_flags2 => ['+define+NOUSE_INLINE', '+define+USE_PUBLIC', '--stats'],
|
||||
);
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
file_grep ($Last_Self->{stats}, qr/Optimizations, Combined CFuncs\s+16/i);
|
||||
if ($Self->{v3}) {
|
||||
file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+16/i);
|
||||
}
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
compile (
|
||||
make_top_shell => 0,
|
||||
make_main => 0,
|
||||
v_flags2 => ["--exe t/$Last_Self->{name}.cpp"],
|
||||
) if $Last_Self->{v3};
|
||||
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
|
||||
) if $Self->{v3};
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
compile (
|
||||
v_flags2 => ["-Wno-IMPLICIT"],
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ compile (
|
|||
%Warning-IMPLICIT: Use .* to disable this message.
|
||||
%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: nt0
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -57,4 +57,3 @@ module m2
|
|||
end
|
||||
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ compile (
|
|||
make_main => 0,
|
||||
v_flags2 => ["--lint-only"],
|
||||
verilator_make_gcc => 0,
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
foreach my $file (glob("obj_dir/*t_lint_only*")) {
|
||||
foreach my $file (glob("$Self->{obj_dir}/*t_lint_only*")) {
|
||||
next if $file =~ /simx_compile.log/; # Made by driver.pl, not Verilator
|
||||
$Last_Self->error("%Error: Created $file, but --lint-only shouldn't create files");
|
||||
$Self->error("%Error: Created $file, but --lint-only shouldn't create files");
|
||||
}
|
||||
|
||||
ok(1);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ compile (
|
|||
'.*%Warning-WIDTH: t/t_lint_restore_bad.v:\d+: Operator ASSIGN expects 5 bits on the Assign RHS, but Assign RHS\'s CONST generates 64 bits.
|
||||
%Warning-WIDTH: Use .*
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -111,4 +111,3 @@ module example (/*AUTOARG*/
|
|||
|
||||
assign LogicImm = LowLogicImm & HighLogicImm;
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
compile (
|
||||
make_top_shell => 0,
|
||||
make_main => 0,
|
||||
v_flags2 => ["--exe t/$Last_Self->{name}.cpp"],
|
||||
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -40,4 +40,3 @@ module t_math_imm2 (/*AUTOARG*/
|
|||
|
||||
assign LogicImm = LowLogicImm & HighLogicImm;
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
|
|
@ -15,7 +15,7 @@ execute (
|
|||
expect=>
|
||||
'\*-\* All Finished \*-\*
|
||||
Goodbye world, at cycle \d+.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
nc=>0,
|
||||
expect=>
|
||||
'%Error: t/t_mem_multi_io_bad.v:\d+: Arrayed variables may not be inputs nor outputs
|
||||
|
|
|
|||
|
|
@ -10,4 +10,3 @@ module t (/*AUTOARG*/
|
|||
reg [1:0] dim1 [1:0];
|
||||
output dim1; // Bad, can't output multi-dim
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
nc=>0, # Need to get it not to give the prompt
|
||||
expect=>
|
||||
'%Error: t/t_mem_multi_ref_bad.v:\d+: Illegal bit select; variable already selected, or bad dimension
|
||||
|
|
|
|||
|
|
@ -19,4 +19,3 @@ module t (/*AUTOARG*/);
|
|||
end
|
||||
|
||||
endmodule
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_mem_multidim.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--Ox':''],
|
||||
v_flags2 => [$Self->{v3}?'--Ox':''],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_mem_multidim.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--sp --trace':''],
|
||||
v_flags2 => [$Self->{v3}?'--sp --trace':''],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ compile (
|
|||
v_flags2 => ["--stats"],
|
||||
);
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
file_grep ($Last_Self->{stats}, qr/Optimizations, Delayed shared-sets\s+14/i);
|
||||
if ($Self->{v3}) {
|
||||
file_grep ($Self->{stats}, qr/Optimizations, Delayed shared-sets\s+14/i);
|
||||
}
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
compile (
|
||||
make_top_shell => 0,
|
||||
make_main => 0,
|
||||
v_flags2 => ["--exe t/$Last_Self->{name}.cpp"],
|
||||
) if $Last_Self->{v3};
|
||||
v_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"],
|
||||
) if $Self->{v3};
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
nc=>0, # Need to get it not to give the prompt
|
||||
expect=>
|
||||
'%Error: t/t_mod_dup_bad.v:\d+: Duplicate declaration of module: a
|
||||
%Error: t/t_mod_dup_bad.v:\d+: ... Location of original declaration
|
||||
.*
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
|
||||
compile (
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $fail = ($Last_Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
my $fail = ($Self->{v3} && verilator_version() !~ /\(ord\)/);
|
||||
|
||||
compile (
|
||||
);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_order_wireloop.v:\d+: Wire inputs its own output, creating circular logic .wire x=x.
|
||||
',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
compile (
|
||||
v_flags2 => ["-Wno-REDEFMACRO"],
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ compile (
|
|||
%Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Redefining existing define: DUPP, with different value: .*
|
||||
%Warning-REDEFMACRO: t/t_pp_dupdef.v:\d+: Previous definition is here, with value: .*
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ compile (
|
|||
expect=>
|
||||
'%Error: t/t_pp_misdef_bad.v:\d+: Define or directive not defined: `NOTDEF
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
$golden_out ||= "t/$Last_Self->{name}.out";
|
||||
my $stdout_filename = "obj_dir/$Last_Self->{name}__test.vpp";
|
||||
$golden_out ||= "t/$Self->{name}.out";
|
||||
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
|
||||
|
||||
if (!$Last_Self->{v3}) {
|
||||
if (!$Self->{v3}) {
|
||||
ok(1);
|
||||
} else {
|
||||
compile (
|
||||
|
|
@ -17,7 +17,7 @@ if (!$Last_Self->{v3}) {
|
|||
verilator_make_gcc=>0,
|
||||
stdout_filename => $stdout_filename,
|
||||
);
|
||||
ok(preproc_check($Last_Self->{top_filename}, $stdout_filename)
|
||||
ok(preproc_check($Self->{top_filename}, $stdout_filename)
|
||||
&& files_identical($stdout_filename, $golden_out));
|
||||
}
|
||||
|
||||
|
|
@ -46,14 +46,14 @@ sub preproc_check {
|
|||
if ($line =~ /^Line_Preproc_Check\s+(\d+)/) {
|
||||
my $linecmt = $1;
|
||||
my $check = shift @Line_Checks;
|
||||
if (!$check) { $Last_Self->error("$filename2:$.: Extra Line_Preproc_Check\n"); }
|
||||
if ($linecmt != $check) { $Last_Self->error("$filename2:$.: __LINE__ inserted $linecmt, exp=$check\n"); }
|
||||
if ($lineno != $check) { $Last_Self->error("$filename2:$.: __LINE__ on `line $lineno, exp=$check\n"); }
|
||||
if (!$check) { $Self->error("$filename2:$.: Extra Line_Preproc_Check\n"); }
|
||||
if ($linecmt != $check) { $Self->error("$filename2:$.: __LINE__ inserted $linecmt, exp=$check\n"); }
|
||||
if ($lineno != $check) { $Self->error("$filename2:$.: __LINE__ on `line $lineno, exp=$check\n"); }
|
||||
}
|
||||
}
|
||||
$fh->close;
|
||||
}
|
||||
if ($Line_Checks[0]) { $Last_Self->error("$filename2: Missing a Line_Preproc_Check\n"); }
|
||||
if ($Line_Checks[0]) { $Self->error("$filename2: Missing a Line_Preproc_Check\n"); }
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,21 +6,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
top_filename("obj_dir/$Last_Self->{name}.v");
|
||||
top_filename("$Self->{obj_dir}/$Self->{name}.v");
|
||||
|
||||
# Rather then having to maintain a new .v and .out, simply add returns
|
||||
# to all lines of the existing t_preproc test.
|
||||
|
||||
$golden_out ||= "obj_dir/$Last_Self->{name}.out";
|
||||
$golden_out ||= "$Self->{obj_dir}/$Self->{name}.out";
|
||||
|
||||
{
|
||||
my $wholefile = file_contents("t/t_preproc.v");
|
||||
my $wholefile = file_contents("$Self->{t_dir}/t_preproc.v");
|
||||
$wholefile =~ s/\n/\r\n/og;
|
||||
write_wholefile("obj_dir/$Last_Self->{name}.v", $wholefile);
|
||||
write_wholefile("$Self->{obj_dir}/$Self->{name}.v", $wholefile);
|
||||
}
|
||||
{
|
||||
my $wholefile = file_contents("t/t_preproc.out");
|
||||
$wholefile =~ s!t/t_preproc.v!obj_dir/t_preproc_dos.v!og; # Fix `line's
|
||||
my $wholefile = file_contents("$Self->{t_dir}/t_preproc.out");
|
||||
$wholefile =~ s!t/t_preproc.v!$Self->{obj_dir}/t_preproc_dos.v!og; # Fix `line's
|
||||
write_wholefile($golden_out, $wholefile);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $stdout_filename = "obj_dir/$Last_Self->{name}__test.vpp";
|
||||
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
|
||||
|
||||
top_filename("t/t_preproc_psl.v");
|
||||
|
||||
if (!$Last_Self->{v3}) {
|
||||
if (!$Self->{v3}) {
|
||||
ok(1);
|
||||
} else {
|
||||
compile (
|
||||
|
|
@ -18,7 +18,7 @@ if (!$Last_Self->{v3}) {
|
|||
verilator_make_gcc=>0,
|
||||
stdout_filename => $stdout_filename,
|
||||
);
|
||||
ok(files_identical($stdout_filename, "t/$Last_Self->{name}.out"));
|
||||
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
my $stdout_filename = "obj_dir/$Last_Self->{name}__test.vpp";
|
||||
my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp";
|
||||
|
||||
top_filename("t/t_preproc_psl.v");
|
||||
|
||||
if (!$Last_Self->{v3}) {
|
||||
if (!$Self->{v3}) {
|
||||
ok(1);
|
||||
} else {
|
||||
compile (
|
||||
|
|
@ -18,7 +18,7 @@ if (!$Last_Self->{v3}) {
|
|||
verilator_make_gcc=>0,
|
||||
stdout_filename => $stdout_filename,
|
||||
);
|
||||
ok(files_identical($stdout_filename, "t/$Last_Self->{name}.out"));
|
||||
ok(files_identical($stdout_filename, "t/$Self->{name}.out"));
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# General Public License or the Perl Artistic License.
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--assert':($Last_Self->{nc}?'+assert':'')],
|
||||
v_flags2 => [$Self->{v3}?'--assert':($Self->{nc}?'+assert':'')],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_psl_basic.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'--psl --sp --coverage-user':''],
|
||||
v_flags2 => [$Self->{v3}?'--psl --sp --coverage-user':''],
|
||||
);
|
||||
|
||||
execute (
|
||||
|
|
@ -17,9 +17,9 @@ execute (
|
|||
);
|
||||
|
||||
# Allow old Perl format dump, or new binary dump
|
||||
file_grep ($Last_Self->{coverage_filename}, qr/(,o=>'cover'.*,c=>2\)|o.cover.* 2\n)/);
|
||||
file_grep ($Last_Self->{coverage_filename}, qr/(DefaultClock.*,c=>1\)|DefaultClock.* 1\n)/);
|
||||
file_grep ($Last_Self->{coverage_filename}, qr/(ToggleLogIf.*,c=>9\)|ToggleLogIf.* 9\n)/);
|
||||
file_grep ($Self->{coverage_filename}, qr/(,o=>'cover'.*,c=>2\)|o.cover.* 2\n)/);
|
||||
file_grep ($Self->{coverage_filename}, qr/(DefaultClock.*,c=>1\)|DefaultClock.* 1\n)/);
|
||||
file_grep ($Self->{coverage_filename}, qr/(ToggleLogIf.*,c=>9\)|ToggleLogIf.* 9\n)/);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ compile (
|
|||
'%Error: t/t_select_bad_msb.v:\d+: Unsupported: MSB < LSB of bit range: 0<22
|
||||
%Error: t/t_select_bad_msb.v:\d+: Unsupported: MSB < LSB of bit extract: 1<4
|
||||
%Error: Exiting due to.*',
|
||||
) if $Last_Self->{v3};
|
||||
) if $Self->{v3};
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
compile (
|
||||
v_flags2 => ["--lint-only"],
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_select_bad_range.v:\d+: Selection index out of range: 44:44 outside 43:0
|
||||
%Error: t/t_select_bad_range.v:\d+: Selection index out of range: 44:41 outside 43:0
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
compile (
|
||||
v_flags2 => ["--lint-only"],
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_select_bad_range2.v:\d+: Selection index out of range: 3:2 outside 1:0
|
||||
%Error: Exiting due to.*',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
unlink("obj_dir/t_sys_file_basic_test.log");
|
||||
unlink("$Self->{obj_dir}/t_sys_file_basic_test.log");
|
||||
|
||||
compile (
|
||||
v_flags2 => ['+incdir+../include'],
|
||||
|
|
@ -16,7 +16,7 @@ execute (
|
|||
check_finished=>1,
|
||||
);
|
||||
|
||||
file_grep ("obj_dir/t_sys_file_basic_test.log",
|
||||
file_grep ("$Self->{obj_dir}/t_sys_file_basic_test.log",
|
||||
qr/\[0\] hello v=12345667
|
||||
\[0\] Hello2
|
||||
/);
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ module t;
|
|||
|
||||
`ifdef AUTOFLUSH
|
||||
// The "w" is required so we get a FD not a MFD
|
||||
file = $fopen("obj_dir/t_sys_file_autoflush.log","w");
|
||||
file = $fopen("obj_dir/t_sys_file_basic/t_sys_file_autoflush.log","w");
|
||||
`else
|
||||
// The "w" is required so we get a FD not a MFD
|
||||
file = $fopen("obj_dir/t_sys_file_basic_test.log","w");
|
||||
file = $fopen("obj_dir/t_sys_file_basic/t_sys_file_basic_test.log","w");
|
||||
`endif
|
||||
if ($feof(file)) $stop;
|
||||
|
||||
|
|
@ -49,7 +49,8 @@ module t;
|
|||
|
||||
begin
|
||||
// Check for opening errors
|
||||
file = $fopen("obj_dir/DOES_NOT_EXIST","r"); // The "r" is required so we get a FD not a MFD
|
||||
// The "r" is required so we get a FD not a MFD
|
||||
file = $fopen("obj_dir/t_sys_file_basic/DOES_NOT_EXIST","r");
|
||||
if (|file) $stop; // Should not exist, IE must return 0
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
unlink("obj_dir/t_sys_file_scan_test.log");
|
||||
unlink("$Self->{obj_dir}/t_sys_file_scan_test.log");
|
||||
|
||||
compile (
|
||||
);
|
||||
|
|
@ -15,7 +15,7 @@ execute (
|
|||
check_finished=>1,
|
||||
);
|
||||
|
||||
file_grep ("obj_dir/t_sys_file_scan_test.log",
|
||||
file_grep ("$Self->{obj_dir}/t_sys_file_scan_test.log",
|
||||
"# a
|
||||
1
|
||||
");
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ module t;
|
|||
|
||||
initial begin
|
||||
infile = $fopen("t/t_sys_file_scan_input.dat", "r");
|
||||
outfile = $fopen("obj_dir/t_sys_file_scan_test.log", "w");
|
||||
outfile = $fopen("obj_dir/t_sys_file_scan/t_sys_file_scan_test.log", "w");
|
||||
|
||||
count = 1234;
|
||||
$display("count == %d, infile %d, outfile %d", count, infile, outfile);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ compile (
|
|||
);
|
||||
|
||||
execute (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_sys_readmem_bad_addr.mem:\d+: \$readmem file address beyond bounds of array',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ compile (
|
|||
);
|
||||
|
||||
execute (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_sys_readmem_bad_digit.mem:\d+: \$readmemb \(binary\) file contains hex characters',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ compile (
|
|||
);
|
||||
|
||||
execute (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_sys_readmem_bad_end.mem:\d+: \$readmem file ended before specified ending-address',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ compile (
|
|||
);
|
||||
|
||||
execute (
|
||||
fails=>$Last_Self->{v3},
|
||||
fails=>$Self->{v3},
|
||||
expect=>
|
||||
'%Error: t/t_sys_readmem_bad_NOTFOUND.mem:\d+: \$readmem file not found',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,17 +9,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
top_filename("t/t_trace_ena.v");
|
||||
|
||||
compile (
|
||||
v_flags2 => [$Last_Self->{v3}?'-trace':''],
|
||||
v_flags2 => [$Self->{v3}?'-trace':''],
|
||||
);
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
file_grep ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/c_trace_on\"/x);
|
||||
file_grep_not ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/_trace_off\"/x);
|
||||
file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x);
|
||||
if ($Self->{v3}) {
|
||||
file_grep ("$Self->{obj_dir}/V$Self->{name}__Trace__Slow.cpp", qr/c_trace_on\"/x);
|
||||
file_grep_not ("$Self->{obj_dir}/V$Self->{name}__Trace__Slow.cpp", qr/_trace_off\"/x);
|
||||
file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x);
|
||||
}
|
||||
|
||||
ok(1);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue