3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-03 13:07:58 +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");
pack();
for (auto it = chunks_.begin(); it != chunks_.end(); it++)
if (it->width > 0 && it->wire == NULL) {
for (size_t i = 0; i < it->data.size(); i++)
if (it->data[i] == RTLIL::State::Sm)
for (auto &chunk : chunks())
if (chunk.width > 0 && chunk.wire == NULL) {
for (RTLIL::State d : chunk.data)
if (d == RTLIL::State::Sm)
return true;
}
return false;