3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-05 22:06:04 +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 a1f7d6c9bf
commit ab525643a7
2 changed files with 20 additions and 3 deletions

View file

@ -1365,7 +1365,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; }