3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-24 02:11:28 +00:00

Make Const::Const(long long) constructor use packed bits internally if possible

This commit is contained in:
Robert O'Callahan 2025-08-29 03:08:31 +00:00
parent 61caa5e042
commit b06085ab6c
3 changed files with 52 additions and 1 deletions

View file

@ -843,7 +843,8 @@ private:
public:
Const() : flags(RTLIL::CONST_FLAG_NONE), tag(backing_tag::bits), bits_(std::vector<RTLIL::State>()) {}
Const(const std::string &str);
Const(long long val, int width = 32);
Const(long long val); // default width is 32
Const(long long val, int width);
Const(RTLIL::State bit, int width = 1);
Const(std::vector<RTLIL::State> bits) : flags(RTLIL::CONST_FLAG_NONE), tag(backing_tag::bits), bits_(std::move(bits)) {}
Const(const std::vector<bool> &bits);