3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-05 13:56:04 +00:00

Make SigSpec::has_marked_bits use chunk iterator

This commit is contained in:
Robert O'Callahan 2025-10-28 12:38:03 +00:00
parent 7bd6b4f287
commit 04a6dbc562

View file

@ -5519,11 +5519,10 @@ bool RTLIL::SigSpec::has_marked_bits() const
{ {
cover("kernel.rtlil.sigspec.has_marked_bits"); cover("kernel.rtlil.sigspec.has_marked_bits");
pack(); for (auto &chunk : chunks())
for (auto it = chunks_.begin(); it != chunks_.end(); it++) if (chunk.width > 0 && chunk.wire == NULL) {
if (it->width > 0 && it->wire == NULL) { for (RTLIL::State d : chunk.data)
for (size_t i = 0; i < it->data.size(); i++) if (d == RTLIL::State::Sm)
if (it->data[i] == RTLIL::State::Sm)
return true; return true;
} }
return false; return false;