Fix for GitHub issue #127 - coerce output ports to inout when necessary.
(cherry picked from commit 080dd0323d)
This commit is contained in:
parent
9449c46865
commit
e7852f8f9c
10
elaborate.cc
10
elaborate.cc
|
|
@ -1425,6 +1425,16 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, NetScope*scope) const
|
|||
<< prts[0]->name() << " is coerced to inout." << endl;
|
||||
}
|
||||
|
||||
if (!prts.empty() && (prts[0]->port_type() == NetNet::POUTPUT)
|
||||
&& (prts[0]->type() != NetNet::REG)
|
||||
&& prts[0]->pin(0).nexus()->has_floating_input()
|
||||
&& pins[idx]->is_collapsible_net(des, scope)) {
|
||||
prts[0]->port_type(NetNet::PINOUT);
|
||||
|
||||
cerr << pins[idx]->get_fileline() << ": warning: output port "
|
||||
<< prts[0]->name() << " is coerced to inout." << endl;
|
||||
}
|
||||
|
||||
// Elaborate the expression that connects to the
|
||||
// module[s] port. sig is the thing outside the module
|
||||
// that connects to the port.
|
||||
|
|
|
|||
Loading…
Reference in New Issue