3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-19 01:32:20 +00:00

add morphCell instead of type assignments, test_cell passes for all cells

This commit is contained in:
Emil J. Tywoniak 2024-06-20 23:41:09 +02:00
parent d2107a9ee4
commit 1be8f8023a
33 changed files with 129 additions and 99 deletions

View file

@ -244,17 +244,17 @@ struct OptLutInsPass : public Pass {
else
log_assert(GetSize(new_inputs) <= 4);
if (GetSize(new_inputs) == 1)
cell->type = ID(LUT1);
cell = cell->module->morphCell(ID(LUT1), cell);
else if (GetSize(new_inputs) == 2)
cell->type = ID(LUT2);
cell = cell->module->morphCell(ID(LUT2), cell);
else if (GetSize(new_inputs) == 3)
cell->type = ID(LUT3);
cell = cell->module->morphCell(ID(LUT3), cell);
else if (GetSize(new_inputs) == 4)
cell->type = ID(LUT4);
cell = cell->module->morphCell(ID(LUT4), cell);
else if (GetSize(new_inputs) == 5)
cell->type = ID(LUT5);
cell = cell->module->morphCell(ID(LUT5), cell);
else if (GetSize(new_inputs) == 6)
cell->type = ID(LUT6);
cell = cell->module->morphCell(ID(LUT6), cell);
else
log_assert(0);
cell->unsetPort(ID(I0));