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

Method bindParameter

src/DesignCompile/CompileStmt.cpp:3035–3060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3033}
3034
3035UHDM::any* CompileHelper::bindParameter(DesignComponent* component,
3036 ValuedComponentI* instance,
3037 std::string_view name,
3038 CompileDesign* compileDesign,
3039 bool crossHierarchy) {
3040 if (instance) {
3041 ModuleInstance* inst = valuedcomponenti_cast<ModuleInstance*>(instance);
3042 while (inst) {
3043 if (Netlist* netlist = inst->getNetlist()) {
3044 if (netlist->param_assigns()) {
3045 for (param_assign* pass : *netlist->param_assigns()) {
3046 if (pass->Lhs()->VpiName() == name) {
3047 return pass->Lhs();
3048 }
3049 }
3050 }
3051 }
3052 if (crossHierarchy) {
3053 inst = inst->getParent();
3054 } else {
3055 break;
3056 }
3057 }
3058 }
3059 return nullptr;
3060}
3061
3062UHDM::any* CompileHelper::bindVariable(DesignComponent* component,
3063 ValuedComponentI* instance,

Callers 2

collectParams_Method · 0.80
writeCont_assignMethod · 0.80

Calls 3

param_assignsMethod · 0.80
getNetlistMethod · 0.45
getParentMethod · 0.45

Tested by

no test coverage detected