3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Implemented basic functionality of "extract" pass

This commit is contained in:
Clifford Wolf 2013-02-27 16:27:20 +01:00
parent c59d77aa30
commit f28b6aff40
3 changed files with 87 additions and 15 deletions

View file

@ -207,6 +207,20 @@ struct SigSet
find(sig, result);
return result;
}
bool has(RTLIL::SigSpec sig)
{
sig.expand();
for (auto &c : sig.chunks) {
if (c.wire == NULL)
continue;
assert(c.width == 1);
bitDef_t bit(c.wire, c.offset);
if (bits.count(bit))
return true;
}
return false;
}
};
struct SigMap