Change `--lint-only` and `--json-only` to imply `--timing` (#6790).

This commit is contained in:
Wilson Snyder 2025-12-17 19:24:43 -05:00
parent 12ff481689
commit b90865a08a
50 changed files with 685 additions and 377 deletions

View File

@ -15,6 +15,7 @@ Verilator 5.043 devel
* This is the last release supporting the deprecated `--xml-only` and
`--make cmake` options.
* Change `--lint-only` and `--json-only` to imply `--timing` (#6790).
**Other:**

View File

@ -1006,6 +1006,8 @@ Summary:
You may also want the :vlopt:`-Wall` option to enable messages
considered stylistic and not enabled by default.
Implies :vlopt:`--timing` unless :vlopt:`--no-timing` was used.
If the design is not to be completely Verilated, see also the
:vlopt:`--bbox-sys` and :vlopt:`--bbox-unsup` options.

View File

@ -1039,6 +1039,10 @@ void V3Options::notify() VL_MT_DISABLED {
&& !v3Global.opt.serializeOnly());
}
if (m_timing.isDefault()
&& (v3Global.opt.jsonOnly() || v3Global.opt.lintOnly() || v3Global.opt.xmlOnly()))
v3Global.opt.m_timing.setTrueOrFalse(true);
if (trace()) {
// With --trace-vcd, --trace-threads is ignored
if (traceEnabledVcd()) m_traceThreads = 1;

View File

@ -11,7 +11,7 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.extract(in_filename=test.top_filename,
out_filename=test.root + "/docs/gen/ex_SUPERNFIRST_faulty.rst",

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -12,7 +12,7 @@ import vltest_bootstrap
test.scenarios('simulator')
test.scenarios('linter')
test.lint(verilator_flags2=["--lint-only", "-libmap t/t_config_libmap_inc.map"],
test.lint(verilator_flags2=["-libmap t/t_config_libmap_inc.map"],
fails=test.vlt_all,
expect_filename=test.golden_filename)

View File

@ -15,7 +15,7 @@ test.lint(
# We also have dump-tree turned on, so hit a lot of AstNode*::dump() functions
# Likewise XML
v_flags=[
"--lint-only --timing",
"--lint-only",
"--dumpi-tree 9 --dumpi-V3EmitV 9 --debug-emitv", # Dev coverage of the V3EmitV code
"--dump-graph --dumpi-tree-json 9 --no-json-ids"
])

View File

@ -15,6 +15,6 @@ test.top_filename = "t/t_debug_emitv.v"
test.lint(
# We also have dump-tree turned on, so hit a lot of AstNode*::dump() functions
# Likewise XML
v_flags=["--lint-only --dumpi-tree 9 --dump-tree-addrids --timing"])
v_flags=["--lint-only --dumpi-tree 9 --dump-tree-addrids"])
test.passes()

View File

@ -11,8 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--lint-only --timing'],
fails=True,
expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('vlt')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -12,7 +12,7 @@ import vltest_bootstrap
test.scenarios('linter')
test.top_filename = 't/t_event_control_star_never.v'
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.extract(in_filename=test.top_filename,
out_filename=test.root + "/docs/gen/ex_ALWNEVER_faulty.rst",

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('vlt')
test.lint(expect_filename=test.golden_filename, verilator_flags2=['--assert --timing'], fails=True)
test.lint(expect_filename=test.golden_filename, verilator_flags2=['--assert'], fails=True)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('simulator')
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -1,3 +1,8 @@
%Warning-RISEFALLDLY: t/t_gate_basic.v:26:12: Unsupported: rising/falling/turn-off delays. Using the first delay
26 | nand #(2,3) ND0 (nd0, a[0], b[0], b[1]);
| ^
... For warning description see https://verilator.org/warn/RISEFALLDLY?v=latest
... Use "/* verilator lint_off RISEFALLDLY */" and lint_on around source to disable this message.
%Warning-SPECIFYIGN: t/t_gate_basic.v:50:27: Ignoring unsupported: specify block construct
50 | (nt0 *> nt0) = (0, 0);
| ^
@ -6,17 +11,4 @@
%Warning-SPECIFYIGN: t/t_gate_basic.v:60:32: Ignoring unsupported: specify block construct
60 | (A1 *> Q) = (a$A1$Y, a$A1$Y);
| ^
%Error-NEEDTIMINGOPT: t/t_gate_basic.v:24:10: Use --timing or --no-timing to specify how timing controls should be handled
: ... note: In instance 't'
24 | not #(0.108) NT0 (nt0, a[0]);
| ^
... For error description see https://verilator.org/warn/NEEDTIMINGOPT?v=latest
%Error-NEEDTIMINGOPT: t/t_gate_basic.v:25:10: Use --timing or --no-timing to specify how timing controls should be handled
: ... note: In instance 't'
25 | and #1 AN0 (an0, a[0], b[0]);
| ^
%Error-NEEDTIMINGOPT: t/t_gate_basic.v:26:10: Use --timing or --no-timing to specify how timing controls should be handled
: ... note: In instance 't'
26 | nand #(2,3) ND0 (nd0, a[0], b[0], b[1]);
| ^
%Error: Exiting due to

View File

@ -12,9 +12,7 @@ import vltest_bootstrap
test.scenarios('linter')
test.top_filename = "t/t_gate_basic.v"
test.lint(verilator_flags2=[
"--lint-only --timing -Wall", "-Wno-DECLFILENAME -Wno-SPECIFYIGN -Wno-UNUSED"
],
test.lint(verilator_flags2=["-Wall", "-Wno-DECLFILENAME -Wno-SPECIFYIGN -Wno-UNUSED"],
fails=True,
expect_filename=test.golden_filename)

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,7 +11,7 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=test.vlt_all, expect_filename=test.golden_filename)
test.lint(fails=test.vlt_all, expect_filename=test.golden_filename)
test.extract(in_filename=test.top_filename,
out_filename=test.root + "/docs/gen/ex_FUNCTIMECTL_faulty.rst",

View File

@ -12,6 +12,6 @@ import vltest_bootstrap
test.scenarios('vlt')
test.top_filename = "t/t_timing_wait1.v"
test.lint(verilator_flags2=["--timing"], expect_filename=test.golden_filename, fails=True)
test.lint(expect_filename=test.golden_filename, fails=True)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('vlt')
test.lint(expect_filename=test.golden_filename, verilator_flags2=['--timing'], fails=True)
test.lint(expect_filename=test.golden_filename, fails=True)
test.passes()

View File

@ -12,6 +12,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.top_filename = "t/t_timing_clkgen1.v"
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -12,6 +12,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.top_filename = "t/t_timing_dpi_unsup.v"
test.lint(verilator_flags2=["--timing"], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('vlt')
test.lint(verilator_flags2=["--timing"])
test.lint()
test.passes()

View File

@ -12,9 +12,10 @@ import vltest_bootstrap
test.scenarios('vlt')
test.top_filename = "t/t_vlt_match_error.v"
test.lint(
verilator_flags2=["-DT_VLT_MATCH_ERROR_3 -Wall t/t_vlt_match_error.v t/t_vlt_match_error.vlt"],
fails=True,
expect_filename=test.golden_filename)
test.compile(verilator_flags2=[
"-DT_VLT_MATCH_ERROR_3 --cc -Wall t/t_vlt_match_error.v t/t_vlt_match_error.vlt"
],
fails=True,
expect_filename=test.golden_filename)
test.passes()

View File

@ -11,6 +11,6 @@ import vltest_bootstrap
test.scenarios('linter')
test.lint(verilator_flags2=['--timing'], fails=True, expect_filename=test.golden_filename)
test.lint(fails=True, expect_filename=test.golden_filename)
test.passes()