diff --git a/Changes b/Changes index 19c7ee3a6..0ff236eaf 100644 --- a/Changes +++ b/Changes @@ -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 diff --git a/bin/verilator b/bin/verilator index b74f43892..31299c0b2 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1075,27 +1075,6 @@ submodules will be named I__DOT__I 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*/ - -Disable the specified warning message for any warnings following the comment. - -=item /*verilator lint_on I*/ - -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*/ -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*/ -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 diff --git a/src/V3Error.h b/src/V3Error.h index a7160866b..6e2640026 100644 --- a/src/V3Error.h +++ b/src/V3Error.h @@ -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", diff --git a/src/V3LinkLevel.cpp b/src/V3LinkLevel.cpp index 5cf0d2074..275d769e0 100644 --- a/src/V3LinkLevel.cpp +++ b/src/V3LinkLevel.cpp @@ -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: " - <prettyName()<<" and "<prettyName()); + if (topp) nodep->v3warn(MULTITOP, "Unsupported: Multiple top level modules: " + <prettyName()<<" and "<prettyName()); topp = nodep; } vec.push_back(nodep); diff --git a/test_regress/t/t_mod_bad_twotop.pl b/test_regress/t/t_mod_bad_twotop.pl index 5d60d4b35..d5f9d16bf 100755 --- a/test_regress/t/t_mod_bad_twotop.pl +++ b/test_regress/t/t_mod_bad_twotop.pl @@ -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.*', );