3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-05 17:14:08 +00:00

Merge pull request #3486 from daglem/fix-flowmap-crash

Fix crash in flowmap
This commit is contained in:
Miodrag Milanović 2022-09-23 16:22:46 +02:00 committed by GitHub
commit fcd1be1422
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1406,7 +1406,8 @@ struct FlowmapWorker
RTLIL::SigSpec lut_a, lut_y = node;
for (auto input_node : input_nodes)
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);
mapped_nodes.insert(node);