mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-05 05:49:15 +00:00
Make SigSpec::is_fully_ones use chunk iterator
This commit is contained in:
parent
58dbf75885
commit
8a88acd9b8
1 changed files with 4 additions and 5 deletions
|
|
@ -5456,12 +5456,11 @@ bool RTLIL::SigSpec::is_fully_ones() const
|
||||||
{
|
{
|
||||||
cover("kernel.rtlil.sigspec.is_fully_ones");
|
cover("kernel.rtlil.sigspec.is_fully_ones");
|
||||||
|
|
||||||
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::S1)
|
if (d != RTLIL::State::S1)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue