Fix how explicitly unconnected ports are handled in the presence of .*
See this PR: https://github.com/steveicarus/ivtest/pull/15
Which adds test implicit-port7
(cherry picked from commit 01ee6bd5b4)
This commit is contained in:
parent
a151407ca4
commit
ff30cb1800
|
|
@ -1191,6 +1191,7 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, NetScope*scope) const
|
||||||
// the source list is rearranged by name binding into this list.
|
// the source list is rearranged by name binding into this list.
|
||||||
vector<PExpr*>pins (rmod->port_count());
|
vector<PExpr*>pins (rmod->port_count());
|
||||||
vector<bool>pins_fromwc (rmod->port_count(), false);
|
vector<bool>pins_fromwc (rmod->port_count(), false);
|
||||||
|
vector<bool>pins_is_explicitly_not_connected (rmod->port_count(), false);
|
||||||
|
|
||||||
// If the instance has a pins_ member, then we know we are
|
// If the instance has a pins_ member, then we know we are
|
||||||
// binding by name. Therefore, make up a pins array that
|
// binding by name. Therefore, make up a pins array that
|
||||||
|
|
@ -1204,7 +1205,7 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, NetScope*scope) const
|
||||||
// Handle wildcard named port
|
// Handle wildcard named port
|
||||||
if (pins_[idx].name[0] == '*') {
|
if (pins_[idx].name[0] == '*') {
|
||||||
for (unsigned j = 0 ; j < nexp ; j += 1) {
|
for (unsigned j = 0 ; j < nexp ; j += 1) {
|
||||||
if (!pins[j]) {
|
if ((!pins[j]) && (!pins_is_explicitly_not_connected[j])) {
|
||||||
pins_fromwc[j] = true;
|
pins_fromwc[j] = true;
|
||||||
NetNet* net = 0;
|
NetNet* net = 0;
|
||||||
const NetExpr*par = 0;
|
const NetExpr*par = 0;
|
||||||
|
|
@ -1259,6 +1260,8 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, NetScope*scope) const
|
||||||
// OK, do the binding by placing the expression in
|
// OK, do the binding by placing the expression in
|
||||||
// the right place.
|
// the right place.
|
||||||
pins[pidx] = pins_[idx].parm;
|
pins[pidx] = pins_[idx].parm;
|
||||||
|
if (!pins[pidx])
|
||||||
|
pins_is_explicitly_not_connected[pidx] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue