Improve interface parent error wording (#5357)

This commit is contained in:
Wilson Snyder 2025-09-08 07:21:03 -04:00
parent a1167b3d55
commit c6ffd22c45
4 changed files with 16 additions and 9 deletions

View File

@ -525,10 +525,14 @@ public:
varp->v3warn(E_UNSUPPORTED,
"Unsupported: Interfaced port on top level module");
}
ifacerefp->v3error("Parent instance's interface is not found: "
<< AstNode::prettyNameQ(ifacerefp->ifaceName()) << '\n'
ifacerefp->v3error("Interface "
<< AstNode::prettyNameQ(ifacerefp->ifaceName())
<< " not connected as parent's interface not connected\n"
<< ifacerefp->warnMore()
<< "... Perhaps intended an interface instantiation but "
<< "... Perhaps caused by another error on the parent "
"interface that needs resolving\n"
<< ifacerefp->warnMore()
<< "... Or, perhaps intended an interface instantiation but "
"are missing parenthesis (IEEE 1800-2023 25.3)?");
continue;
} else if (ifacerefp->ifaceViaCellp()->dead()

View File

@ -1,5 +1,6 @@
%Error: t/t_interface_paren_missing_bad.v:13:4: Parent instance's interface is not found: 'intf'
: ... Perhaps intended an interface instantiation but are missing parenthesis (IEEE 1800-2023 25.3)?
%Error: t/t_interface_paren_missing_bad.v:13:4: Interface 'intf' not connected as parent's interface not connected
: ... Perhaps caused by another error on the parent interface that needs resolving
: ... Or, perhaps intended an interface instantiation but are missing parenthesis (IEEE 1800-2023 25.3)?
13 | intf intf_i;
| ^~~~
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.

View File

@ -2,8 +2,9 @@
17 | ifc.counter_mp c_data
| ^~~~~~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
%Error: t/t_interface_top_bad.v:17:4: Parent instance's interface is not found: 'ifc'
: ... Perhaps intended an interface instantiation but are missing parenthesis (IEEE 1800-2023 25.3)?
%Error: t/t_interface_top_bad.v:17:4: Interface 'ifc' not connected as parent's interface not connected
: ... Perhaps caused by another error on the parent interface that needs resolving
: ... Or, perhaps intended an interface instantiation but are missing parenthesis (IEEE 1800-2023 25.3)?
17 | ifc.counter_mp c_data
| ^~~
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.

View File

@ -1,5 +1,6 @@
%Error: t/t_interface_typo_bad.v:14:4: Parent instance's interface is not found: 'foo_intf'
: ... Perhaps intended an interface instantiation but are missing parenthesis (IEEE 1800-2023 25.3)?
%Error: t/t_interface_typo_bad.v:14:4: Interface 'foo_intf' not connected as parent's interface not connected
: ... Perhaps caused by another error on the parent interface that needs resolving
: ... Or, perhaps intended an interface instantiation but are missing parenthesis (IEEE 1800-2023 25.3)?
14 | foo_intf foo
| ^~~~~~~~
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.