Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set(VERSION_MINOR 0)



set(VERSION_PATCH 379)
set(VERSION_PATCH 380)



Expand Down
41 changes: 28 additions & 13 deletions design_edit/src/rs_design_edit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,8 @@ struct DesignEditRapidSilicon : public ScriptPass {
for (auto conn : cell->connections()) {
IdString portName = conn.first;
RTLIL::SigSpec actual = conn.second;
bool unset_port = true;
RTLIL::SigSpec sigspec;
if (actual.is_chunk()) {
RTLIL::Wire *wire = actual.as_chunk().wire;
if (wire != NULL) {
Expand All @@ -1585,19 +1587,6 @@ struct DesignEditRapidSilicon : public ScriptPass {
}
}
}
} else {
RTLIL::SigSpec const_sig = actual;
if (GetSize(const_sig) != 0)
{
RTLIL::SigSig new_conn;
RTLIL::Wire *new_wire = original_mod->addWire(NEW_ID, GetSize(const_sig));
cell->unsetPort(portName);
cell->setPort(portName, new_wire);
new_conn.first = new_wire;
new_conn.second = const_sig;
original_mod->connect(new_conn);
process_wire(cell, portName, new_wire);
}
}
} else {
for (auto it = actual.chunks().rbegin();
Expand All @@ -1623,6 +1612,32 @@ struct DesignEditRapidSilicon : public ScriptPass {
}
}
}
for (SigBit bit : conn.second)
{
// Route constant bits through fabric
if (bit.wire == nullptr)
{
if (unset_port)
{
cell->unsetPort(portName);
unset_port = false;
}
RTLIL::SigSig new_conn;
RTLIL::Wire *new_wire = original_mod->addWire(NEW_ID, 1);
new_conn.first = new_wire;
new_conn.second = bit;
original_mod->connect(new_conn);
new_outs.insert(new_wire->name.str());
sigspec.append(new_wire);
} else {
sigspec.append(bit);
}
}

if (!unset_port)
{
cell->setPort(portName, sigspec);
}
}
} else {
for (auto conn : cell->connections()) {
Expand Down
Loading