summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rtlil.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index facd43db..da3a2661 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -522,6 +522,9 @@ public:
int size() const { return width_; }
+ RTLIL::SigBit &operator[](int index) { unpack(); return bits_.at(index); }
+ const RTLIL::SigBit &operator[](int index) const { unpack(); return bits_.at(index); }
+
void expand();
void optimize();
RTLIL::SigSpec optimized() const;
@@ -540,7 +543,7 @@ public:
void remove_const();
RTLIL::SigSpec extract(RTLIL::SigSpec pattern, RTLIL::SigSpec *other = NULL) const;
- RTLIL::SigSpec extract(int offset, int length) const;
+ RTLIL::SigSpec extract(int offset, int length = 1) const;
void append(const RTLIL::SigSpec &signal);
void append_bit(const RTLIL::SigBit &bit);