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

Method check

src/DesignCompile/UhdmChecker.cpp:652–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652bool UhdmChecker::check(PathId uhdmFileId) {
653 FileSystem* const fileSystem = FileSystem::getInstance();
654 // Register all objects location in file content
655 CommandLineParser* clp =
656 m_compileDesign->getCompiler()->getCommandLineParser();
657 SymbolTable* symbols = m_compileDesign->getCompiler()->getSymbolTable();
658 std::set<const FileContent*> files;
659 std::set<std::string_view> moduleNames;
660 for (ModuleInstance* top : m_design->getTopLevelModuleInstances()) {
661 collectUsedFileContents(files, moduleNames, top);
662 }
663 for (const auto& packInfo : m_design->getPackageDefinitions()) {
664 Package* pack = packInfo.second;
665 for (auto file : pack->getFileContents()) {
666 if (file) files.insert(file);
667 }
668 }
669
670 for (const FileContent* fC : files) {
671 if (!clp->createCache()) {
672 std::string_view fileName = std::get<1>(
673 fileSystem->getLeaf(fC->getFileId(), fC->getSymbolTable()));
674 if ((fileName == "uvm_pkg.sv") || (fileName == "ovm_pkg.sv")) {
675 continue;
676 }
677 }
678 fileMap.emplace(fC->getFileId(), fC);
679 registerFile(fC, moduleNames);
680 }
681
682 // Annotate UHDM object coverage
683 annotate();
684
685 mergeColumnCoverage();
686
687 if (!fileSystem->mkdirs(
688 fileSystem->getCheckerDir(clp->fileunit(), symbols))) {
689 return false;
690 }
691
692 // Report uncovered objects
693 float overallCoverage = reportCoverage(uhdmFileId);
694 reportHtml(uhdmFileId, overallCoverage);
695 return true;
696}
697
698} // namespace SURELOG

Callers 1

writeMethod · 0.45

Calls 11

collectUsedFileContentsFunction · 0.85
insertMethod · 0.80
createCacheMethod · 0.80
getLeafMethod · 0.80
getCheckerDirMethod · 0.80
fileunitMethod · 0.80
getCommandLineParserMethod · 0.45
getCompilerMethod · 0.45
getSymbolTableMethod · 0.45
getFileIdMethod · 0.45
mkdirsMethod · 0.45

Tested by

no test coverage detected