aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r--kernel/rtlil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index cd966b815..6170ea55e 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -334,6 +334,10 @@ namespace RTLIL
return compare(size()-len, len, suffix) == 0;
}
+ bool contains(const char* str) const {
+ return strstr(c_str(), str);
+ }
+
size_t size() const {
return strlen(c_str());
}
@@ -731,6 +735,7 @@ struct RTLIL::SigChunk
RTLIL::SigChunk extract(int offset, int length) const;
inline int size() const { return width; }
+ inline bool is_wire() const { return wire != NULL; }
bool operator <(const RTLIL::SigChunk &other) const;
bool operator ==(const RTLIL::SigChunk &other) const;
@@ -756,6 +761,8 @@ struct RTLIL::SigBit
SigBit(const RTLIL::SigBit &sigbit) = default;
RTLIL::SigBit &operator =(const RTLIL::SigBit &other) = default;
+ inline bool is_wire() const { return wire != NULL; }
+
bool operator <(const RTLIL::SigBit &other) const;
bool operator ==(const RTLIL::SigBit &other) const;
bool operator !=(const RTLIL::SigBit &other) const;