Skip to content

Commit

Permalink
Handle case when modnet drives top port. Signed-off-by: Andy Fox. <an…
Browse files Browse the repository at this point in the history
[email protected]>

Signed-off-by: andyfox-rushc <[email protected]>
  • Loading branch information
andyfox-rushc committed Sep 13, 2024
1 parent d7fce14 commit 85a9c3d
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/rsz/src/RepairHold.cc
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,31 @@ void RepairHold::makeHoldDelay(Vertex* drvr,
// Verilog uses nets as ports, so the net connected to an output port has
// to be preserved.
// Move the driver pin over to gensym'd net.
// TODO:make this branch work with hierarchical nets
//
in_net = resizer_->makeUniqueNet();
Port* drvr_port = network_->port(drvr_pin);
Instance* drvr_inst = network_->instance(drvr_pin);
sta_->disconnectPin(drvr_pin);
sta_->connectPin(drvr_inst, drvr_port, in_net);
out_net = db_network_->dbToSta(db_drvr_net);
if (mod_drvr_net) {
odb::dbModITerm* moditerm = nullptr;
odb::dbModBTerm* modbterm = nullptr;
odb::dbITerm* iterm = nullptr;
odb::dbBTerm* bterm = nullptr;
db_network_->staToDb(drvr_pin, iterm, bterm, moditerm, modbterm);
if (iterm) {
// only disconnect the modnet from the iterm
// we add it later to the new output
iterm->disconnect(false, true);
}
if (moditerm) {
moditerm->disconnect();
}
if (modbterm) {
modbterm->disconnect();
}
}
} else {
in_net = db_network_->dbToSta(db_drvr_net);
// make the output net, put in same module as buffer
Expand All @@ -581,7 +598,8 @@ void RepairHold::makeHoldDelay(Vertex* drvr,
odb::dbBTerm* bterm = nullptr;
db_network_->staToDb(drvr_pin, iterm, bterm, moditerm, modbterm);
if (iterm) {
// only disconnect to the modnet.
// only disconnect the modnet from the iterm
// we add it later to the new output
iterm->disconnect(false, true);
}
if (moditerm) {
Expand Down

0 comments on commit 85a9c3d

Please sign in to comment.