diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-14 22:32:18 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-14 22:32:18 +0200 |
commit | 2f44d8ccf853870a661b5e528c7e3ad3e17ca21e (patch) | |
tree | 233366bc4acbbdca63b3b4d80ee34d797f45925c /kernel/rtlil.h | |
parent | 6d56172c0d16f80742c1c4588929d1805e3dd650 (diff) | |
download | yosys-2f44d8ccf853870a661b5e528c7e3ad3e17ca21e.tar.gz yosys-2f44d8ccf853870a661b5e528c7e3ad3e17ca21e.tar.bz2 yosys-2f44d8ccf853870a661b5e528c7e3ad3e17ca21e.zip |
Added sig.{replace,remove,extract} variants for std::{map,set} pattern
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r-- | kernel/rtlil.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 0093b8a1b..8f780c822 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -968,15 +968,25 @@ public: void replace(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec &with); void replace(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec &with, RTLIL::SigSpec *other) const; + + void replace(const std::map<RTLIL::SigBit, RTLIL::SigBit> &rules); + void replace(const std::map<RTLIL::SigBit, RTLIL::SigBit> &rules, RTLIL::SigSpec *other) const; + void replace(int offset, const RTLIL::SigSpec &with); void remove(const RTLIL::SigSpec &pattern); void remove(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *other) const; void remove2(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *other); + + void remove(const std::set<RTLIL::SigBit> &pattern); + void remove(const std::set<RTLIL::SigBit> &pattern, RTLIL::SigSpec *other) const; + void remove2(const std::set<RTLIL::SigBit> &pattern, RTLIL::SigSpec *other); + void remove(int offset, int length = 1); void remove_const(); - RTLIL::SigSpec extract(RTLIL::SigSpec pattern, const RTLIL::SigSpec *other = NULL) const; + RTLIL::SigSpec extract(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec *other = NULL) const; + RTLIL::SigSpec extract(const std::set<RTLIL::SigBit> &pattern, const RTLIL::SigSpec *other = NULL) const; RTLIL::SigSpec extract(int offset, int length = 1) const; void append(const RTLIL::SigSpec &signal); |