Deprecate `--structs-packed` (#7222).

This commit is contained in:
Wilson Snyder 2026-03-21 10:59:27 -04:00
parent 7e71bd1469
commit 947cbaf330
10 changed files with 24 additions and 7 deletions

View File

@ -40,6 +40,7 @@ Verilator 5.047 devel
* Add VPI callback support to --main (#7145).
* Add V3LiftExpr pass to lower impure expressions and calls (#7141) (#7164). [Geza Lore, Testorrent USA, Inc.]
* Add --func-recursion-depth CLI option (#7175) (#7179).
* Deprecate `--structs-packed` (#7222).
* Improve assignment-compatibility type check (#2843) (#5666) (#7052). [Pawel Kojma, Antmicro Ltd.]
* Change array tracing to dump left index to right index (#7205). [Geza Lore, Testorrent USA, Inc.]
* Change `--converge-limit` default to 10000 (#7209).

View File

@ -498,7 +498,6 @@ detailed descriptions of these arguments.
--no-std-package Prevent parsing standard package
--no-std-waiver Prevent parsing standard lint waivers
--no-stop-fail Do not call $stop when assertion fails
--structs-packed Convert all unpacked structures to packed structures
-sv Enable SystemVerilog parsing
+systemverilogext+<ext> Synonym for +1800-2023ext+<ext>
--threads <threads> Enable multithreading

View File

@ -17,7 +17,15 @@ C++14 compiler support
the Ubuntu LTS versions of GCC and clang use C++20 by default, estimated
May 2028.)
`--structs-packed` option
The :vlopt:`--structs-packed` option was introduced when Verilator was
first implementing unpacked structs. That feature has been stable now
for multiple years, so :vlopt:`--structs-packed` should no longer be
used. Thus :vlopt:`--structs-packed` will change to a no-operation flag
and the related :option:`UNPACKED` warning will never be issued no
sooner than September 2026.
tcmalloc support
Verilator currently supports the default malloc, tcmalloc, or jemalloc.
As jemalloc has better performance, support for tcmalloc may be removed
no sooner than January 2026.
no sooner than January 2027.

View File

@ -1682,6 +1682,8 @@ Summary:
.. option:: --structs-packed
Deprecated; discontinue use of this option.
Converts all unpacked structures to packed structures, and issues an
:option:`UNPACKED` warning. Specifying this option allows for backward
compatibility with versions before Verilator 5.006, when Verilator would

View File

@ -1742,7 +1742,10 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc,
DECL_OPTION("-std-package", OnOff, &m_stdPackage);
DECL_OPTION("-std-waiver", OnOff, &m_stdWaiver);
DECL_OPTION("-stop-fail", OnOff, &m_stopFail);
DECL_OPTION("-structs-packed", OnOff, &m_structsPacked);
DECL_OPTION("-structs-packed", CbOnOff, [this, fl](bool flag) {
m_structsPacked = flag;
fl->v3warn(DEPRECATED, "Option --structs-packed is deprecated, avoid use");
}).undocumented();
DECL_OPTION("-sv", CbCall, [this]() { m_defaultLanguage = V3LangCode::L1800_2023; });
DECL_OPTION("-no-threads", CbCall, [this, fl]() {

View File

@ -20,6 +20,7 @@ Doc_Waivers = [
'-order-clock-delay', # Deprecated
'-pp-comments', # Deprecated
'-prof-threads', # Deprecated
'-structs-packed', # Deprecated
'-xml-only', # Removed
'-xml-output', # Removed
]

View File

@ -0,0 +1,3 @@
%Warning-DEPRECATED: Option --structs-packed is deprecated, avoid use
... For warning description see https://verilator.org/warn/DEPRECATED?v=latest
... Use "/* verilator lint_off DEPRECATED */" and lint_on around source to disable this message.

View File

@ -11,7 +11,7 @@ import vltest_bootstrap
test.scenarios('linter')
test.compile(verilator_flags2=['--structs-packed'])
test.compile(verilator_flags2=['-Wno-fatal', '--structs-packed'], expect_filename=test.golden_filename)
test.execute()

View File

@ -9,9 +9,9 @@
import vltest_bootstrap
test.scenarios('simulator')
test.scenarios('simulator_st')
test.compile(verilator_flags2=['--structs-packed'])
test.compile(verilator_flags2=['-Wno-DEPRECATED', '--structs-packed'])
test.execute()

View File

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