mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Tests: Cleanup some old -v3 flags to be -vl
This commit is contained in:
parent
d2a27a84cf
commit
3b62f3c9c0
1
test_regress/.gitignore
vendored
1
test_regress/.gitignore
vendored
@ -11,3 +11,4 @@ ncverilog.*
|
||||
INCA_libs
|
||||
logs
|
||||
.vcsmx_rebuild
|
||||
vc_hdrs.h
|
||||
|
@ -33,7 +33,7 @@ ifneq ($(NC_ROOT),)
|
||||
#PRODUCTS += --nc
|
||||
endif
|
||||
|
||||
PRODUCTS += --v3
|
||||
PRODUCTS += --vl
|
||||
|
||||
ifeq ($(VERILATOR_AUTHOR_SITE),1)
|
||||
DRIVER_FLAGS += -j 0
|
||||
@ -57,8 +57,8 @@ nc:
|
||||
|
||||
######################################################################
|
||||
|
||||
v3:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) --v3 --stop
|
||||
vl:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) --vl --stop
|
||||
|
||||
######################################################################
|
||||
|
||||
@ -73,5 +73,4 @@ random_forever:
|
||||
######################################################################
|
||||
maintainer-copy::
|
||||
clean mostlyclean distclean maintainer-clean::
|
||||
-rm -rf obj_dir simv* simx* csrc cov_work INCA_libs *.log *.key logs
|
||||
|
||||
-rm -rf obj_dir simv* simx* csrc cov_work INCA_libs *.log *.key logs vc_hdrs.h
|
||||
|
@ -50,7 +50,7 @@ my $opt_nc;
|
||||
my $opt_optimize;
|
||||
my $opt_stop;
|
||||
my $opt_trace;
|
||||
my $opt_v3;
|
||||
my $opt_vl;
|
||||
my $opt_vcs;
|
||||
my $opt_verbose;
|
||||
my $Opt_Verilated_Debug;
|
||||
@ -69,7 +69,8 @@ if (! GetOptions (
|
||||
"optimize:s" => \$opt_optimize,
|
||||
"stop!" => \$opt_stop,
|
||||
"trace!" => \$opt_trace,
|
||||
"v3!" => \$opt_v3,
|
||||
"v3!" => \$opt_vl, # Old
|
||||
"vl!" => \$opt_vl,
|
||||
"vcs!" => \$opt_vcs,
|
||||
"verbose!" => \$opt_verbose,
|
||||
"verilated_debug!" => \$Opt_Verilated_Debug,
|
||||
@ -82,8 +83,8 @@ $opt_jobs = calc_jobs() if defined $opt_jobs && $opt_jobs==0;
|
||||
|
||||
$Fork->max_proc($opt_jobs);
|
||||
|
||||
if (!$opt_iv && !$opt_vcs && !$opt_nc && !$opt_v3) {
|
||||
$opt_v3 = 1;
|
||||
if (!$opt_iv && !$opt_vcs && !$opt_nc && !$opt_vl) {
|
||||
$opt_vl = 1;
|
||||
}
|
||||
|
||||
if ($#opt_tests<0) {
|
||||
@ -100,7 +101,7 @@ foreach my $testpl (@opt_tests) {
|
||||
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;
|
||||
one_test(pl_filename => $testpl, 'v3'=>1) if $opt_v3;
|
||||
one_test(pl_filename => $testpl, vl=>1, 'v3'=>1) if $opt_vl;
|
||||
}
|
||||
|
||||
$Fork->wait_all(); # Wait for all children to finish
|
||||
@ -256,7 +257,7 @@ sub new {
|
||||
ivrun_flags => [],
|
||||
# VCS
|
||||
vcs => 0,
|
||||
vcs_flags => [split(/\s+/,"+cli -I +define+vcs+1 -q -sverilog")],
|
||||
vcs_flags => [split(/\s+/,"+cli -I +define+vcs+1 -q -sverilog -CFLAGS '-DVCS' ")],
|
||||
vcs_flags2 => [], # Overridden in some sim files
|
||||
# NC
|
||||
nc => 0,
|
||||
@ -264,6 +265,7 @@ sub new {
|
||||
nc_flags2 => [], # Overridden in some sim files
|
||||
ncrun_flags => [split(/\s+/,"+licqueue -q +assert +sv -R")],
|
||||
# Verilator
|
||||
vl => 0,
|
||||
'v3' => 0,
|
||||
verilator_flags => ["-cc",
|
||||
"-Mdir $self->{obj_dir}",
|
||||
@ -276,7 +278,7 @@ sub new {
|
||||
bless $self, $class;
|
||||
|
||||
$self->{mode} ||= "vcs" if $self->{vcs};
|
||||
$self->{mode} ||= "v3" if $self->{v3};
|
||||
$self->{mode} ||= "vl" if $self->{vl};
|
||||
$self->{mode} ||= "nc" if $self->{nc};
|
||||
$self->{mode} ||= "iv" if $self->{iv};
|
||||
$self->{VM_PREFIX} ||= "V".$self->{name};
|
||||
@ -416,7 +418,7 @@ sub compile {
|
||||
fails=>$param{fails},
|
||||
cmd=>\@cmd);
|
||||
}
|
||||
if ($param{v3}) {
|
||||
if ($param{vl}) {
|
||||
$opt_gdb="gdbrun" if defined $opt_gdb;
|
||||
my @verilator_flags = @{$param{verilator_flags}};
|
||||
unshift @verilator_flags, "--gdb $opt_gdb" if $opt_gdb;
|
||||
@ -438,7 +440,7 @@ sub compile {
|
||||
unshift @verilator_flags, "--O".$letters;
|
||||
}
|
||||
|
||||
my @v3args = ("perl","../bin/verilator",
|
||||
my @vlargs = ("perl","../bin/verilator",
|
||||
"--prefix ".$self->{VM_PREFIX},
|
||||
@verilator_flags,
|
||||
@{$param{verilator_flags2}},
|
||||
@ -460,7 +462,7 @@ sub compile {
|
||||
$self->_run(logfile=>"$self->{obj_dir}/vl_compile.log",
|
||||
fails=>$param{fails},
|
||||
expect=>$param{expect},
|
||||
cmd=>\@v3args);
|
||||
cmd=>\@vlargs);
|
||||
return 1 if $self->errors;
|
||||
|
||||
if (!$param{fails} && $param{verilator_make_gcc}) {
|
||||
@ -518,7 +520,7 @@ sub execute {
|
||||
expect=>undef, # vcs expect isn't the same
|
||||
);
|
||||
}
|
||||
if ($param{v3}
|
||||
if ($param{vl}
|
||||
#&& (!$param{needs_v4} || -r "$ENV{VERILATOR_ROOT}/src/V3Gate.cpp")
|
||||
) {
|
||||
$self->_run(logfile=>"$self->{obj_dir}/vl_sim.log",
|
||||
@ -533,7 +535,7 @@ sub execute {
|
||||
sub inline_checks {
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
return 1 if $self->errors;
|
||||
return 1 if !$self->{v3};
|
||||
return 1 if !$self->{vl};
|
||||
|
||||
my %param = (%{$self}, @_); # Default arguments are from $self
|
||||
|
||||
@ -1171,7 +1173,7 @@ Run using VCS.
|
||||
|
||||
Enable test verbose messages.
|
||||
|
||||
=item --v3
|
||||
=item --vl
|
||||
|
||||
Run using Verilator.
|
||||
|
||||
|
@ -50,7 +50,7 @@ test:: nc
|
||||
test:: nonc
|
||||
endif
|
||||
|
||||
test:: v3
|
||||
test:: vl
|
||||
endif
|
||||
|
||||
vgen.v: ./vgen.pl
|
||||
@ -103,7 +103,7 @@ nc_passed.log: vgen.v sim_main.v
|
||||
|
||||
######################################################################
|
||||
|
||||
v3: prep compile v3_passed.log
|
||||
vl: prep compile vl_passed.log
|
||||
|
||||
prep: vgen.v $(VERILATOR_ROOT)/bin/verilator
|
||||
$(PERL) $(VERILATOR_ROOT)/bin/verilator $(VERILATOR_SW) --cc vgen.v
|
||||
@ -111,10 +111,10 @@ prep: vgen.v $(VERILATOR_ROOT)/bin/verilator
|
||||
compile:
|
||||
cd obj_dir ; $(MAKE) -j 3 -f ../Makefile_obj
|
||||
|
||||
v3_passed.log v3_run: prep compile
|
||||
-rm -f v3_passed.log sim.log
|
||||
vl_passed.log vl_run: prep compile
|
||||
-rm -f vl_passed.log sim.log
|
||||
obj_dir/simx | tee sim.log
|
||||
grep -q Finished sim.log && grep Finished sim.log > v3_passed.log
|
||||
grep -q Finished sim.log && grep Finished sim.log > vl_passed.log
|
||||
|
||||
######################################################################
|
||||
maintainer-copy::
|
||||
|
Loading…
Reference in New Issue
Block a user