From 55782682de4b1deb3b1e65556694301d3b420d29 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Wed, 14 Aug 2024 05:27:50 -0700 Subject: [PATCH] Iterative muxpack --- passes/opt/muxpack.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index aa75efe65..1eb5e8282 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -375,9 +375,13 @@ struct MuxpackPass : public Pass { int pmux_count = 0; for (auto module : design->selected_modules()) { - MuxpackWorker worker(module, ignore_excl); - mux_count += worker.mux_count; - pmux_count += worker.pmux_count; + bool done = false; + while (!done) { + MuxpackWorker worker(module, ignore_excl); + mux_count += worker.mux_count; + pmux_count += worker.pmux_count; + done = worker.pmux_count == 0; + } } log("Converted %d (p)mux cells into %d pmux cells.\n", mux_count, pmux_count);