| 3033 | } |
| 3034 | |
| 3035 | UHDM::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 | |
| 3062 | UHDM::any* CompileHelper::bindVariable(DesignComponent* component, |
| 3063 | ValuedComponentI* instance, |
no test coverage detected