MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / substituteAssignedValue

Method substituteAssignedValue

src/DesignCompile/CompileExpression.cpp:83–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81using namespace UHDM; // NOLINT (using a bunch of them)
82
83bool CompileHelper::substituteAssignedValue(const UHDM::any *oper,
84 CompileDesign *compileDesign) {
85 bool substitute = true;
86 if (!oper) {
87 return false;
88 }
89 UHDM_OBJECT_TYPE opType = oper->UhdmType();
90 if (opType == uhdmoperation) {
91 operation *op = (operation *)oper;
92 int32_t opType = op->VpiOpType();
93 if (opType == vpiAssignmentPatternOp || opType == vpiConcatOp) {
94 substitute = compileDesign->getCompiler()
95 ->getCommandLineParser()
96 ->getParametersSubstitution();
97 }
98 for (auto operand : *op->Operands()) {
99 if (!substituteAssignedValue(operand, compileDesign)) {
100 return false;
101 }
102 }
103 }
104 return substitute;
105}
106
107any *CompileHelper::getObject(std::string_view name, DesignComponent *component,
108 CompileDesign *compileDesign,

Callers 4

collectParams_Method · 0.80
writeCont_assignMethod · 0.80
elab_parameters_Method · 0.80
high_conn_Method · 0.80

Calls 3

getCommandLineParserMethod · 0.45
getCompilerMethod · 0.45

Tested by

no test coverage detected