3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-03 13:07:58 +00:00

Make SigSpec::is_fully_zero use chunk iterator

This commit is contained in:
Robert O'Callahan 2025-10-28 12:36:47 +00:00
parent 20e64ee17b
commit 58dbf75885

View file

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