mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-12 12:41:28 +00:00
Update frontends to avoid bits()
This commit is contained in:
parent
c89a4da607
commit
24a95bd6cf
6 changed files with 37 additions and 26 deletions
|
@ -455,9 +455,10 @@ constant:
|
|||
}
|
||||
while ((int)bits.size() > width)
|
||||
bits.pop_back();
|
||||
$$ = new RTLIL::Const;
|
||||
for (auto it = bits.begin(); it != bits.end(); it++)
|
||||
$$->bits().push_back(*it);
|
||||
RTLIL::Const::Builder builder(bits.size());
|
||||
for (RTLIL::State bit : bits)
|
||||
builder.push_back(bit);
|
||||
$$ = new RTLIL::Const(builder.build());
|
||||
if (is_signed) {
|
||||
$$->flags |= RTLIL::CONST_FLAG_SIGNED;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue