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

Method getInterfaceTypeName

src/Design/Signal.cpp:116–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 m_signed(is_signed) {}
115
116std::string Signal::getInterfaceTypeName() const {
117 std::string type_name;
118 if (m_fileContent->Type(m_interfaceTypeNameId) ==
119 VObjectType::paClass_scope) {
120 NodeId Class_type = m_fileContent->Child(m_interfaceTypeNameId);
121 NodeId Pack_name = m_fileContent->Child(Class_type);
122 type_name.assign(m_fileContent->SymName(Pack_name)).append("::");
123 NodeId Struct_name = m_fileContent->Sibling(m_interfaceTypeNameId);
124 type_name += m_fileContent->SymName(Struct_name);
125 } else {
126 type_name = m_fileContent->SymName(m_interfaceTypeNameId);
127 NodeId constant_select = m_fileContent->Sibling(m_interfaceTypeNameId);
128 if (constant_select) {
129 if (m_fileContent->Type(constant_select) == VObjectType::slStringConst) {
130 type_name.append(".").append(m_fileContent->SymName(constant_select));
131 } else {
132 NodeId selector = m_fileContent->Child(constant_select);
133 if (m_fileContent->Type(selector) == VObjectType::slStringConst)
134 type_name.append(".").append(m_fileContent->SymName(selector));
135 }
136 }
137 }
138 return type_name;
139}
140
141std::string_view Signal::getName() const {
142 return m_fileContent->SymName(m_nodeId);

Callers 2

bindPortType_Method · 0.80
writeModuleMethod · 0.80

Calls 5

TypeMethod · 0.45
ChildMethod · 0.45
appendMethod · 0.45
SymNameMethod · 0.45
SiblingMethod · 0.45

Tested by

no test coverage detected