mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Fix crash in flowmap
In 2fcc1ee72e
, the following is apparantly added in order to mark any
number of undefined LUT inputs:
lut_a.append(RTLIL::Const(State::Sx, minlut - input_nodes.size()));
However this can only be done if the number of input nodes is less
than minlut.
This fixes #3317
This commit is contained in:
parent
a217450524
commit
c4c68e8d86
|
@ -1406,7 +1406,8 @@ struct FlowmapWorker
|
||||||
RTLIL::SigSpec lut_a, lut_y = node;
|
RTLIL::SigSpec lut_a, lut_y = node;
|
||||||
for (auto input_node : input_nodes)
|
for (auto input_node : input_nodes)
|
||||||
lut_a.append(input_node);
|
lut_a.append(input_node);
|
||||||
lut_a.append(RTLIL::Const(State::Sx, minlut - input_nodes.size()));
|
if ((int)input_nodes.size() < minlut)
|
||||||
|
lut_a.append(RTLIL::Const(State::Sx, minlut - input_nodes.size()));
|
||||||
|
|
||||||
RTLIL::Cell *lut = module->addLut(NEW_ID, lut_a, lut_y, lut_table);
|
RTLIL::Cell *lut = module->addLut(NEW_ID, lut_a, lut_y, lut_table);
|
||||||
mapped_nodes.insert(node);
|
mapped_nodes.insert(node);
|
||||||
|
|
Loading…
Reference in a new issue