Convert bad tests to --lint-only
git-svn-id: file://localhost/svn/verilator/trunk/verilator@911 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
parent
77261cce5b
commit
ea8445d187
|
@ -575,7 +575,7 @@ V3Options::V3Options() {
|
||||||
m_exe = false;
|
m_exe = false;
|
||||||
m_ignc = false;
|
m_ignc = false;
|
||||||
m_l2Name = true;
|
m_l2Name = true;
|
||||||
m_lintOnly = true;
|
m_lintOnly = false;
|
||||||
m_makeDepend = true;
|
m_makeDepend = true;
|
||||||
m_makePhony = false;
|
m_makePhony = false;
|
||||||
m_outFormatOk = false;
|
m_outFormatOk = false;
|
||||||
|
|
|
@ -433,18 +433,20 @@ void process () {
|
||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("dead.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("dead.tree"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix very deep expressions
|
if (!v3Global.opt.lintOnly()) {
|
||||||
// Mark evaluation functions as member functions, if needed.
|
// Fix very deep expressions
|
||||||
V3Depth::depthAll(v3Global.rootp());
|
// Mark evaluation functions as member functions, if needed.
|
||||||
//v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("depth.tree"));
|
V3Depth::depthAll(v3Global.rootp());
|
||||||
|
//v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("depth.tree"));
|
||||||
|
|
||||||
// Branch prediction
|
// Branch prediction
|
||||||
V3Branch::branchAll(v3Global.rootp());
|
V3Branch::branchAll(v3Global.rootp());
|
||||||
|
|
||||||
// Add C casts when longs need to become long-long and vice-versa
|
// Add C casts when longs need to become long-long and vice-versa
|
||||||
// Note depth may insert something needing a cast, so this must be last.
|
// Note depth may insert something needing a cast, so this must be last.
|
||||||
V3Cast::castAll(v3Global.rootp());
|
V3Cast::castAll(v3Global.rootp());
|
||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("cast.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("cast.tree"));
|
||||||
|
}
|
||||||
|
|
||||||
V3Error::abortIfErrors();
|
V3Error::abortIfErrors();
|
||||||
|
|
||||||
|
@ -488,8 +490,8 @@ int main(int argc, char** argv, char** env) {
|
||||||
if (v3Global.opt.coverage() && !v3Global.opt.systemPerl() && !v3Global.opt.lintOnly()) {
|
if (v3Global.opt.coverage() && !v3Global.opt.systemPerl() && !v3Global.opt.lintOnly()) {
|
||||||
v3fatal("Unsupported: Coverage analysis requires --sp output.");
|
v3fatal("Unsupported: Coverage analysis requires --sp output.");
|
||||||
}
|
}
|
||||||
if (!v3Global.opt.outFormatOk() && !v3Global.opt.preprocOnly()) {
|
if (!v3Global.opt.outFormatOk() && !v3Global.opt.preprocOnly() && !v3Global.opt.lintOnly()) {
|
||||||
v3fatal("verilator: Need --cc, --sc, --sp or --E option");
|
v3fatal("verilator: Need --cc, --sc, --sp, --lint-only or --E option");
|
||||||
}
|
}
|
||||||
|
|
||||||
V3Error::abortIfErrors();
|
V3Error::abortIfErrors();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_case_default_bad.v:\d+: Multiple default statements in case statement.
|
'%Error: t/t_case_default_bad.v:\d+: Multiple default statements in case statement.
|
||||||
|
|
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_case_genx_bad.v:\d+: Use of x/\? constant in generate case statement, \(no such thing as \'generate casez\'\)
|
'%Error: t/t_case_genx_bad.v:\d+: Use of x/\? constant in generate case statement, \(no such thing as \'generate casez\'\)
|
||||||
|
|
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_case_x_bad.v:\d+: Use of x/. constant in case statement, \(perhaps intended casex/casez\)
|
'%Error: t/t_case_x_bad.v:\d+: Use of x/. constant in case statement, \(perhaps intended casex/casez\)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_display_bad.v:\d+: Missing arguments for \$display format
|
'%Error: t/t_display_bad.v:\d+: Missing arguments for \$display format
|
||||||
|
|
|
@ -10,6 +10,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
top_filename("t/t_flag_werror.v");
|
top_filename("t/t_flag_werror.v");
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>$Last_Self->{v3},
|
fails=>$Last_Self->{v3},
|
||||||
expect=>
|
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: t/t_flag_werror.v:\d+: Operator ASSIGNW expects 4 bits on the Assign RHS, but Assign RHS.s CONST generates 6 bits.
|
||||||
|
|
|
@ -10,6 +10,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
top_filename("t/t_flag_werror.v");
|
top_filename("t/t_flag_werror.v");
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>$Last_Self->{v3},
|
fails=>$Last_Self->{v3},
|
||||||
verilator_flags=> [qw(-sp -Werror-WIDTH)],
|
verilator_flags=> [qw(-sp -Werror-WIDTH)],
|
||||||
expect=>
|
expect=>
|
||||||
|
|
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_func_bad.v:\d+: Too few arguments in function call
|
'%Error: t/t_func_bad.v:\d+: Too few arguments in function call
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>$Last_Self->{v3},
|
fails=>$Last_Self->{v3},
|
||||||
expect=>
|
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: t/t_func_bad_width.v:\d+: Operator FUNCREF expects 40 bits on the Function Argument, but Function Argument.s VARREF generates 39 bits.
|
||||||
|
|
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'.*%Error: t/t_gen_var_bad.v:\d+: Non-genvar used in generate for: i
|
'.*%Error: t/t_gen_var_bad.v:\d+: Non-genvar used in generate for: i
|
||||||
|
|
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_inst_array_bad.v:19: Port connection __pinNumber2 as part of a module instance array requires 1 or 8 bits, but connection\'s VARREF generates 9 bits.
|
'%Error: t/t_inst_array_bad.v:19: Port connection __pinNumber2 as part of a module instance array requires 1 or 8 bits, but connection\'s VARREF generates 9 bits.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2004 by Wilson Snyder. This program is free software; you can
|
# Copyright 2004 by Wilson Snyder. This program is free software; you can
|
||||||
|
@ -10,6 +10,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
top_filename("t/t_inst_overwide.v");
|
top_filename("t/t_inst_overwide.v");
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
make_top_shell=>0,
|
make_top_shell=>0,
|
||||||
verilator_flags=> [qw(-sp)],
|
verilator_flags=> [qw(-sp)],
|
||||||
verilator_make_gcc=>0,
|
verilator_make_gcc=>0,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_pp_misdef_bad.v:11: Define or directive not defined: `NOTDEF
|
'%Error: t/t_pp_misdef_bad.v:11: Define or directive not defined: `NOTDEF
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>$Last_Self->{v3},
|
fails=>$Last_Self->{v3},
|
||||||
expect=>
|
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:44 outside 43:0
|
||||||
|
|
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>$Last_Self->{v3},
|
fails=>$Last_Self->{v3},
|
||||||
expect=>
|
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+: Declaration of signal hides declaration in upper scope: top
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# $Id:$
|
# $Id$
|
||||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
#
|
#
|
||||||
# Copyright 2005 by Wilson Snyder. This program is free software; you can
|
# Copyright 2005 by Wilson Snyder. This program is free software; you can
|
||||||
|
@ -8,6 +8,7 @@ if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
|
v_flags2 => ["--lint-only"],
|
||||||
fails=>1,
|
fails=>1,
|
||||||
expect=>
|
expect=>
|
||||||
'%Error: t/t_var_in_assign_bad.v:\d+: Assigning to input variable: value
|
'%Error: t/t_var_in_assign_bad.v:\d+: Assigning to input variable: value
|
||||||
|
|
Loading…
Reference in New Issue