Support std::semaphore and typed std::mailbox (#3708)

Signed-off-by: Krzysztof Bieganski <[email protected]>
This commit is contained in:
Krzysztof Bieganski
2022-11-28 16:53:55 +01:00
committed by GitHub
parent 4452a9b10f
commit 68e1b473e2
32 changed files with 329 additions and 82 deletions
+10 -1
View File
@@ -50,6 +50,7 @@ private:
using ImplTypedefMap = std::map<const std::pair<void*, std::string>, AstTypedef*>;
// STATE
AstPackage* const m_stdPackagep; // SystemVerilog std package
AstVar* m_varp = nullptr; // Variable we're under
ImplTypedefMap m_implTypedef; // Created typedefs for each <container,name>
std::unordered_set<FileLine*> m_filelines; // Filelines that have been seen
@@ -600,6 +601,11 @@ private:
VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep);
}
}
void visit(AstClassOrPackageRef* nodep) override {
if (nodep->name() == "std" && !nodep->classOrPackagep()) {
nodep->classOrPackagep(m_stdPackagep);
}
}
void visit(AstNode* nodep) override {
// Default: Just iterate
@@ -609,7 +615,10 @@ private:
public:
// CONSTRUCTORS
explicit LinkParseVisitor(AstNetlist* rootp) { iterate(rootp); }
explicit LinkParseVisitor(AstNetlist* rootp)
: m_stdPackagep{rootp->stdPackagep()} {
iterate(rootp);
}
~LinkParseVisitor() override = default;
};