Fix false ASSIGNIN on interface input port connections (#7365)

* add oneline fix

* Apply 'make format'

* merge test and update 2 space indents

---------

Co-authored-by: github action <[email protected]>
This commit is contained in:
Yilou Wang
2026-04-02 20:44:48 +02:00
committed by GitHub
co-authored by github action
parent 1e5c93cc51
commit 56ed47ee7c
2 changed files with 35 additions and 8 deletions
+2 -1
View File
@@ -2866,7 +2866,8 @@ class WidthVisitor final : public VNVisitor {
const bool netPort
= nodep->varp()->isNet() || nodep->varp()->varType() == VVarType::PORT;
const bool contAssign = VN_IS(nodep->abovep(), AssignW);
if (!(hierRef && netPort && contAssign)) {
const bool pinConn = VN_IS(nodep->abovep(), Pin);
if (!(hierRef && netPort && (contAssign || pinConn))) {
nodep->v3warn(ASSIGNIN,
"Assigning to input/const variable: " << nodep->prettyNameQ());
}