Skip to content

Commit

Permalink
verilog black box ports unknown/loads
Browse files Browse the repository at this point in the history
Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Sep 17, 2021
1 parent 41706e0 commit 85f437b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion network/Network.cc
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,9 @@ Network::isLoad(const Pin *pin) const
const Instance *inst = instance(pin);
return (isLeaf(inst) && dir->isAnyInput())
// isTopLevelPort(pin)
|| (isTopInstance(inst) && dir->isAnyOutput());
|| (isTopInstance(inst) && dir->isAnyOutput())
// Black box unknown ports are treated as loads.
|| dir->isUnknown();
}

bool
Expand Down
4 changes: 2 additions & 2 deletions verilog/VerilogReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ VerilogReader::makeBlackBoxNamedPorts(Cell *cell,
Port *port = (size == 1)
? network_->makePort(cell, port_name)
: network_->makeBusPort(cell, port_name, 0, size - 1);
network_->setDirection(port, PortDirection::bidirect());
network_->setDirection(port, PortDirection::unknown());
}
}

Expand All @@ -2077,7 +2077,7 @@ VerilogReader::makeBlackBoxOrderedPorts(Cell *cell,
? network_->makePort(cell, port_name)
: network_->makeBusPort(cell, port_name, size - 1, 0);
stringDelete(port_name);
network_->setDirection(port, PortDirection::bidirect());
network_->setDirection(port, PortDirection::unknown());
port_index++;
}
}
Expand Down

0 comments on commit 85f437b

Please sign in to comment.