From 276101f032126d35770001f99135449d96b145e7 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 30 Nov 2015 19:43:52 +0100 Subject: [PATCH] Re-added SigMap::allbits() --- kernel/hashlib.h | 5 +++++ kernel/sigtools.h | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/kernel/hashlib.h b/kernel/hashlib.h index 1f022e473..413e77d31 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -935,6 +935,8 @@ class mfp mutable std::vector parents; public: + typedef typename idict::const_iterator const_iterator; + int operator()(const K &key) const { int i = database(key); @@ -1014,6 +1016,9 @@ public: size_t size() const { return database.size(); } bool empty() const { return database.empty(); } void clear() { database.clear(); parents.clear(); } + + const_iterator begin() const { return database.begin(); } + const_iterator end() const { return database.end(); } }; } /* namespace hashlib */ diff --git a/kernel/sigtools.h b/kernel/sigtools.h index d73c5623d..83ff470d2 100644 --- a/kernel/sigtools.h +++ b/kernel/sigtools.h @@ -310,6 +310,15 @@ struct SigMap apply(sig); return sig; } + + RTLIL::SigSpec allbits() const + { + RTLIL::SigSpec sig; + for (auto &bit : database) + if (bit.wire != nullptr) + sig.append(bit); + return sig; + } }; YOSYS_NAMESPACE_END -- 2.30.2