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

Method checkInterface_

src/DesignCompile/CompileModule.cpp:1606–1639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1604}
1605
1606bool CompileModule::checkInterface_() {
1607 FileSystem* const fileSystem = FileSystem::getInstance();
1608 int32_t countMissingType = 0;
1609 Location* missingTypeLoc = nullptr;
1610 for (auto& port : m_module->m_ports) {
1611 if (port->getType() == VObjectType::paData_type_or_implicit) {
1612 if (port->getDirection() == VObjectType::paPortDir_Out ||
1613 port->getDirection() == VObjectType::paPortDir_Inout) {
1614 if (countMissingType == 0)
1615 missingTypeLoc = new Location(
1616 fileSystem->copy(
1617 port->getFileContent()->getFileId(port->getNodeId()),
1618 m_symbols),
1619 port->getFileContent()->Line(port->getNodeId()), 0,
1620 m_symbols->registerSymbol(port->getName()));
1621 countMissingType++;
1622 }
1623 }
1624 }
1625 if (countMissingType) {
1626 Location countLoc(
1627 m_symbols->registerSymbol(std::to_string(countMissingType - 1)));
1628 if (countMissingType - 1 > 0) {
1629 Error err(ErrorDefinition::COMP_PORT_MISSING_TYPE, *missingTypeLoc,
1630 countLoc);
1631 m_errors->addError(err);
1632 } else {
1633 Error err(ErrorDefinition::COMP_PORT_MISSING_TYPE, *missingTypeLoc);
1634 m_errors->addError(err);
1635 }
1636 delete missingTypeLoc;
1637 }
1638 return true;
1639}
1640
1641void CompileModule::compileClockingBlock_(const FileContent* fC, NodeId id) {
1642 /*

Callers

nothing calls this directly

Calls 10

copyMethod · 0.80
getTypeMethod · 0.45
getDirectionMethod · 0.45
getFileIdMethod · 0.45
getFileContentMethod · 0.45
getNodeIdMethod · 0.45
LineMethod · 0.45
registerSymbolMethod · 0.45
getNameMethod · 0.45
addErrorMethod · 0.45

Tested by

no test coverage detected