mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Emit parameter values as 'static constexpr' instead of enum
All parameters that are required in the output are now emitted as 'static constexpr, except for string or array of strings parameters, which are still emitted as 'static const' (required as std::string is not a literal type, so cannot be constexpr). This simplifies handling of parameters and supports 'real' parameters.
This commit is contained in:
+2
-1
@@ -183,7 +183,8 @@ void V3CCtors::cctorsAll() {
|
||||
|
||||
for (AstNode* np = modp->stmtsp(); np; np = np->nextp()) {
|
||||
if (AstVar* const varp = VN_CAST(np, Var)) {
|
||||
if (!varp->isIfaceParent() && !varp->isIfaceRef() && !varp->noReset()) {
|
||||
if (!varp->isIfaceParent() && !varp->isIfaceRef() && !varp->noReset()
|
||||
&& !varp->isParam()) {
|
||||
const auto vrefp = new AstVarRef{varp->fileline(), varp, VAccess::WRITE};
|
||||
var_reset.add(new AstCReset{varp->fileline(), vrefp});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user