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

Make Module stop accessing internals of SigSpec

This commit is contained in:
Robert O'Callahan 2025-10-27 12:41:50 +00:00
parent a2aeef6c96
commit 8d4f790951
2 changed files with 17 additions and 14 deletions

View file

@ -1252,10 +1252,6 @@ private:
unpack();
}
// Only used by Module::remove(const pool<Wire*> &wires)
// but cannot be more specific as it isn't yet declared
friend struct RTLIL::Module;
public:
SigSpec() : width_(0), hash_(0) {}
SigSpec(std::initializer_list<RTLIL::SigSpec> parts);
@ -1327,6 +1323,8 @@ public:
RTLIL::SigSpec extract(int offset, int length = 1) const;
RTLIL::SigSpec extract_end(int offset) const { return extract(offset, width_ - offset); }
void rewrite_wires(std::function<void(RTLIL::Wire*& wire)> rewrite);
RTLIL::SigBit lsb() const { log_assert(width_); return (*this)[0]; };
RTLIL::SigBit msb() const { log_assert(width_); return (*this)[width_ - 1]; };