3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-21 18:50:38 +00:00

Merge pull request #5167 from YosysHQ/emil/fix-splitnets-single-bit-vector

splitnets: handle single-bit vectors consistently
This commit is contained in:
Emil J 2025-06-11 22:47:48 +02:00 committed by GitHub
commit c0f52c6ead
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 37 additions and 1 deletions

View file

@ -207,8 +207,12 @@ struct SplitnetsPass : public Pass {
else
{
for (auto wire : module->wires()) {
if (wire->width > 1 && (wire->port_id == 0 || flag_ports) && design->selected(module, wire))
if (((wire->width > 1) || (wire->has_attribute(ID::single_bit_vector)))
&& (wire->port_id == 0 || flag_ports)
&& design->selected(module, wire)) {
wire->attributes.erase(ID::single_bit_vector);
worker.splitmap[wire] = std::vector<RTLIL::SigBit>();
}
}
for (auto &it : worker.splitmap)