mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Fixed shift ops with large right hand side
This commit is contained in:
parent
e8da3ea7b6
commit
7daeee340a
3 changed files with 50 additions and 10 deletions
|
@ -241,7 +241,7 @@ struct SatGen
|
|||
{
|
||||
std::vector<int> tmp_shifted(tmp.size());
|
||||
for (size_t j = 0; j < tmp.size(); j++) {
|
||||
int idx = j + (1 << i) * (shift_left ? -1 : +1);
|
||||
int idx = j + (1 << (i > 30 ? 30 : i)) * (shift_left ? -1 : +1);
|
||||
tmp_shifted.at(j) = (0 <= idx && idx < int(tmp.size())) ? tmp.at(idx) : sign_extend ? tmp.back() : ez->FALSE;
|
||||
}
|
||||
tmp = ez->vec_ite(b.at(i), tmp_shifted, tmp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue