Fix non-interface error message

This commit is contained in:
Wilson Snyder 2024-11-09 20:20:54 -05:00
parent 4a88ddc616
commit 2f4d1647f0
3 changed files with 4 additions and 3 deletions

View File

@ -904,6 +904,7 @@ public:
string cellName() const { return m_cellName; }
void cellName(const string& name) { m_cellName = name; }
string ifaceName() const { return m_ifaceName; }
string ifaceNameQ() const { return "'" + prettyName(ifaceName()) + "'"; }
void ifaceName(const string& name) { m_ifaceName = name; }
string modportName() const { return m_modportName; }
AstIface* ifaceViaCellp() const; // Use cellp or ifacep

View File

@ -236,7 +236,7 @@ class LinkCellsVisitor final : public VNVisitor {
if (!nodep->cellp()) nodep->ifacep(VN_AS(modp, Iface));
} else if (VN_IS(modp, NotFoundModule)) { // Will error out later
} else {
nodep->v3error("Non-interface used as an interface: " << nodep->prettyNameQ());
nodep->v3error("Non-interface used as an interface: " << nodep->ifaceNameQ());
}
}
iterateChildren(nodep);

View File

@ -1,11 +1,11 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// Interface instantiation without paranthesis
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2023 by Goekce Aydos.
// SPDX-License-Identifier: CC0-1.0
// Interface instantiation without parenthesis
interface intf;
endinterface