Make error code for MULTITOP and document

git-svn-id: file://localhost/svn/verilator/trunk/verilator@875 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder 2007-01-18 14:30:45 +00:00
parent b6f2b5b46a
commit a583592cd4
5 changed files with 45 additions and 33 deletions

View File

@ -5,7 +5,7 @@ indicates the contributor was also the author of the fix; Thanks!
* Verilator 3.632 1/17/2007
*** Add /*verilator isolate_asignments*/ attribute. [Mike Shinkarovsky]
*** Add /*verilator isolate_assignments*/ attribute. [Mike Shinkarovsky]
* Verilator 3.631 1/2/2007

View File

@ -1075,27 +1075,6 @@ submodules will be named I<submodule>__DOT__I<subsignal> as C++ does not
allow "." in signal names. SystemPerl when tracing such signals will
replace the __DOT__ with the period.
=item /*verilator lint_off I<msg>*/
Disable the specified warning message for any warnings following the comment.
=item /*verilator lint_on I<msg>*/
Re-enable the specified warning message for any warnings following the comment.
=item /*verilator no_inline_task*/
Used in a function or task variable definition section to specify the
function or task should not be inlined into where it is used. This may
reduce the size of the final executable when a task is used a very large
number of times. For this flag to work, the task and tasks below it must
be pure; they cannot reference any variables outside the task itself.
=item /*verilator sc_clock*/
Used after a input declaration to indicate the signal should be declared in
SystemC as a sc_clock instead of a bool.
=item /*verilator isolate_asignments*/
Used after a signal declaration to indicate the assignments to this signal
@ -1131,15 +1110,21 @@ It would then internally break it into (sort of):
end
end
=item /*verilator tracing_off*/
=item /*verilator lint_off I<msg>*/
Disable waveform tracing for all future signals that are declared in this
module. Often this is placed just after a primitive's module statement, so
that the entire module is not traced.
Disable the specified warning message for any warnings following the comment.
=item /*verilator tracing_on*/
=item /*verilator lint_on I<msg>*/
Re-enable waveform tracing for all future signals that are declared.
Re-enable the specified warning message for any warnings following the comment.
=item /*verilator no_inline_task*/
Used in a function or task variable definition section to specify the
function or task should not be inlined into where it is used. This may
reduce the size of the final executable when a task is used a very large
number of times. For this flag to work, the task and tasks below it must
be pure; they cannot reference any variables outside the task itself.
=item /*verilator public*/ (variable)
@ -1175,6 +1160,21 @@ Verilator automatically sets this attribute when the module contains any
public signals or `systemc_ directives. Also set for all modules when
using the --public switch.
=item /*verilator sc_clock*/
Used after a input declaration to indicate the signal should be declared in
SystemC as a sc_clock instead of a bool.
=item /*verilator tracing_off*/
Disable waveform tracing for all future signals that are declared in this
module. Often this is placed just after a primitive's module statement, so
that the entire module is not traced.
=item /*verilator tracing_on*/
Re-enable waveform tracing for all future signals that are declared.
=back
=head1 LANGUAGE LIMITATIONS
@ -1463,6 +1463,17 @@ Warns that the specified signal comes from multiple always blocks. This is
often unsupported by synthesis tools, and is considered bad style. It will
also cause longer runtimes due to reduced optimizations.
=item MULTITOP
Error that there are multiple top level modules, that is modules not
instantiated by any other module. Verilator only supports a single top
level, if you need more, create a module that wraps all of the top modules.
Often this error is because some low level cell is being read in, but is
not really needed. The best solution is to insure that each module is in a
unique file by the same name. Otherwise, make sure all library files are
read in as libraries with -v, instead of automatically with -y.
=item TASKNSVAR
Error when a call to a task or function has a output from that task tied to

View File

@ -37,6 +37,7 @@ public:
FATAL, // Kill the program
ERROR, // General error out, can't suppress
// Error codes:
MULTITOP, // Error: Multiple top level modules
TASKNSVAR, // Error: Task I/O not simple
// Warning codes:
FIRST_WARN, // Just a code so the program knows where to start warnings
@ -71,7 +72,7 @@ public:
const char* names[] = {
// Leading spaces indicate it can't be disabled.
" SUPPRESS", " FATAL", " ERROR",
"TASKNSVAR",
"MULTITOP", "TASKNSVAR",
" FIRST_WARN",
"BLKANDNBLK",
"CASEINCOMPLETE", "CASEOVERLAP", "CASEX", "CMPCONST",

View File

@ -92,8 +92,8 @@ void V3LinkLevel::modSortByLevel() {
AstModule* topp = NULL;
for (AstModule* nodep = v3Global.rootp()->modulesp(); nodep; nodep=nodep->nextp()->castModule()) {
if (nodep->level()<=2) {
if (topp) nodep->v3error("Unsupported: Multiple top level modules: "
<<nodep->prettyName()<<" and "<<topp->prettyName());
if (topp) nodep->v3warn(MULTITOP, "Unsupported: Multiple top level modules: "
<<nodep->prettyName()<<" and "<<topp->prettyName());
topp = nodep;
}
vec.push_back(nodep);

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
# $Id:$
# $Id$
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2003 by Wilson Snyder. This program is free software; you can
@ -11,7 +11,7 @@ compile (
fails=>$Last_Self->{v3},
nc=>0, # Need to get it not to give the prompt
expect=>
'%Error: t/t_mod_bad_twotop.v:\d+: Unsupported: Multiple top level modules: t2 and t
'%Error-MULTITOP: t/t_mod_bad_twotop.v:\d+: Unsupported: Multiple top level modules: t2 and t
%Error: Exiting due to.*',
);