mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix non-interface error message
This commit is contained in:
parent
4a88ddc616
commit
2f4d1647f0
@ -904,6 +904,7 @@ public:
|
|||||||
string cellName() const { return m_cellName; }
|
string cellName() const { return m_cellName; }
|
||||||
void cellName(const string& name) { m_cellName = name; }
|
void cellName(const string& name) { m_cellName = name; }
|
||||||
string ifaceName() const { return m_ifaceName; }
|
string ifaceName() const { return m_ifaceName; }
|
||||||
|
string ifaceNameQ() const { return "'" + prettyName(ifaceName()) + "'"; }
|
||||||
void ifaceName(const string& name) { m_ifaceName = name; }
|
void ifaceName(const string& name) { m_ifaceName = name; }
|
||||||
string modportName() const { return m_modportName; }
|
string modportName() const { return m_modportName; }
|
||||||
AstIface* ifaceViaCellp() const; // Use cellp or ifacep
|
AstIface* ifaceViaCellp() const; // Use cellp or ifacep
|
||||||
|
@ -236,7 +236,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||||||
if (!nodep->cellp()) nodep->ifacep(VN_AS(modp, Iface));
|
if (!nodep->cellp()) nodep->ifacep(VN_AS(modp, Iface));
|
||||||
} else if (VN_IS(modp, NotFoundModule)) { // Will error out later
|
} else if (VN_IS(modp, NotFoundModule)) { // Will error out later
|
||||||
} else {
|
} else {
|
||||||
nodep->v3error("Non-interface used as an interface: " << nodep->prettyNameQ());
|
nodep->v3error("Non-interface used as an interface: " << nodep->ifaceNameQ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog Test module
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
//
|
//
|
||||||
// Interface instantiation without paranthesis
|
|
||||||
//
|
|
||||||
// This file ONLY is placed under the Creative Commons Public Domain, for
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// any use, without warranty, 2023 by Goekce Aydos.
|
// any use, without warranty, 2023 by Goekce Aydos.
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
// Interface instantiation without parenthesis
|
||||||
|
|
||||||
interface intf;
|
interface intf;
|
||||||
endinterface
|
endinterface
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user