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:
parent
c59d77aa30
commit
f28b6aff40
3 changed files with 87 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue