Change cell messages to instance to match IEEE

This commit is contained in:
Wilson Snyder 2025-05-03 04:00:47 -04:00
parent 15ebbd309f
commit 1a1c6e8797
11 changed files with 18 additions and 18 deletions

View File

@ -1,4 +1,4 @@
.. comment: generated by t_lint_pinmissing_bad
.. code-block::
%Warning-PINMISSING: example.v:1:8 Cell has missing pin: 'port'
%Warning-PINMISSING: example.v:1:8 Instance has missing pin: 'port'

View File

@ -58,11 +58,11 @@ class VlHierGraph:
top_module = False
fh.write("];\n")
cells = self.flatten(mod, lambda n: n['type'] == "CELL")
for cell in cells:
def_number = self.addr_to_vertex_number(cell['modp'])
instances = self.flatten(mod, lambda n: n['type'] == "CELL")
for inst in instances:
def_number = self.addr_to_vertex_number(inst['modp'])
fh.write(" n%d->n%d [label=\"%s\"];\n" %
(mod_number, def_number, cell['name']))
(mod_number, def_number, inst['name']))
fh.write("}\n")

View File

@ -664,8 +664,8 @@ void V3Inline::inlineAll(AstNetlist* nodep) {
for (AstNodeModule* modp = v3Global.rootp()->modulesp(); modp;
modp = VN_AS(modp->nextp(), NodeModule)) {
UASSERT_OBJ(!moduleState(modp).m_inlined, modp,
"Inlined module should have been deleted when the last cell referencing "
"it was inlined");
"Inlined module should have been deleted when the last instance "
"referencing it was inlined");
}
}

View File

@ -410,10 +410,10 @@ class LinkCellsVisitor final : public VNVisitor {
if (!pinp->exprp()) {
if (pinp->name().substr(0, 11) == "__pinNumber") {
pinp->v3warn(PINNOCONNECT,
"Cell pin is not connected: " << pinp->prettyNameQ());
"Instance pin is not connected: " << pinp->prettyNameQ());
} else {
pinp->v3warn(PINCONNECTEMPTY,
"Cell pin connected by name with empty reference: "
"Instance pin connected by name with empty reference: "
<< pinp->prettyNameQ());
}
}
@ -471,7 +471,7 @@ class LinkCellsVisitor final : public VNVisitor {
nodep->addPinsp(newp);
} else {
nodep->v3warn(PINMISSING,
"Cell has missing pin: "
"Instance has missing pin: "
<< portp->prettyNameQ() << '\n'
<< nodep->warnContextPrimary() << '\n'
<< portp->warnOther()

View File

@ -2696,7 +2696,7 @@ class LinkDotResolveVisitor final : public VNVisitor {
VL_RESTORER(m_usedPins);
m_usedPins.clear();
UASSERT_OBJ(nodep->modp(), nodep,
"Cell has unlinked module"); // V3LinkCell should have errored out
"Instance has unlinked module"); // V3LinkCell should have errored out
VL_RESTORER(m_cellp);
VL_RESTORER(m_pinSymp);
{

View File

@ -413,7 +413,7 @@ class TraceDeclVisitor final : public VNVisitor {
// This is a subscope: insert a placeholder to be fixed up later
AstCell* const cellp = entry.cellp();
AstNodeStmt* const stmtp = new AstComment{
cellp->fileline(), "Cell init for: " + cellp->prettyName()};
cellp->fileline(), "Instance init for: " + cellp->prettyName()};
addToSubFunc(stmtp);
m_cellInitPlaceholders.emplace_back(nodep, cellp, stmtp);
}

View File

@ -1,9 +1,9 @@
%Warning-PINNOCONNECT: t/t_inst_missing_bad.v:13:17: Cell pin is not connected: '__pinNumber2'
%Warning-PINNOCONNECT: t/t_inst_missing_bad.v:13:17: Instance pin is not connected: '__pinNumber2'
13 | sub sub (ok, , nc);
| ^
... For warning description see https://verilator.org/warn/PINNOCONNECT?v=latest
... Use "/* verilator lint_off PINNOCONNECT */" and lint_on around source to disable this message.
%Warning-PINMISSING: t/t_inst_missing_bad.v:13:8: Cell has missing pin: 'missing'
%Warning-PINMISSING: t/t_inst_missing_bad.v:13:8: Instance has missing pin: 'missing'
13 | sub sub (ok, , nc);
| ^~~
t/t_inst_missing_bad.v:16:51: ... Location of port declaration

View File

@ -1,4 +1,4 @@
%Warning-PINMISSING: t/t_inst_pin_place_bad.v:21:7: Cell has missing pin: 'pin_1'
%Warning-PINMISSING: t/t_inst_pin_place_bad.v:21:7: Instance has missing pin: 'pin_1'
21 | ) i_sub (
| ^~~~~
t/t_inst_pin_place_bad.v:11:11: ... Location of port declaration

View File

@ -1,4 +1,4 @@
%Warning-PINMISSING: t/t_lint_pindup_bad.v:18:4: Cell has missing pin: 'exists'
%Warning-PINMISSING: t/t_lint_pindup_bad.v:18:4: Instance has missing pin: 'exists'
18 | sub (.o(o),
| ^~~
t/t_lint_pindup_bad.v:32:15: ... Location of port declaration

View File

@ -1,4 +1,4 @@
%Warning-PINMISSING: t/t_lint_pinmissing_bad.v:8:8: Cell has missing pin: 'port'
%Warning-PINMISSING: t/t_lint_pinmissing_bad.v:8:8: Instance has missing pin: 'port'
8 | sub sub();
| ^~~
t/t_lint_pinmissing_bad.v:11:11: ... Location of port declaration

View File

@ -1,4 +1,4 @@
%Warning-PINMISSING: t/t_udp_bad.v:10:10: Cell has missing pin: 'c_bad'
%Warning-PINMISSING: t/t_udp_bad.v:10:10: Instance has missing pin: 'c_bad'
10 | udp_x x (a, b);
| ^
t/t_udp_bad.v:14:28: ... Location of port declaration