Fix a bug where top level module ports were double elaborated

This commit is contained in:
Cary R 2012-08-08 13:33:27 -07:00
parent bc85385f13
commit 3af34263ab
1 changed files with 1 additions and 3 deletions

View File

@ -5050,10 +5050,8 @@ Design* elaborate(list<perm_string>roots)
for (unsigned pin = 0; pin < mport.size(); pin += 1) {
// This really does more than we need and adds extra
// stuff to the design that should be cleaned later.
(void) mport[pin]->elaborate_subport(des, scope);
NetNet *netnet = mport[pin]->elaborate_subport(des, scope);
if( netnet != 0 )
{
if (netnet != 0) {
// Elaboration may actually fail with erroneous input source
prt_vector_width += netnet->vector_width();
ptype = PortType::merged(netnet->port_type(), ptype);