aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-03-23 16:02:01 +0100
committerGitHub <noreply@github.com>2019-03-23 16:02:01 +0100
commit2cf71e2a7b053505ed80ad18c0e506c5f090b595 (patch)
treef53eeea0713e6e052eec79c588f19a948c073b41 /kernel/rtlil.h
parenta440f82586eda461ae2a90cba7a14d7078c41f37 (diff)
parent1eff8be8f018bd6b94efd14a959d6f1807dd056d (diff)
downloadyosys-2cf71e2a7b053505ed80ad18c0e506c5f090b595.tar.gz
yosys-2cf71e2a7b053505ed80ad18c0e506c5f090b595.tar.bz2
yosys-2cf71e2a7b053505ed80ad18c0e506c5f090b595.zip
Merge pull request #893 from YosysHQ/clifford/btormeminit
Memory init support in write_btor
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r--kernel/rtlil.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index 01323d112..52496e702 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -546,6 +546,14 @@ struct RTLIL::Const
return ret;
}
+ void extu(int width) {
+ bits.resize(width, RTLIL::State::S0);
+ }
+
+ void exts(int width) {
+ bits.resize(width, bits.empty() ? RTLIL::State::Sx : bits.back());
+ }
+
inline unsigned int hash() const {
unsigned int h = mkhash_init;
for (auto b : bits)