aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.h
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-03-25 13:17:22 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2019-03-25 13:17:22 -0700
commit6b90d3cf6cd433420ed46e0cc31fc71773f3117b (patch)
treeb443709301ab64f909969018c661969f49e1aff3 /kernel/rtlil.h
parentbf83c074c82756b1cd23a9c3998b6c4d535dae29 (diff)
parentddc1a4488e9fc10f557e4260df0becbc1cf43f72 (diff)
downloadyosys-6b90d3cf6cd433420ed46e0cc31fc71773f3117b.tar.gz
yosys-6b90d3cf6cd433420ed46e0cc31fc71773f3117b.tar.bz2
yosys-6b90d3cf6cd433420ed46e0cc31fc71773f3117b.zip
Merge remote-tracking branch 'origin/master' into xc7srl
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)