3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-12 20:51:27 +00:00

Update kernel to avoid bits()

This commit is contained in:
Robert O'Callahan 2025-08-28 01:55:47 +00:00
parent 67e4a0a48a
commit 360a625785
14 changed files with 151 additions and 122 deletions

View file

@ -450,7 +450,7 @@ int RTLIL::Const::get_min_size(bool is_signed) const
void RTLIL::Const::compress(bool is_signed)
{
auto idx = get_min_size(is_signed);
bits().erase(bits().begin() + idx, bits().end());
resize(idx, RTLIL::State::S0);
}
std::optional<int> RTLIL::Const::as_int_compress(bool is_signed) const