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
-7
@@ -857,13 +857,8 @@ void EmitCSyms::emitSymImp() {
|
||||
putsQuoted(protect(it->second.m_varBasePretty));
|
||||
|
||||
std::string varName;
|
||||
varName += (protectIf(scopep->nameDotless(), scopep->protect()) + ".");
|
||||
|
||||
if (varp->isParam()) {
|
||||
varName += protect("var_" + varp->name());
|
||||
} else {
|
||||
varName += protect(varp->name());
|
||||
}
|
||||
varName += protectIf(scopep->nameDotless(), scopep->protect()) + ".";
|
||||
varName += protect(varp->name());
|
||||
|
||||
if (varp->isParam()) {
|
||||
if (varp->vlEnumType() == "VLVT_STRING") {
|
||||
|
||||
Reference in New Issue
Block a user