From 2e030bfdfd795b9e0268eedb8373c3fe073eb731 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Tue, 13 May 2025 15:22:10 -0700 Subject: [PATCH] Refactor bmuxmap attribute inheritance --- passes/techmap/bmuxmap.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/passes/techmap/bmuxmap.cc b/passes/techmap/bmuxmap.cc index af5f4007f..9e87efd58 100644 --- a/passes/techmap/bmuxmap.cc +++ b/passes/techmap/bmuxmap.cc @@ -97,9 +97,7 @@ struct BmuxmapPass : public Pass { IdString cell_name = cell->name; // SILIMATE: Save the original cell name module->rename(cell_name, NEW_ID); // SILIMATE: Rename the original cell, which will be deleted RTLIL::Cell *pmux = module->addPmux(cell_name, new_a, data, new_s, new_data); // SILIMATE: Improve the naming - for (auto attr : cell->attributes) // SILIMATE: Copy all attributes from original cell to new cell - pmux->attributes[attr.first] = attr.second; - pmux->set_bool_attribute("\\bmuxmap"); // SILIMATE: Mark the cell as created by bmuxmap + pmux->attributes = cell->attributes; // SILIMATE: Copy all attributes from original cell to new cell data = new_data; } else @@ -112,9 +110,7 @@ struct BmuxmapPass : public Pass { data.extract(i*2+width, width), sel[idx], new_data.extract(i, width)); - for (auto attr : cell->attributes) // SILIMATE: Copy all attributes from original cell to new cell - mux->attributes[attr.first] = attr.second; - mux->set_bool_attribute("\\bmuxmap"); // SILIMATE: Mark the cell as created by bmuxmap + mux->attributes = cell->attributes; // SILIMATE: Copy all attributes from original cell to new cell } data = new_data; }