Skip to content

Commit

Permalink
Disconnecting dangling wires from fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
behzadmehmood committed Dec 4, 2024
1 parent 14c58df commit f2bc433
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions design_edit/src/rs_design_edit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ struct DesignEditRapidSilicon : public ScriptPass {

void handle_dangling_outs(Module *module)
{
std::unordered_set<Wire *> dangling_ins;
for(auto cell : module->cells())
{
for (auto &conn : cell->connections())
Expand Down Expand Up @@ -831,12 +832,9 @@ struct DesignEditRapidSilicon : public ScriptPass {
for (SigBit bit : port.second){
if(!used_bits.count(bit) && cell->output(portName)
&& !bit.wire->port_output){
RTLIL::SigSig new_conn;
RTLIL::Wire *new_wire = module->addWire(NEW_ID, 1);
new_wire->port_output = true;
new_conn.first = new_wire;
new_conn.second = bit;
module->connect(new_conn);
new_ins.erase(bit.wire->name.str());
bit.wire->port_input = false;
dangling_ins.insert(bit.wire);
}
}
}
Expand Down

0 comments on commit f2bc433

Please sign in to comment.