From 82fa3560372bd89ad0985644a76cdd14f6701ec2 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 23 Jul 2014 23:58:03 +0200 Subject: Added hashing to RTLIL::SigSpec relational and equal operators --- kernel/rtlil.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'kernel/rtlil.h') diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 95de5f8c6..c25f71855 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -505,13 +505,18 @@ struct RTLIL::SigSpecIterator { struct RTLIL::SigSpec { private: + int width_; + unsigned long hash_; std::vector chunks_; // LSB at index 0 std::vector bits_; // LSB at index 0 - int width_; void pack() const; void unpack() const; - bool packed() const; + void hash() const; + + inline bool packed() const { + return bits_.empty(); + } inline void inline_unpack() const { if (!chunks_.empty()) -- cgit v1.2.3