3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-13 09:31:16 +00:00

Don't reset the hash when unpacking, instead clear the hash whenever bits are modified

This commit is contained in:
Robert O'Callahan 2025-10-30 15:03:47 +00:00
parent aa4a0fe815
commit 4939484840
2 changed files with 20 additions and 3 deletions

View file

@ -1369,7 +1369,7 @@ public:
inline int size() const { return width_; }
inline bool empty() const { return size() == 0; }
inline RTLIL::SigBit &operator[](int index) { inline_unpack(); return bits_.at(index); }
inline RTLIL::SigBit &operator[](int index) { inline_unpack(); hash_ = 0; return bits_.at(index); }
inline const RTLIL::SigBit &operator[](int index) const { inline_unpack(); return bits_.at(index); }
inline RTLIL::SigSpecIterator begin() { RTLIL::SigSpecIterator it; it.sig_p = this; it.index = 0; return it; }