diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-11-30 19:43:52 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-11-30 19:43:52 +0100 |
commit | 276101f032126d35770001f99135449d96b145e7 (patch) | |
tree | 4528b845989166a57685a9281cf88277e9ead036 /kernel | |
parent | 0f9490212577314f144adc8432125c81ec7bad2b (diff) | |
download | yosys-276101f032126d35770001f99135449d96b145e7.tar.gz yosys-276101f032126d35770001f99135449d96b145e7.tar.bz2 yosys-276101f032126d35770001f99135449d96b145e7.zip |
Re-added SigMap::allbits()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/hashlib.h | 5 | ||||
-rw-r--r-- | kernel/sigtools.h | 9 |
2 files changed, 14 insertions, 0 deletions
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<int> parents; public: + typedef typename idict<K, 0, OPS>::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 |