Changed TIMESCALEMOD from error into a warning. (#2838)
This commit is contained in:
parent
f79e59b226
commit
12eb4e85ac
1
Changes
1
Changes
|
|
@ -14,6 +14,7 @@ Verilator 4.201 devel
|
||||||
**Minor:**
|
**Minor:**
|
||||||
|
|
||||||
* Add EOFNEWLINE warning when missing a newline at EOF.
|
* 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.
|
* Verilated signals now use VlWide and VlPacked in place of C arrays.
|
||||||
* Fix class unpacked-array compile error (#2774). [Iru Cai]
|
* Fix class unpacked-array compile error (#2774). [Iru Cai]
|
||||||
* Fix exceeding command-line ar limit (#2834). [Yinan Xu]
|
* Fix exceeding command-line ar limit (#2834). [Yinan Xu]
|
||||||
|
|
|
||||||
|
|
@ -4885,16 +4885,18 @@ correctly.
|
||||||
|
|
||||||
=item TIMESCALEMOD
|
=item TIMESCALEMOD
|
||||||
|
|
||||||
Error that `timescale is used in some but not all modules.
|
Warns that `timescale is used in some but not all modules. Recommend using
|
||||||
Recommend using --timescale argument, or in front of all modules use:
|
--timescale argument, or in front of all modules use:
|
||||||
|
|
||||||
`include "timescale.vh"
|
`include "timescale.vh"
|
||||||
|
|
||||||
Then in that file set the timescale.
|
Then in that file set the timescale.
|
||||||
|
|
||||||
This is an error due to IEEE specifications, but it may be disabled similar
|
It may be disabled similar to other warnings. Ignoring this warning may
|
||||||
to warnings. Ignoring this error may result in a module having an
|
result in a module having an unexpected timescale.
|
||||||
unexpected timescale.
|
|
||||||
|
IEEE recommends this be an error, for that behavior use
|
||||||
|
-Werror-TIMESCALEMOD.
|
||||||
|
|
||||||
=item UNDRIVEN
|
=item UNDRIVEN
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,7 @@ public:
|
||||||
// Later -Werror- options may make more of these.
|
// Later -Werror- options may make more of these.
|
||||||
bool pretendError() const {
|
bool pretendError() const {
|
||||||
return (m_e == ASSIGNIN || m_e == BLKANDNBLK || m_e == BLKLOOPINIT || m_e == CONTASSREG
|
return (m_e == ASSIGNIN || m_e == BLKANDNBLK || m_e == BLKLOOPINIT || m_e == CONTASSREG
|
||||||
|| m_e == IMPURE || m_e == PKGNODECL || m_e == PROCASSWIRE //
|
|| m_e == IMPURE || m_e == PKGNODECL || m_e == PROCASSWIRE); // Says IEEE
|
||||||
|| m_e == TIMESCALEMOD); // Says IEEE
|
|
||||||
}
|
}
|
||||||
// Warnings to mention manual
|
// Warnings to mention manual
|
||||||
bool mentionManual() const {
|
bool mentionManual() const {
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ void V3LinkLevel::timescaling(const ModVec& mods) {
|
||||||
&& !(VN_IS(nodep, Package) && VN_CAST(nodep, Package)->isDollarUnit())) {
|
&& !(VN_IS(nodep, Package) && VN_CAST(nodep, Package)->isDollarUnit())) {
|
||||||
nodep->v3warn(TIMESCALEMOD,
|
nodep->v3warn(TIMESCALEMOD,
|
||||||
"Timescale missing on this module as other modules have "
|
"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'
|
<< nodep->warnContextPrimary() << '\n'
|
||||||
<< modTimedp->warnOther()
|
<< modTimedp->warnOther()
|
||||||
<< "... Location of module with timescale\n"
|
<< "... Location of module with timescale\n"
|
||||||
|
|
|
||||||
|
|
@ -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;
|
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;
|
12 | module t;
|
||||||
| ^
|
| ^
|
||||||
|
... Use "/* verilator lint_off TIMESCALEMOD */" and lint_on around source to disable this message.
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue