mirror of https://github.com/YosysHQ/yosys.git
Add an SigSpec::at(offset, defval) convenience method
This commit is contained in:
parent
3a87dc3524
commit
54708dfbd7
|
@ -818,6 +818,7 @@ public:
|
|||
|
||||
operator std::vector<RTLIL::SigChunk>() const { return chunks(); }
|
||||
operator std::vector<RTLIL::SigBit>() const { return bits(); }
|
||||
RTLIL::SigBit at(int offset, const RTLIL::SigBit &defval) { return offset < width_ ? (*this)[offset] : defval; }
|
||||
|
||||
unsigned int hash() const { if (!hash_) updhash(); return hash_; };
|
||||
|
||||
|
|
Loading…
Reference in New Issue