From 8d6a542a5d610ed10495fd4522e3167198241bc8 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Fri, 27 Dec 2024 15:23:25 -0800 Subject: [PATCH 01/11] Decode logic for muxpack --- passes/opt/muxpack.cc | 83 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 8 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 4e9291bd5af..b45642f0d08 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -31,9 +31,9 @@ struct ExclusiveDatabase dict>> sig_cmp_prev; - ExclusiveDatabase(Module *module, const SigMap &sigmap, bool assume_excl) : module(module), sigmap(sigmap) + ExclusiveDatabase(Module *module, const SigMap &sigmap, bool assume_excl, bool make_excl) : module(module), sigmap(sigmap) { - if (assume_excl) return; + if (assume_excl || make_excl) return; SigSpec const_sig, nonconst_sig; SigBit y_port; pool reduce_or; @@ -243,7 +243,7 @@ struct MuxpackWorker return chain; } - void process_chain(vector &chain) + void process_chain(vector &chain, bool make_excl) { if (GetSize(chain) < 2) return; @@ -289,8 +289,66 @@ struct MuxpackWorker remove_cells.insert(cursor_cell); } + if (make_excl) { + /* We create the following one-hot select line decoder + S0 S1 S2 S3 ... + | | | | + +--------+ +----------+ +-------------+ | + | _|_ | _|_ | _|_ | + | \_/ | \_/ | \_/ | + | o | o | o | + | | | | | __ | | + | +---------\ | | / \ | | + | | | |___| | / |___| | + | |___| \ & / / / \ & / / ... + | \ & / \_/ / / \_/ / / + | \_/ | | / | | / + | | +------/ +-------/ + | | | | | | + | | |___| |___| + | | \ & / \ & / + | | \_/ \_/ + | | | | + S0 S0'S1 S0'S1'S2 S0'S1'S2'S3 ... + */ + SigSpec decodedSelect; + Cell *cell = last_cell; + std::vector select_bits = s_sig.bits(); + RTLIL::SigBit prevSigNot = RTLIL::State::S1; + RTLIL::SigBit prevSigAnd = RTLIL::State::S1; + for (int i = (int) (select_bits.size() -1); i >= 0; i--) { + Yosys::RTLIL::SigBit sigbit = select_bits[i]; + if (i == (int) (select_bits.size() -1)) { + decodedSelect.append(sigbit); + Wire *not_y = module->addWire(NEW_ID, 1); + module->addNot(NEW_ID2_SUFFIX("not"), sigbit, not_y, false, last_cell->get_src_attribute()); + prevSigNot = not_y; + } else if (i == (int) (select_bits.size() -2)) { + Wire *and_y = module->addWire(NEW_ID, 1); + module->addAndGate(NEW_ID2_SUFFIX("sel"), sigbit, prevSigNot, and_y, last_cell->get_src_attribute()); + decodedSelect.append(and_y); + Wire *not_y = module->addWire(NEW_ID, 1); + module->addNot(NEW_ID2_SUFFIX("not"), sigbit, not_y, false, last_cell->get_src_attribute()); + prevSigAnd = prevSigNot; + prevSigNot = not_y; + } else { + Wire *and_y1 = module->addWire(NEW_ID, 1); + module->addAndGate(NEW_ID2_SUFFIX("sel"), prevSigAnd, prevSigNot, and_y1, last_cell->get_src_attribute()); + Wire *and_y2 = module->addWire(NEW_ID, 1); + module->addAndGate(NEW_ID2_SUFFIX("sel"), sigbit, and_y1, and_y2, last_cell->get_src_attribute()); + decodedSelect.append(and_y2); + Wire *not_y = module->addWire(NEW_ID, 1); + module->addNot(NEW_ID2_SUFFIX("not"), sigbit, not_y, false, last_cell->get_src_attribute()); + prevSigAnd = and_y1; + prevSigNot = not_y; + } + } + decodedSelect.reverse(); + first_cell->setPort(ID::S, decodedSelect); + } else { + first_cell->setPort(ID::S, s_sig); + } first_cell->setPort(ID::B, b_sig); - first_cell->setPort(ID::S, s_sig); first_cell->setParam(ID::S_WIDTH, GetSize(s_sig)); first_cell->setPort(ID::Y, last_cell->getPort(ID::Y)); @@ -310,15 +368,15 @@ struct MuxpackWorker candidate_cells.clear(); } - MuxpackWorker(Module *module, bool assume_excl) : - module(module), sigmap(module), mux_count(0), pmux_count(0), excl_db(module, sigmap, assume_excl) + MuxpackWorker(Module *module, bool assume_excl, bool make_excl) : + module(module), sigmap(module), mux_count(0), pmux_count(0), excl_db(module, sigmap, assume_excl, make_excl) { make_sig_chain_next_prev(); find_chain_start_cells(assume_excl); for (auto c : chain_start_cells) { vector chain = create_chain(c); - process_chain(chain); + process_chain(chain, make_excl); } cleanup(); @@ -346,12 +404,16 @@ struct MuxpackPass : public Pass { log("\n"); log(" -assume_excl\n"); log(" assume mutually exclusive constraint when packing (may result in inequivalence)\n"); + log(" -make_excl\n"); + log(" Adds a one-hot decoder on the control signals\n"); log("\n"); } void execute(std::vector args, RTLIL::Design *design) override { bool splitfanout = false; bool assume_excl = false; + bool make_excl = false; + log_header(design, "Executing MUXPACK pass ($mux cell cascades to $pmux).\n"); @@ -366,6 +428,11 @@ struct MuxpackPass : public Pass { assume_excl = true; continue; } + if (args[argidx] == "-make_excl") { + make_excl = true; + assume_excl = true; + continue; + } break; } extra_args(args, argidx, design); @@ -377,7 +444,7 @@ struct MuxpackPass : public Pass { int pmux_count = 0; for (auto module : design->selected_modules()) { - MuxpackWorker worker(module, assume_excl); + MuxpackWorker worker(module, assume_excl, make_excl); mux_count += worker.mux_count; pmux_count += worker.pmux_count; } From ad80b5336d15d6cc127f29c11d7a21e1b5e0b1a3 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 30 Dec 2024 17:08:07 -0800 Subject: [PATCH 02/11] format --- passes/opt/muxpack.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index b45642f0d08..91fe70f180f 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -291,13 +291,13 @@ struct MuxpackWorker if (make_excl) { /* We create the following one-hot select line decoder - S0 S1 S2 S3 ... - | | | | - +--------+ +----------+ +-------------+ | - | _|_ | _|_ | _|_ | - | \_/ | \_/ | \_/ | - | o | o | o | - | | | | | __ | | + S0 S1 S2 S3 ... + | | | | + +--------+ +----------+ +--------------+ | + | _|_ | _|_ | _|_ | + | \_/ | \_/ | \_/ | + | o | o | o | + | | | | | __ | | | +---------\ | | / \ | | | | | |___| | / |___| | | |___| \ & / / / \ & / / ... From a32a7b27bc9e302ebe197238676693c3ad4520cd Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 30 Dec 2024 17:13:00 -0800 Subject: [PATCH 03/11] format --- passes/opt/muxpack.cc | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 91fe70f180f..bb2aa3cd73a 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -291,24 +291,24 @@ struct MuxpackWorker if (make_excl) { /* We create the following one-hot select line decoder - S0 S1 S2 S3 ... - | | | | - +--------+ +----------+ +--------------+ | - | _|_ | _|_ | _|_ | - | \_/ | \_/ | \_/ | - | o | o | o | - | | | | | __ | | - | +---------\ | | / \ | | - | | | |___| | / |___| | - | |___| \ & / / / \ & / / ... - | \ & / \_/ / / \_/ / / - | \_/ | | / | | / - | | +------/ +-------/ - | | | | | | + S0 S1 S2 S3 ... + | | | + +--------+ +----------+ +--------------+ | + | _|_ | _|_ | _|_ | + | \_/ | \_/ | \_/ | + | o | o | o | + | | | | | __ | | + | +---------\ | | / \ | | + | | | |___| | / |___| | + | |___| \ & / / / \ & / / ... + | \ & / \_/ / / \_/ / / + | \_/ | | / | | / + | | +------/ +-------/ + | | | | | | | | |___| |___| - | | \ & / \ & / - | | \_/ \_/ - | | | | + | | \ & / \ & / + | | \_/ \_/ + | | | | S0 S0'S1 S0'S1'S2 S0'S1'S2'S3 ... */ SigSpec decodedSelect; From af248c3cb27cd618fb0cf746c3d9bf03dd8e2f94 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 30 Dec 2024 17:16:47 -0800 Subject: [PATCH 04/11] format --- passes/opt/muxpack.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index bb2aa3cd73a..55b1f5bcbec 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -291,14 +291,14 @@ struct MuxpackWorker if (make_excl) { /* We create the following one-hot select line decoder - S0 S1 S2 S3 ... - | | | - +--------+ +----------+ +--------------+ | - | _|_ | _|_ | _|_ | - | \_/ | \_/ | \_/ | - | o | o | o | - | | | | | __ | | - | +---------\ | | / \ | | + S0 S1 S2 S3 ... + | | | | + +--------+ +----------+ +-------------+ | + | _|_ | _|_ | _|_ | + | \_/ | \_/ | \_/ | + | o | o | o | + | | | | | __ | | + | +----------+ | | / \ | | | | | |___| | / |___| | | |___| \ & / / / \ & / / ... | \ & / \_/ / / \_/ / / @@ -306,9 +306,9 @@ struct MuxpackWorker | | +------/ +-------/ | | | | | | | | |___| |___| - | | \ & / \ & / - | | \_/ \_/ - | | | | + | | \ & / \ & / + | | \_/ \_/ + | | | | S0 S0'S1 S0'S1'S2 S0'S1'S2'S3 ... */ SigSpec decodedSelect; From 163b1653b1865d8548cf0491cbe93ac49fb72787 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 30 Dec 2024 17:17:47 -0800 Subject: [PATCH 05/11] format --- passes/opt/muxpack.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 55b1f5bcbec..40f01a97e27 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -293,7 +293,7 @@ struct MuxpackWorker /* We create the following one-hot select line decoder S0 S1 S2 S3 ... | | | | - +--------+ +----------+ +-------------+ | + +--------+ +----------+ +-------------+ | | _|_ | _|_ | _|_ | | \_/ | \_/ | \_/ | | o | o | o | @@ -303,7 +303,7 @@ struct MuxpackWorker | |___| \ & / / / \ & / / ... | \ & / \_/ / / \_/ / / | \_/ | | / | | / - | | +------/ +-------/ + | | +------/ +-------/ | | | | | | | | |___| |___| | | \ & / \ & / From 11c9331a5195d5381f2b53aa66b991f10b76aa1a Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 30 Dec 2024 17:23:00 -0800 Subject: [PATCH 06/11] format --- passes/opt/muxpack.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 40f01a97e27..5ed7f34b2b0 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -297,17 +297,17 @@ struct MuxpackWorker | _|_ | _|_ | _|_ | | \_/ | \_/ | \_/ | | o | o | o | - | | | | | __ | | - | +----------+ | | / \ | | + | | | | | ___ | | + | +----------+ | | / | | | | | | |___| | / |___| | - | |___| \ & / / / \ & / / ... - | \ & / \_/ / / \_/ / / - | \_/ | | / | | / - | | +------/ +-------/ + | |___| | & | / / | & | / ... + | | & | \___/ / / \___/ / / + | \___/ | | / | | / + | | +------+ +-------+ | | | | | | | | |___| |___| - | | \ & / \ & / - | | \_/ \_/ + | | | & | | & | + | | \___/ \___/ | | | | S0 S0'S1 S0'S1'S2 S0'S1'S2'S3 ... */ From 0d5d7809f85cdc525a322ad7c7e44bd1b7b85c9c Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 30 Dec 2024 17:24:06 -0800 Subject: [PATCH 07/11] format --- passes/opt/muxpack.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 5ed7f34b2b0..a838a7bfca5 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -310,8 +310,8 @@ struct MuxpackWorker | | \___/ \___/ | | | | S0 S0'S1 S0'S1'S2 S0'S1'S2'S3 ... - */ - SigSpec decodedSelect; + */ + SigSpec decodedSelect; Cell *cell = last_cell; std::vector select_bits = s_sig.bits(); RTLIL::SigBit prevSigNot = RTLIL::State::S1; From fad1b285dfec82f292dd8b138c4b93a8e7fd94c6 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 30 Dec 2024 17:25:06 -0800 Subject: [PATCH 08/11] format --- passes/opt/muxpack.cc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index a838a7bfca5..06abb18fa76 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -290,27 +290,27 @@ struct MuxpackWorker } if (make_excl) { - /* We create the following one-hot select line decoder - S0 S1 S2 S3 ... - | | | | - +--------+ +----------+ +-------------+ | - | _|_ | _|_ | _|_ | - | \_/ | \_/ | \_/ | - | o | o | o | - | | | | | ___ | | - | +----------+ | | / | | | - | | | |___| | / |___| | - | |___| | & | / / | & | / ... - | | & | \___/ / / \___/ / / - | \___/ | | / | | / - | | +------+ +-------+ - | | | | | | - | | |___| |___| - | | | & | | & | - | | \___/ \___/ - | | | | - S0 S0'S1 S0'S1'S2 S0'S1'S2'S3 ... - */ + /* We create the following one-hot select line decoder + S0 S1 S2 S3 ... + | | | | + +--------+ +----------+ +-------------+ | + | _|_ | _|_ | _|_ | + | \_/ | \_/ | \_/ | + | o | o | o | + | | | | | ___ | | + | +----------+ | | / | | | + | | | |___| | / |___| | + | |___| | & | / / | & | / ... + | | & | \___/ / / \___/ / / + | \___/ | | / | | / + | | +------+ +-------+ + | | | | | | + | | |___| |___| + | | | & | | & | + | | \___/ \___/ + | | | | + S0 S0'S1 S0'S1'S2 S0'S1'S2'S3 ... + */ SigSpec decodedSelect; Cell *cell = last_cell; std::vector select_bits = s_sig.bits(); From 0a242f87b842fff77f1c377609fc354312c9a6a5 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Mon, 6 Jan 2025 11:07:39 -0800 Subject: [PATCH 09/11] Enable Formal --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d43620f169e..ecdac8e5379 100644 --- a/Makefile +++ b/Makefile @@ -709,6 +709,7 @@ include $(YOSYS_SRC)/frontends/ast/Makefile.inc include $(YOSYS_SRC)/frontends/blif/Makefile.inc include $(YOSYS_SRC)/frontends/liberty/Makefile.inc +include $(YOSYS_SRC)/passes/equiv/Makefile.inc OBJS += passes/cmds/select.o OBJS += passes/cmds/show.o From 2ae521bbd127219593d8e22aa3990073b43a9319 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Fri, 10 Jan 2025 13:55:23 -0800 Subject: [PATCH 10/11] Built-in splitfanout in muxpack --- passes/opt/muxpack.cc | 143 +++++++++++++++++++++++++++++++++++------- 1 file changed, 121 insertions(+), 22 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 06abb18fa76..5a1fef87da0 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -123,6 +123,10 @@ struct MuxpackWorker int mux_count, pmux_count; pool remove_cells; + // Driver data + dict> bit_drivers_db; + // Load data + dict>> bit_users_db; dict sig_chain_next; dict sig_chain_prev; @@ -131,6 +135,26 @@ struct MuxpackWorker pool candidate_cells; ExclusiveDatabase excl_db; + // Splitfanout limit + int limit = -1; + + bool fanout_in_range(SigSpec outsig) + { + // Check if output signal is "bit-split", skip if so + // This is a lookahead for the splitfanout pass that has this limitation + auto bit_users = bit_users_db[outsig[0]]; + for (int i = 0; i < GetSize(outsig); i++) { + if (bit_users_db[outsig[i]] != bit_users) { + return false; + } + } + + // Skip if fanout is above limit + if (limit != -1 && GetSize(bit_users) > limit) { + return false; + } + return true; + } void make_sig_chain_next_prev() { @@ -156,7 +180,10 @@ struct MuxpackWorker for (auto a_bit : a_sig) sigbit_with_non_chain_users.insert(a_bit); else { - sig_chain_next[a_sig] = cell; + if (fanout_in_range(y_sig)) { + sig_chain_next[a_sig] = cell; + candidate_cells.insert(cell); + } } if (!b_sig.empty()) { @@ -164,12 +191,18 @@ struct MuxpackWorker for (auto b_bit : b_sig) sigbit_with_non_chain_users.insert(b_bit); else { - sig_chain_next[b_sig] = cell; + if (fanout_in_range(y_sig)) { + sig_chain_next[b_sig] = cell; + candidate_cells.insert(cell); + } } } - candidate_cells.insert(cell); - sig_chain_prev[y_sig] = cell; + if (fanout_in_range(y_sig)) { + + // Mark cell as the previous in the chain relative to y_sig + sig_chain_prev[y_sig] = cell; + } continue; } @@ -356,10 +389,11 @@ struct MuxpackWorker } } - void cleanup() + void cleanup(bool remove_cell) { - for (auto cell : remove_cells) - module->remove(cell); + if (remove_cell) + for (auto cell : remove_cells) + module->remove(cell); remove_cells.clear(); sig_chain_next.clear(); @@ -368,18 +402,87 @@ struct MuxpackWorker candidate_cells.clear(); } - MuxpackWorker(Module *module, bool assume_excl, bool make_excl) : - module(module), sigmap(module), mux_count(0), pmux_count(0), excl_db(module, sigmap, assume_excl, make_excl) + MuxpackWorker(Design *design, Module *module, bool assume_excl, bool make_excl, int limit) + : module(module), sigmap(module), mux_count(0), pmux_count(0), excl_db(module, sigmap, assume_excl, make_excl), limit(limit) { + + // Build bit_drivers_db + log("Building bit_drivers_db...\n"); + for (auto cell : module->cells()) { + for (auto conn : cell->connections()) { + if (!cell->output(conn.first)) + continue; + for (int i = 0; i < GetSize(conn.second); i++) { + SigBit bit(sigmap(conn.second[i])); + bit_drivers_db[bit] = tuple(cell->name, conn.first, i); + } + } + } + + // Build bit_users_db + log("Building bit_users_db...\n"); + for (auto cell : module->cells()) { + for (auto conn : cell->connections()) { + if (!cell->input(conn.first)) + continue; + for (int i = 0; i < GetSize(conn.second); i++) { + SigBit bit(sigmap(conn.second[i])); + if (!bit_drivers_db.count(bit)) + continue; + bit_users_db[bit].insert( + tuple(cell->name, conn.first, i - std::get<2>(bit_drivers_db[bit]))); + } + } + } + + // Build bit_users_db for output ports + log("Building bit_users_db for output ports...\n"); + for (auto wire : module->wires()) { + if (!wire->port_output) + continue; + SigSpec sig(sigmap(wire)); + for (int i = 0; i < GetSize(sig); i++) { + SigBit bit(sig[i]); + if (!bit_drivers_db.count(bit)) + continue; + bit_users_db[bit].insert( + tuple(wire->name, IdString(), i - std::get<2>(bit_drivers_db[bit]))); + } + } + make_sig_chain_next_prev(); find_chain_start_cells(assume_excl); + // Deselect all cells + Pass::call(design, "select -none"); + bool has_cell_to_split = false; + for (auto c : chain_start_cells) { + vector chain = create_chain(c); + for (auto cell : chain) { + has_cell_to_split = true; + // Select the cells that are candidate + design->select(module, cell); + } + } + // Clean up + cleanup(false); + + // Make sure we dup the cells with fanout, else the resulting + // transform is not logically equivalent + if (has_cell_to_split) + Pass::call(design, "splitfanout"); + // Reset selection for other passes + Pass::call(design, "select -clear"); + // Recreate sigmap + sigmap.set(module); + + // Make the actual transform for (auto c : chain_start_cells) { - vector chain = create_chain(c); + vector chain = create_chain(c); process_chain(chain, make_excl); } - - cleanup(); + // Clean up + cleanup(true); } }; @@ -399,8 +502,8 @@ struct MuxpackPass : public Pass { log("whose select lines are driven by '$eq' cells with other such cells if it can be\n"); log("certain that their select inputs are mutually exclusive.\n"); log("\n"); - log(" -splitfanout\n"); - log(" run splitfanout pass first\n"); + log(" -fanout_limit n\n"); + log(" max fanout to split.\n"); log("\n"); log(" -assume_excl\n"); log(" assume mutually exclusive constraint when packing (may result in inequivalence)\n"); @@ -410,18 +513,17 @@ struct MuxpackPass : public Pass { } void execute(std::vector args, RTLIL::Design *design) override { - bool splitfanout = false; bool assume_excl = false; bool make_excl = false; - + int limit = -1; log_header(design, "Executing MUXPACK pass ($mux cell cascades to $pmux).\n"); size_t argidx; for (argidx = 1; argidx < args.size(); argidx++) { - if (args[argidx] == "-splitfanout") { - splitfanout = true; + if (args[argidx] == "-fanout_limit" && argidx + 1 < args.size()) { + limit = std::stoi(args[++argidx]); continue; } if (args[argidx] == "-assume_excl") { @@ -437,14 +539,11 @@ struct MuxpackPass : public Pass { } extra_args(args, argidx, design); - if (splitfanout) - Pass::call(design, "splitfanout -limit 256 t:$mux t:$pmux"); - int mux_count = 0; int pmux_count = 0; for (auto module : design->selected_modules()) { - MuxpackWorker worker(module, assume_excl, make_excl); + MuxpackWorker worker(design, module, assume_excl, make_excl, limit); mux_count += worker.mux_count; pmux_count += worker.pmux_count; } From 0f9901f1286a5d824e082c1caead1103bd465d1c Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Fri, 10 Jan 2025 14:51:21 -0800 Subject: [PATCH 11/11] forgot to recompute chains --- passes/opt/muxpack.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 5a1fef87da0..5bd5c3957b4 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -476,6 +476,9 @@ struct MuxpackWorker // Recreate sigmap sigmap.set(module); + make_sig_chain_next_prev(); + find_chain_start_cells(assume_excl); + // Make the actual transform for (auto c : chain_start_cells) { vector chain = create_chain(c);