Changed TIMESCALEMOD from error into a warning. (#2838)

This commit is contained in:
Wilson Snyder 2021-03-16 21:58:15 -04:00
parent f79e59b226
commit 12eb4e85ac
5 changed files with 13 additions and 10 deletions

View File

@ -14,6 +14,7 @@ Verilator 4.201 devel
**Minor:**
* Add EOFNEWLINE warning when missing a newline at EOF.
* Changed TIMESCALEMOD from error into a warning.
* Verilated signals now use VlWide and VlPacked in place of C arrays.
* Fix class unpacked-array compile error (#2774). [Iru Cai]
* Fix exceeding command-line ar limit (#2834). [Yinan Xu]

View File

@ -4885,16 +4885,18 @@ correctly.
=item TIMESCALEMOD
Error that `timescale is used in some but not all modules.
Recommend using --timescale argument, or in front of all modules use:
Warns that `timescale is used in some but not all modules. Recommend using
--timescale argument, or in front of all modules use:
`include "timescale.vh"
Then in that file set the timescale.
This is an error due to IEEE specifications, but it may be disabled similar
to warnings. Ignoring this error may result in a module having an
unexpected timescale.
It may be disabled similar to other warnings. Ignoring this warning may
result in a module having an unexpected timescale.
IEEE recommends this be an error, for that behavior use
-Werror-TIMESCALEMOD.
=item UNDRIVEN

View File

@ -190,8 +190,7 @@ public:
// Later -Werror- options may make more of these.
bool pretendError() const {
return (m_e == ASSIGNIN || m_e == BLKANDNBLK || m_e == BLKLOOPINIT || m_e == CONTASSREG
|| m_e == IMPURE || m_e == PKGNODECL || m_e == PROCASSWIRE //
|| m_e == TIMESCALEMOD); // Says IEEE
|| m_e == IMPURE || m_e == PKGNODECL || m_e == PROCASSWIRE); // Says IEEE
}
// Warnings to mention manual
bool mentionManual() const {

View File

@ -106,7 +106,7 @@ void V3LinkLevel::timescaling(const ModVec& mods) {
&& !(VN_IS(nodep, Package) && VN_CAST(nodep, Package)->isDollarUnit())) {
nodep->v3warn(TIMESCALEMOD,
"Timescale missing on this module as other modules have "
"it (IEEE 1800-2017 3.14.2.2)\n"
"it (IEEE 1800-2017 3.14.2.3)\n"
<< nodep->warnContextPrimary() << '\n'
<< modTimedp->warnOther()
<< "... Location of module with timescale\n"

View File

@ -1,7 +1,8 @@
%Error-TIMESCALEMOD: t/t_timescale_lint_bad.v:7:8: Timescale missing on this module as other modules have it (IEEE 1800-2017 3.14.2.2)
%Warning-TIMESCALEMOD: t/t_timescale_lint_bad.v:7:8: Timescale missing on this module as other modules have it (IEEE 1800-2017 3.14.2.3)
7 | module pre_no_ts;
| ^~~~~~~~~
t/t_timescale_lint_bad.v:12:8: ... Location of module with timescale
t/t_timescale_lint_bad.v:12:8: ... Location of module with timescale
12 | module t;
| ^
... Use "/* verilator lint_off TIMESCALEMOD */" and lint_on around source to disable this message.
%Error: Exiting due to