3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-13 09:31:16 +00:00

Make SigSpec::has_const(State) use chunk iterator

This commit is contained in:
Robert O'Callahan 2025-10-28 12:37:51 +00:00
parent ed8022f53f
commit 80b3efb3da

View file

@ -5516,9 +5516,8 @@ bool RTLIL::SigSpec::has_const(State state) const
{ {
cover("kernel.rtlil.sigspec.has_const"); cover("kernel.rtlil.sigspec.has_const");
pack(); for (auto &chunk : chunks())
for (auto it = chunks_.begin(); it != chunks_.end(); it++) if (chunk.width > 0 && chunk.wire == NULL && std::find(chunk.data.begin(), chunk.data.end(), state) != chunk.data.end())
if (it->width > 0 && it->wire == NULL && std::find(it->data.begin(), it->data.end(), state) != it->data.end())
return true; return true;
return false; return false;
} }