mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Support interface class diamond relationship.
This commit is contained in:
+5
-5
@@ -2030,7 +2030,7 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
||||
AstNodeFTask* m_ftaskp = nullptr; // Current function/task
|
||||
int m_modportNum = 0; // Uniqueify modport numbers
|
||||
bool m_inSens = false; // True if in senitem
|
||||
std::set<std::string> m_ifClassImpNames; // Names imported from interface class
|
||||
std::map<std::string, AstNode*> m_ifClassImpNames; // Names imported from interface class
|
||||
std::set<AstClass*> m_extendsParam; // Classes that have a parameterized super class
|
||||
// (except the default instances)
|
||||
// They are added to the set only in linkDotPrimary.
|
||||
@@ -2235,9 +2235,9 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
||||
<< "... Location of interface class's function\n"
|
||||
<< interfaceSubp->warnContextSecondary());
|
||||
}
|
||||
if (!existsInChild
|
||||
&& m_ifClassImpNames.find(interfaceSubp->name())
|
||||
!= m_ifClassImpNames.end()) {
|
||||
const auto it = m_ifClassImpNames.find(interfaceSubp->name());
|
||||
if (!existsInChild && it != m_ifClassImpNames.end()
|
||||
&& it->second != interfaceSubp) { // Not exact same function from diamond
|
||||
implementsClassp->v3error(
|
||||
"Class " << implementsClassp->prettyNameQ() << " implements "
|
||||
<< interfaceClassp->prettyNameQ()
|
||||
@@ -2249,7 +2249,7 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
||||
<< "... Location of interface class's function\n"
|
||||
<< interfaceSubp->warnContextSecondary());
|
||||
}
|
||||
m_ifClassImpNames.emplace(interfaceSubp->name());
|
||||
m_ifClassImpNames.emplace(interfaceSubp->name(), interfaceSubp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user