Implicit declaration handling in ports to UDP.
Scan port expressions for implicit nets using elaborate_sig.
This commit is contained in:
parent
5b2f249dcc
commit
140fd45460
1
PGate.h
1
PGate.h
|
|
@ -236,6 +236,7 @@ class PGModule : public PGate {
|
|||
void elaborate_udp_(Design*, PUdp *udp, NetScope*scope) const;
|
||||
void elaborate_scope_mod_(Design*des, Module*mod, NetScope*sc) const;
|
||||
bool elaborate_sig_mod_(Design*des, NetScope*scope, Module*mod) const;
|
||||
bool elaborate_sig_udp_(Design*des, NetScope*scope, PUdp*udp) const;
|
||||
|
||||
NetNet*resize_net_to_port_(Design*des, NetScope*scope,
|
||||
NetNet*sig, unsigned port_wid,
|
||||
|
|
|
|||
22
elab_sig.cc
22
elab_sig.cc
|
|
@ -343,6 +343,28 @@ bool PGModule::elaborate_sig_mod_(Design*des, NetScope*scope,
|
|||
return flag;
|
||||
}
|
||||
|
||||
bool PGModule::elaborate_sig_udp_(Design*des, NetScope*scope, PUdp*udp) const
|
||||
{
|
||||
bool flag = true;
|
||||
|
||||
if (pins_)
|
||||
for (unsigned idx = 0 ; idx < npins_ ; idx += 1) {
|
||||
const PExpr*tmp = pins_[idx].parm;
|
||||
if (tmp == 0)
|
||||
continue;
|
||||
flag = tmp->elaborate_sig(des, scope) && flag;
|
||||
}
|
||||
else
|
||||
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
|
||||
const PExpr*tmp = pin(idx);
|
||||
if (tmp == 0)
|
||||
continue;
|
||||
flag = tmp->elaborate_sig(des, scope) && flag;
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool PGenerate::elaborate_sig(Design*des, NetScope*container) const
|
||||
{
|
||||
bool flag = true;
|
||||
|
|
|
|||
|
|
@ -1509,6 +1509,10 @@ bool PGModule::elaborate_sig(Design*des, NetScope*scope) const
|
|||
if (mod != pform_modules.end())
|
||||
return elaborate_sig_mod_(des, scope, (*mod).second);
|
||||
|
||||
map<perm_string,PUdp*>::const_iterator udp = pform_primitives.find(type_);
|
||||
if (udp != pform_primitives.end())
|
||||
return elaborate_sig_udp_(des, scope, (*udp).second);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue