parent
367249ec84
commit
c812a9b18f
|
|
@ -553,7 +553,7 @@ string V3Options::filePath(FileLine* fl, const string& modname, const string& la
|
||||||
// Find a filename to read the specified module name,
|
// Find a filename to read the specified module name,
|
||||||
// using the incdir and libext's.
|
// using the incdir and libext's.
|
||||||
// Return "" if not found.
|
// Return "" if not found.
|
||||||
const string filename = V3Os::filenameCleanup(modname);
|
const string filename = V3Os::filenameCleanup(VName::dehash(modname));
|
||||||
if (!V3Os::filenameIsRel(filename)) {
|
if (!V3Os::filenameIsRel(filename)) {
|
||||||
// filename is an absolute path, so can find getStdPackagePath()
|
// filename is an absolute path, so can find getStdPackagePath()
|
||||||
string exists = filePathCheckOneDir(filename, "");
|
string exists = filePathCheckOneDir(filename, "");
|
||||||
|
|
@ -585,8 +585,8 @@ void V3Options::filePathLookedMsg(FileLine* fl, const string& modname) {
|
||||||
static bool shown_notfound_msg = false;
|
static bool shown_notfound_msg = false;
|
||||||
if (modname.find("__Vhsh") != string::npos) {
|
if (modname.find("__Vhsh") != string::npos) {
|
||||||
std::cerr << V3Error::warnMoreStandalone()
|
std::cerr << V3Error::warnMoreStandalone()
|
||||||
<< "... Unsupported: Name is longer than 127 characters;"
|
<< "... Note: Name is longer than 127 characters; automatic"
|
||||||
<< " automatic file lookup not supported.\n";
|
<< " file lookup may have failed due to OS filename length limits.\n";
|
||||||
std::cerr << V3Error::warnMoreStandalone()
|
std::cerr << V3Error::warnMoreStandalone()
|
||||||
<< "... Suggest putting filename with this module/package"
|
<< "... Suggest putting filename with this module/package"
|
||||||
<< " onto command line instead.\n";
|
<< " onto command line instead.\n";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
#!/usr/bin/env perl
|
||||||
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2003 by Wilson Snyder. This program is free software; you
|
||||||
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
use IO::File;
|
||||||
|
use strict;
|
||||||
|
use vars qw($Self);
|
||||||
|
|
||||||
|
scenarios(vlt => 1);
|
||||||
|
|
||||||
|
my $length = 200;
|
||||||
|
my $long = "long_" x (($length + 4) / 5);
|
||||||
|
|
||||||
|
sub gen_top {
|
||||||
|
my $filename = shift;
|
||||||
|
|
||||||
|
my $fh = IO::File->new(">$filename")
|
||||||
|
or $Self->error("Can't write $filename");
|
||||||
|
$fh->print("// Generated by t_inst_long.pl\n");
|
||||||
|
$fh->print("module t;\n");
|
||||||
|
$fh->print("\n");
|
||||||
|
$fh->print(" ${long} inst ();\n");
|
||||||
|
$fh->print("\n");
|
||||||
|
$fh->print("endmodule\n");
|
||||||
|
$fh->close;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub gen_sub {
|
||||||
|
my $filename = shift;
|
||||||
|
|
||||||
|
my $fh = IO::File->new(">$filename")
|
||||||
|
or $Self->error("Can't write $filename");
|
||||||
|
$fh->print("// Generated by t_inst_long.pl\n");
|
||||||
|
$fh->print("module ${long};\n");
|
||||||
|
$fh->print("\n");
|
||||||
|
$fh->print(" initial begin\n");
|
||||||
|
$fh->print(" \$write(\"*-* All Finished *-*\\n\");\n");
|
||||||
|
$fh->print(" \$finish;\n");
|
||||||
|
$fh->print(" end\n");
|
||||||
|
$fh->print("endmodule\n");
|
||||||
|
$fh->close;
|
||||||
|
}
|
||||||
|
|
||||||
|
top_filename("$Self->{obj_dir}/t_inst_long.v", $long);
|
||||||
|
|
||||||
|
gen_top($Self->{top_filename});
|
||||||
|
gen_sub("$Self->{obj_dir}/${long}.v");
|
||||||
|
|
||||||
|
compile();
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
%Error: obj_vlt/t_inst_long_bad/t_inst_long.v:4:3: Cannot find file containing module: 'long_long_long_long_long_long___Vhsh1JZCXQVBM1QiASYlLmgTuAXYyUr7VAbJYwVHfiAD'
|
%Error: t/t_inst_long_bad.v:9:3: Cannot find file containing module: 'long_long_long_long_long_long___Vhsh1JZCXQVBM1QiASYlLmgTuAXYyUr7VAbJYwVHfiAD'
|
||||||
4 | long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_ inst ();
|
9 | long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_ inst ();
|
||||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
... Unsupported: Name is longer than 127 characters; automatic file lookup not supported.
|
... Note: Name is longer than 127 characters; automatic file lookup may have failed due to OS filename length limits.
|
||||||
... Suggest putting filename with this module/package onto command line instead.
|
... Suggest putting filename with this module/package onto command line instead.
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -8,49 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
use IO::File;
|
scenarios(linter => 1);
|
||||||
use strict;
|
|
||||||
use vars qw($Self);
|
|
||||||
|
|
||||||
scenarios(vlt => 1);
|
|
||||||
|
|
||||||
my $length = 200;
|
|
||||||
my $long = "long_" x (($length + 4) / 5);
|
|
||||||
|
|
||||||
sub gen_top {
|
|
||||||
my $filename = shift;
|
|
||||||
|
|
||||||
my $fh = IO::File->new(">$filename")
|
|
||||||
or $Self->error("Can't write $filename");
|
|
||||||
$fh->print("// Generated by t_inst_long.pl\n");
|
|
||||||
$fh->print("module t;\n");
|
|
||||||
$fh->print("\n");
|
|
||||||
$fh->print(" ${long} inst ();\n");
|
|
||||||
$fh->print("\n");
|
|
||||||
$fh->print("endmodule\n");
|
|
||||||
$fh->close;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub gen_sub {
|
|
||||||
my $filename = shift;
|
|
||||||
|
|
||||||
my $fh = IO::File->new(">$filename")
|
|
||||||
or $Self->error("Can't write $filename");
|
|
||||||
$fh->print("// Generated by t_inst_long.pl\n");
|
|
||||||
$fh->print("module ${long};\n");
|
|
||||||
$fh->print("\n");
|
|
||||||
$fh->print(" initial begin\n");
|
|
||||||
$fh->print(" \$write(\"*-* All Finished *-*\\n\");\n");
|
|
||||||
$fh->print(" \$finish;\n");
|
|
||||||
$fh->print(" end\n");
|
|
||||||
$fh->print("endmodule\n");
|
|
||||||
$fh->close;
|
|
||||||
}
|
|
||||||
|
|
||||||
top_filename("$Self->{obj_dir}/t_inst_long.v", $long);
|
|
||||||
|
|
||||||
gen_top($Self->{top_filename});
|
|
||||||
gen_sub("$Self->{obj_dir}/${long}.v");
|
|
||||||
|
|
||||||
lint(
|
lint(
|
||||||
fails => 1,
|
fails => 1,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
|
// any use, without warranty, 2012 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
module t;
|
||||||
|
|
||||||
|
long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_ inst ();
|
||||||
|
|
||||||
|
endmodule
|
||||||
Loading…
Reference in New Issue