mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-23 20:58:55 +00:00
rtlil: add Const::compress helper function
Compresses the current bits to the minimum width representation by removing leading bits.
This commit is contained in:
parent
038e262332
commit
4cd2e04da4
2 changed files with 27 additions and 0 deletions
|
@ -703,6 +703,9 @@ struct RTLIL::Const
|
|||
return ret;
|
||||
}
|
||||
|
||||
// compress representation to the minimum required bits
|
||||
void compress(bool is_signed = false);
|
||||
|
||||
void extu(int width) {
|
||||
bits.resize(width, RTLIL::State::S0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue