mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Remove deprecated --structs-packed.
This commit is contained in:
@@ -18,6 +18,7 @@ Verilator 5.053 devel
|
||||
* Add covergroup runtime registry (#8134). [Matthew Ballance]
|
||||
* Add initial support for solo `binsof` (#8298). [Marco Bartoli]
|
||||
* Add `-fno-dead-members` and optimize dead class member functions (#8830).
|
||||
* Remove deprecated `--structs-packed`.
|
||||
* Change JSON dumps to suppress empty strings, etc.
|
||||
* Support VPI interface references (#8081). [Todd Strader]
|
||||
* Support nested array and associative array element member access in constraint 1/4 - pre-cleanup (#8237). [Kamil Danecki, Antmicro Ltd.]
|
||||
|
||||
@@ -18,14 +18,6 @@ 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
|
||||
|
||||
@@ -1792,12 +1792,11 @@ Summary:
|
||||
|
||||
.. option:: --structs-packed
|
||||
|
||||
Deprecated; discontinue use of this option.
|
||||
Removed in 5.054.
|
||||
|
||||
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
|
||||
always pack unpacked structures.
|
||||
Converted all unpacked structures to packed structures, Specifying this
|
||||
option allowed for backward compatibility with versions before Verilator
|
||||
5.006, when Verilator would always pack unpacked structures.
|
||||
|
||||
.. option:: -sv
|
||||
|
||||
|
||||
@@ -2503,14 +2503,10 @@ List Of Warnings
|
||||
|
||||
.. option:: UNPACKED
|
||||
|
||||
Warns that unpacked structs and unions are not supported because
|
||||
:vlopt:`--structs-packed` was used, or by up through version 5.004.
|
||||
Historical, never issued since version 5.004.
|
||||
|
||||
Ignoring this warning will make Verilator treat the structure as packed,
|
||||
which may make Verilator simulations differ from other simulators. This
|
||||
downgrading may also result in what would typically be a legal unpacked
|
||||
struct/array inside an unpacked struct/array becoming an illegal
|
||||
unpacked struct/array inside a packed struct/array.
|
||||
Warned that unpacked structs and unions were not supported, or disabled
|
||||
by the since-removed `--structs-packed` option.
|
||||
|
||||
|
||||
.. option:: UNSATCONSTR
|
||||
|
||||
@@ -1774,10 +1774,6 @@ 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", 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]() {
|
||||
|
||||
@@ -294,7 +294,6 @@ private:
|
||||
VOptionBool m_schedZeroDelay; // main switch: --sched-zero-delay
|
||||
bool m_stdPackage = true; // main switch: --std-package
|
||||
bool m_stdWaiver = true; // main switch: --std-waiver
|
||||
bool m_structsPacked = false; // main switch: --structs-packed
|
||||
bool m_systemC = false; // main switch: --sc: System C instead of simple C++
|
||||
bool m_stats = false; // main switch: --stats
|
||||
bool m_statsVars = false; // main switch: --stats-vars
|
||||
@@ -510,7 +509,6 @@ public:
|
||||
bool statsVars() const { return m_statsVars; }
|
||||
bool stdPackage() const { return m_stdPackage; }
|
||||
bool stdWaiver() const { return m_stdWaiver; }
|
||||
bool structsPacked() const { return m_structsPacked; }
|
||||
bool assertOn() const { return m_assert; } // assertOn as __FILE__ may be defined
|
||||
bool assertCase() const { return m_assertCase; }
|
||||
bool autoflush() const { return m_autoflush; }
|
||||
|
||||
+1
-5
@@ -3827,7 +3827,6 @@ class WidthVisitor final : public VNVisitor {
|
||||
if (unionp->isTagged()) { nodep->v3warn(E_UNSUPPORTED, "Unsupported: tagged union"); }
|
||||
}
|
||||
// UINFOTREE(9, nodep, "", "class-in");
|
||||
if (!nodep->packed() && v3Global.opt.structsPacked()) nodep->packed(true);
|
||||
userIterateChildren(nodep, nullptr); // First size all members
|
||||
nodep->dtypep(nodep);
|
||||
nodep->isFourstate(false);
|
||||
@@ -3835,10 +3834,7 @@ class WidthVisitor final : public VNVisitor {
|
||||
for (AstMemberDType* itemp = nodep->membersp(); itemp;
|
||||
itemp = VN_AS(itemp->nextp(), MemberDType)) {
|
||||
AstNodeDType* const dtp = itemp->subDTypep()->skipRefp();
|
||||
if (nodep->packed()
|
||||
&& !dtp->isIntegralOrPacked()
|
||||
// Historically lax:
|
||||
&& !v3Global.opt.structsPacked())
|
||||
if (nodep->packed() && !dtp->isIntegralOrPacked())
|
||||
itemp->v3error("Unpacked data type "
|
||||
<< dtp->prettyDTypeNameQ()
|
||||
<< " in packed struct/union (IEEE 1800-2023 7.2.1)");
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
%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.
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of either the GNU Lesser General Public License Version 3
|
||||
# or the Perl Artistic License Version 2.0.
|
||||
# SPDX-FileCopyrightText: 2024 Wilson Snyder
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('linter')
|
||||
|
||||
test.compile(verilator_flags2=['-Wno-fatal', '--structs-packed'],
|
||||
expect_filename=test.golden_filename)
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
||||
@@ -1,21 +0,0 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed under the Creative Commons Public Domain.
|
||||
// SPDX-FileCopyrightText: 2009 Wilson Snyder
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module x;
|
||||
|
||||
typedef struct {int a;} notpacked_t;
|
||||
|
||||
typedef struct packed {notpacked_t b;} ispacked_t;
|
||||
|
||||
ispacked_t p;
|
||||
|
||||
initial begin
|
||||
p.b = 1;
|
||||
if (p.b != 1) $stop;
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
||||
@@ -1,6 +0,0 @@
|
||||
%Error: t/t_flag_structs_packed.v:11:38: Unpacked data type 'struct{}x.notpacked_t' in packed struct/union (IEEE 1800-2023 7.2.1)
|
||||
: ... note: In instance 'x'
|
||||
11 | typedef struct packed {notpacked_t b;} ispacked_t;
|
||||
| ^
|
||||
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
|
||||
%Error: Exiting due to
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of either the GNU Lesser General Public License Version 3
|
||||
# or the Perl Artistic License Version 2.0.
|
||||
# SPDX-FileCopyrightText: 2024 Wilson Snyder
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('linter')
|
||||
test.top_filename = "t/t_flag_structs_packed.v"
|
||||
|
||||
test.lint(fails=test.vlt_all, expect_filename=test.golden_filename)
|
||||
|
||||
test.passes()
|
||||
Reference in New Issue
Block a user