mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-23 14:11:28 +00:00
Merge pull request #5488 from rocallahan/sigspec-at
Implement at() methods on SigSpec so that SigSpec::bits().at() continues to work as it did
This commit is contained in:
commit
725a1c3a4b
1 changed files with 2 additions and 0 deletions
|
|
@ -1726,6 +1726,8 @@ public:
|
||||||
operator std::vector<RTLIL::SigChunk>() const;
|
operator std::vector<RTLIL::SigChunk>() const;
|
||||||
operator std::vector<RTLIL::SigBit>() const { return to_sigbit_vector(); }
|
operator std::vector<RTLIL::SigBit>() const { return to_sigbit_vector(); }
|
||||||
const RTLIL::SigBit &at(int offset, const RTLIL::SigBit &defval) { return offset < size() ? (*this)[offset] : defval; }
|
const RTLIL::SigBit &at(int offset, const RTLIL::SigBit &defval) { return offset < size() ? (*this)[offset] : defval; }
|
||||||
|
RTLIL::SigBit& at(int offset) { return (*this)[offset]; }
|
||||||
|
RTLIL::SigBit at(int offset) const { return (*this)[offset]; }
|
||||||
|
|
||||||
[[nodiscard]] Hasher hash_into(Hasher h) const {
|
[[nodiscard]] Hasher hash_into(Hasher h) const {
|
||||||
Hasher::hash_t val;
|
Hasher::hash_t val;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue