Improve PINMISSING to show related port
This commit is contained in:
parent
981d3ce782
commit
df566bdf4d
|
|
@ -411,8 +411,12 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
newp->svImplicit(true);
|
||||
nodep->addPinsp(newp);
|
||||
} else { // warn on the CELL that needs it, not the port
|
||||
nodep->v3warn(PINMISSING,
|
||||
"Cell has missing pin: " << portp->prettyNameQ());
|
||||
nodep->v3warn(PINMISSING, "Cell has missing pin: "
|
||||
<< portp->prettyNameQ() << '\n'
|
||||
<< nodep->warnContextPrimary() << '\n'
|
||||
<< portp->warnOther()
|
||||
<< "... Location of port declaration\n"
|
||||
<< portp->warnContextSecondary());
|
||||
AstPin* const newp
|
||||
= new AstPin{nodep->fileline(), 0, portp->name(), nullptr};
|
||||
nodep->addPinsp(newp);
|
||||
|
|
|
|||
|
|
@ -6,4 +6,7 @@
|
|||
%Warning-PINMISSING: t/t_inst_missing_bad.v:13:8: Cell has missing pin: 'missing'
|
||||
13 | sub sub (ok, , nc);
|
||||
| ^~~
|
||||
t/t_inst_missing_bad.v:16:51: ... Location of port declaration
|
||||
16 | module sub (input ok, input none, input nc, input missing);
|
||||
| ^~~~~~~
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
%Warning-PINMISSING: t/t_inst_pin_place_bad.v:21:7: Cell has missing pin: 'pin_1'
|
||||
21 | ) i_sub (
|
||||
| ^~~~~
|
||||
t/t_inst_pin_place_bad.v:11:11: ... Location of port declaration
|
||||
11 | input pin_1
|
||||
| ^~~~~
|
||||
... For warning description see https://verilator.org/warn/PINMISSING?v=latest
|
||||
... Use "/* verilator lint_off PINMISSING */" and lint_on around source to disable this message.
|
||||
%Error: t/t_inst_pin_place_bad.v:22:10: Instance attempts to connect to 'PARAM_A', but it is a parameter
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
%Warning-PINMISSING: t/t_lint_pindup_bad.v:18:4: Cell has missing pin: 'exists'
|
||||
18 | sub (.o(o),
|
||||
| ^~~
|
||||
t/t_lint_pindup_bad.v:32:15: ... Location of port declaration
|
||||
32 | input wire exists
|
||||
| ^~~~~~
|
||||
... For warning description see https://verilator.org/warn/PINMISSING?v=latest
|
||||
... Use "/* verilator lint_off PINMISSING */" and lint_on around source to disable this message.
|
||||
%Error: t/t_lint_pindup_bad.v:20:10: Duplicate pin connection: 'i'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
%Warning-PINMISSING: t/t_udp_bad.v:10:10: Cell has missing pin: 'c_bad'
|
||||
10 | udp_x x (a, b);
|
||||
| ^
|
||||
t/t_udp_bad.v:14:28: ... Location of port declaration
|
||||
14 | primitive udp_x (a_bad, b, c_bad);
|
||||
| ^~~~~
|
||||
... For warning description see https://verilator.org/warn/PINMISSING?v=latest
|
||||
... Use "/* verilator lint_off PINMISSING */" and lint_on around source to disable this message.
|
||||
%Error: t/t_udp_bad.v:14:18: Pin is not an in/out/inout/interface: 'a_bad'
|
||||
|
|
|
|||
Loading…
Reference in New Issue