mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-14 01:46:16 +00:00
kernel/rtlil: Add SigBit operator[](int offset)
to SigChunk
This is already supported by `SigSpec` and since both `SigChunk` and `SigSpec` implement `extract` which is the multi-bit variant of this, there is no good reason for `SigChunk` to not support `SigBit operator[](int offset)`.
This commit is contained in:
parent
c73c8a39cf
commit
f24e2536c6
2 changed files with 15 additions and 0 deletions
|
@ -769,6 +769,7 @@ struct RTLIL::SigChunk
|
|||
SigChunk(const RTLIL::SigBit &bit);
|
||||
|
||||
RTLIL::SigChunk extract(int offset, int length) const;
|
||||
RTLIL::SigBit operator[](int offset) const;
|
||||
inline int size() const { return width; }
|
||||
inline bool is_wire() const { return wire != NULL; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue