style: Brackets in V3Instrument.cpp
This commit is contained in:
parent
6fd72d9211
commit
ae512b286c
|
|
@ -137,9 +137,9 @@ class InstrumentTargetFndr final : public VNVisitor {
|
||||||
}
|
}
|
||||||
// Helper function for adding the parameters into the tree
|
// Helper function for adding the parameters into the tree
|
||||||
void addParam(AstModule* modp) {
|
void addParam(AstModule* modp) {
|
||||||
AstVar* paramp = new AstVar(modp->fileline(), VVarType::GPARAM, "INSTRUMENT",
|
AstVar* paramp = new AstVar{modp->fileline(), VVarType::GPARAM, "INSTRUMENT",
|
||||||
VFlagChildDType{}, nullptr);
|
VFlagChildDType{}, nullptr};
|
||||||
paramp->valuep(new AstConst(modp->fileline(), AstConst::Signed32{}, 0));
|
paramp->valuep(new AstConst{modp->fileline(), AstConst::Signed32{}, 0});
|
||||||
paramp->dtypep(paramp->valuep()->dtypep());
|
paramp->dtypep(paramp->valuep()->dtypep());
|
||||||
paramp->ansi(true);
|
paramp->ansi(true);
|
||||||
modp->addStmtsp(paramp);
|
modp->addStmtsp(paramp);
|
||||||
|
|
@ -149,16 +149,16 @@ class InstrumentTargetFndr final : public VNVisitor {
|
||||||
int pinnum = 0;
|
int pinnum = 0;
|
||||||
if (isInstrumentPath) {
|
if (isInstrumentPath) {
|
||||||
for (AstNode* n = cellp->pinsp(); n; n = n->nextp()) { pinnum++; }
|
for (AstNode* n = cellp->pinsp(); n; n = n->nextp()) { pinnum++; }
|
||||||
AstPin* pinp = new AstPin(cellp->fileline(), pinnum + 1, "INSTRUMENT",
|
AstPin* pinp = new AstPin{cellp->fileline(), pinnum + 1, "INSTRUMENT",
|
||||||
// The pin is set to 1 to enable the instrumentation path
|
// The pin is set to 1 to enable the instrumentation path
|
||||||
new AstConst(cellp->fileline(), AstConst::Signed32{}, 1));
|
new AstConst{cellp->fileline(), AstConst::Signed32{}, 1}};
|
||||||
pinp->param(true);
|
pinp->param(true);
|
||||||
cellp->addParamsp(pinp);
|
cellp->addParamsp(pinp);
|
||||||
} else {
|
} else {
|
||||||
for (AstNode* n = cellp->pinsp(); n; n = n->nextp()) { pinnum++; }
|
for (AstNode* n = cellp->pinsp(); n; n = n->nextp()) { pinnum++; }
|
||||||
AstPin* pinp = new AstPin(
|
AstPin* pinp = new AstPin{
|
||||||
cellp->fileline(), pinnum + 1, "INSTRUMENT",
|
cellp->fileline(), pinnum + 1, "INSTRUMENT",
|
||||||
new AstParseRef(cellp->fileline(), VParseRefExp::PX_TEXT, "INSTRUMENT"));
|
new AstParseRef{cellp->fileline(), VParseRefExp::PX_TEXT, "INSTRUMENT"}};
|
||||||
pinp->param(true);
|
pinp->param(true);
|
||||||
cellp->addParamsp(pinp);
|
cellp->addParamsp(pinp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue