From bb20331f9e2b7e1f23f6a0ccd081f28163cd1f3e Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 19 Jan 2010 19:35:05 -0500 Subject: [PATCH] Fix signals in a concatenation on the LHS aren't created implicitly, bug206 --- src/V3Link.cpp | 4 +--- test_regress/t/t_lint_implicit.v | 3 +++ test_regress/t/t_lint_implicit_bad.pl | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/V3Link.cpp b/src/V3Link.cpp index 3193173ca..d99a16398 100644 --- a/src/V3Link.cpp +++ b/src/V3Link.cpp @@ -604,9 +604,7 @@ private: // Deal with implicit definitions // We used to nodep->allowImplicit() here, but it turns out // normal "assigns" can also make implicit wires. Yuk. - if (AstVarRef* forrefp = nodep->lhsp()->castVarRef()) { - createImplicitVar(forrefp, false); - } + pinImplicitExprRecurse(nodep->lhsp()); nodep->iterateChildren(*this); } virtual void visit(AstAssignAlias* nodep, AstNUser*) { diff --git a/test_regress/t/t_lint_implicit.v b/test_regress/t/t_lint_implicit.v index 9445d0914..5d56d499c 100644 --- a/test_regress/t/t_lint_implicit.v +++ b/test_regress/t/t_lint_implicit.v @@ -11,5 +11,8 @@ module t (a,z); or OR0 (nt0, a, b); + logic [1:0] dummy_ip; + assign {dummy1, dummy2} = dummy_ip; + assign z = nt0; endmodule diff --git a/test_regress/t/t_lint_implicit_bad.pl b/test_regress/t/t_lint_implicit_bad.pl index b3ec298e4..79949a35b 100755 --- a/test_regress/t/t_lint_implicit_bad.pl +++ b/test_regress/t/t_lint_implicit_bad.pl @@ -16,6 +16,8 @@ compile ( '%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: b %Warning-IMPLICIT: Use .* to disable this message. %Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: nt0 +%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy1 +%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy2 %Error: Exiting due to.*', ) if $Self->{v3};