diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-03-23 14:38:48 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-03-23 14:38:48 +0100 |
commit | 3b796c033cc40a753e24f21b25b2701a30f022f1 (patch) | |
tree | 237d5e489e8c996061cfaed1e716a704cb9a08b7 /kernel/rtlil.h | |
parent | a440f82586eda461ae2a90cba7a14d7078c41f37 (diff) | |
download | yosys-3b796c033cc40a753e24f21b25b2701a30f022f1.tar.gz yosys-3b796c033cc40a753e24f21b25b2701a30f022f1.tar.bz2 yosys-3b796c033cc40a753e24f21b25b2701a30f022f1.zip |
Add RTLIL::Const::ext[su](), fix RTLIL::SigSpec::extend_u0 for 0-size signals
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r-- | kernel/rtlil.h | 8 |
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) |