Ignore `uselib to end-of-line, bug1634.

This commit is contained in:
Wilson Snyder 2019-12-12 20:53:58 -05:00
parent c62c152048
commit 39950d16d0
5 changed files with 42 additions and 1 deletions

View File

@ -8,6 +8,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
*** Support string compare, icompare, ato* methods, bug1606. [Yutetsu TAKATSUKASA]
**** Ignore `uselib to end-of-line, bug1634. [Frederic Antonin]
**** Update FST trace API for better performance.
**** Fix little endian cell ranges, bug1631. [Julien Margetts]

View File

@ -3316,7 +3316,7 @@ that Verilator will print a list of known scopes to help your debugging.
=head2 Floating Point
Floating Point (real) numbers are supported.
Short floating point (shortreal) numbers are converted to real.
=head2 Latches
@ -3506,6 +3506,11 @@ Assignment patterns with order based, default, constant integer (array) or
member identifier (struct/union) keys are supported. Data type keys and
keys which are computed from a constant expression are not supported.
=item `uselib
Uselib, a vendor specific library specification method, is ignored along
with anything following it until the end of that line.
=item cast operator
Casting is supported only between simple scalar types, signed and unsigned,

View File

@ -931,6 +931,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5}
FL_BRK; } // Rest handled by preproc
"`suppress_faults" { FL_FWD; FL_BRK; } // Verilog-XL compatibility
"`timescale"{ws}+[^\n\r]* { FL_FWD; FL_BRK; } // Verilog spec - not supported
"`uselib"{ws}+[^\n\r]* { FL_FWD; FL_BRK; } // Verilog-XL compatibility
/* See also setLanguage below */
"`begin_keywords"[ \t]*\"1364-1995\" { FL_FWD; yy_push_state(V95); PARSEP->pushBeginKeywords(YY_START); FL_BRK; }

16
test_regress/t/t_mod_uselib.pl Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2010 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.
scenarios(simulator => 1);
compile(
);
ok(1);
1;

View File

@ -0,0 +1,17 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2019 by Wilson Snyder.
module t (/*AUTOARG*/);
// // `uselib {dir=<lib_diry> | file=<lib_file> | libext=<file_ext> | lib=<lib_name>
`uselib libext=.v
s s ();
endmodule
module s;
initial begin
$write("*-* All Finished *-*\n");
$finish;
end
endmodule