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

Make SigSpec::is_fully_undef use chunk iterator

This commit is contained in:
Robert O'Callahan 2025-10-28 12:37:17 +00:00
parent b2de56cae2
commit 5c8f9f14ca

View file

@ -5484,12 +5484,11 @@ bool RTLIL::SigSpec::is_fully_undef() const
{ {
cover("kernel.rtlil.sigspec.is_fully_undef"); cover("kernel.rtlil.sigspec.is_fully_undef");
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)
return false; return false;
for (size_t i = 0; i < it->data.size(); i++) for (RTLIL::State d : chunk.data)
if (it->data[i] != RTLIL::State::Sx && it->data[i] != RTLIL::State::Sz) if (d != RTLIL::State::Sx && d != RTLIL::State::Sz)
return false; return false;
} }
return true; return true;