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

Method compileAttributes

src/DesignCompile/CompileHelper.cpp:4577–4607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4575}
4576
4577std::vector<UHDM::attribute*>* CompileHelper::compileAttributes(
4578 DesignComponent* component, const FileContent* fC, NodeId nodeId,
4579 CompileDesign* compileDesign, UHDM::any* pexpr) {
4580 UHDM::Serializer& s = compileDesign->getSerializer();
4581 std::vector<UHDM::attribute*>* results = nullptr;
4582 if (fC->Type(nodeId) == VObjectType::paAttribute_instance) {
4583 results = s.MakeAttributeVec();
4584 while (fC->Type(nodeId) == VObjectType::paAttribute_instance) {
4585 NodeId Attr_spec = fC->Child(nodeId);
4586 while (fC->Type(Attr_spec) == VObjectType::paAttr_spec) {
4587 UHDM::attribute* attribute = s.MakeAttribute();
4588 NodeId Attr_name = fC->Child(Attr_spec);
4589 const std::string_view name = fC->SymName(fC->Child(Attr_name));
4590 attribute->VpiName(name);
4591 attribute->VpiParent(pexpr);
4592 fC->populateCoreMembers(Attr_spec, Attr_spec, attribute);
4593 results->push_back(attribute);
4594 if (NodeId Constant_expression = fC->Sibling(Attr_name)) {
4595 if (UHDM::expr* expr = (UHDM::expr*)compileExpression(
4596 component, fC, Constant_expression, compileDesign, Reduce::No,
4597 attribute)) {
4598 attribute->VpiValue(expr->VpiValue());
4599 }
4600 }
4601 Attr_spec = fC->Sibling(Attr_spec);
4602 }
4603 nodeId = fC->Sibling(nodeId);
4604 }
4605 }
4606 return results;
4607}
4608
4609UHDM::clocking_block* CompileHelper::compileClockingBlock(
4610 DesignComponent* component, const FileContent* fC, NodeId nodeId,

Callers 9

collectObjects_Method · 0.80
compileMethod · 0.80
collectUdpObjects_Method · 0.80
collectModuleObjects_Method · 0.80
compileMethod · 0.80
compileMethod · 0.80
collectObjects_Method · 0.80
high_conn_Method · 0.80

Calls 5

populateCoreMembersMethod · 0.80
TypeMethod · 0.45
ChildMethod · 0.45
SymNameMethod · 0.45
SiblingMethod · 0.45

Tested by

no test coverage detected