mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 21:27:00 +00:00
const: represent string constants as string, assert not accessed as bits
This commit is contained in:
parent
960bca0196
commit
498e0498c5
81 changed files with 764 additions and 690 deletions
|
@ -79,7 +79,7 @@ bool merge_lut(LutData &result, const LutData &data, const LutData select, bool
|
|||
for (int j = 0; j < GetSize(select.second); j++)
|
||||
if (i & 1 << idx_sel[j])
|
||||
sel_lut_idx |= 1 << j;
|
||||
bool select_val = (select.first.bits[sel_lut_idx] == State::S1);
|
||||
bool select_val = (select.first.bits()[sel_lut_idx] == State::S1);
|
||||
bool new_bit;
|
||||
if (select_val ^ select_inv) {
|
||||
// Use alt_data.
|
||||
|
@ -90,9 +90,9 @@ bool merge_lut(LutData &result, const LutData &data, const LutData select, bool
|
|||
} else {
|
||||
// Use original LUT.
|
||||
int lut_idx = i >> idx_data & ((1 << GetSize(data.second)) - 1);
|
||||
new_bit = data.first.bits[lut_idx] == State::S1;
|
||||
new_bit = data.first.bits()[lut_idx] == State::S1;
|
||||
}
|
||||
result.first.bits[i] = new_bit ? State::S1 : State::S0;
|
||||
result.first.bits()[i] = new_bit ? State::S1 : State::S0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ lut_sigin_done:
|
|||
if (cell->hasParam(ID(IS_D_INVERTED)) && cell->getParam(ID(IS_D_INVERTED)).as_bool()) {
|
||||
// Flip all bits in the LUT.
|
||||
for (int i = 0; i < GetSize(lut_d.first); i++)
|
||||
lut_d.first.bits[i] = (lut_d.first.bits[i] == State::S1) ? State::S0 : State::S1;
|
||||
lut_d.first.bits()[i] = (lut_d.first.bits()[i] == State::S1) ? State::S0 : State::S1;
|
||||
}
|
||||
|
||||
LutData lut_d_post_ce;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue