From 8aebec79a850276c3d32b2935900e75d3951c065 Mon Sep 17 00:00:00 2001 From: AdvaySingh1 Date: Fri, 27 Mar 2026 15:41:44 -0700 Subject: [PATCH] Added -filter_non_trigger_outputs knob --- passes/techmap/abc.cc | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc index a01fcd08d..529888e7f 100644 --- a/passes/techmap/abc.cc +++ b/passes/techmap/abc.cc @@ -150,6 +150,7 @@ struct AbcConfig int abc_max_node_retention_origins = 5; // number of node retention origins (default 5) std::string signal_map_file; std::string cdc_file; + bool filter_non_trigger_outputs = false; }; struct AbcSigVal { @@ -1214,14 +1215,15 @@ void RunAbcState::run(ConcurrentStack &process_pool) fprintf(f, " dummy_input\n"); fprintf(f, "\n"); - // Only keep the output port whose signal originates from the miter equiv NOT cell - for (auto &si : signal_list) { - if (!si.is_port || si.type == G(NONE)) - continue; - if (si.type == G(FF) || si.type == G(FF0) || si.type == G(FF1)) - continue; - if (si.bit_str.find("trigger") == std::string::npos) - si.is_port = false; + if (config.filter_non_trigger_outputs) { + for (auto &si : signal_list) { + if (!si.is_port || si.type == G(NONE)) + continue; + if (si.type == G(FF) || si.type == G(FF0) || si.type == G(FF1)) + continue; + if (si.bit_str.find("trigger") == std::string::npos) + si.is_port = false; + } } int count_output = 0; @@ -1229,7 +1231,7 @@ void RunAbcState::run(ConcurrentStack &process_pool) for (auto &si : signal_list) { if (!si.is_port || si.type == G(NONE)) continue; - if (si.type == G(FF) || si.type == G(FF0) || si.type == G(FF1)) + if (config.filter_non_trigger_outputs && (si.type == G(FF) || si.type == G(FF0) || si.type == G(FF1))) continue; fprintf(f, " ys__n%d", si.id); po_map[count_output++] = si.bit_str; @@ -2124,6 +2126,10 @@ struct AbcPass : public Pass { log(" write a mapping of signals that cross clock domain boundaries.\n"); log(" each line lists a signal and the domain indices it bridges.\n"); log("\n"); + log(" -filter_non_trigger_outputs\n"); + log(" only keep output ports whose signal name contains 'trigger'.\n"); + log(" intended for miter/equivalence-checking flows. off by default.\n"); + log("\n"); log(" -reserved_cores \n"); log(" number of CPU cores to reserve for the main thread and other work.\n"); log(" Default is 4. The actual number of worker threads used is:\n"); @@ -2195,6 +2201,7 @@ struct AbcPass : public Pass { config.reserved_cores = design->scratchpad_get_int("abc.reserved_cores", 4); config.signal_map_file = design->scratchpad_get_string("abc.signal_map", ""); config.cdc_file = design->scratchpad_get_string("abc.cdc_map", ""); + config.filter_non_trigger_outputs = design->scratchpad_get_bool("abc.filter_non_trigger_outputs", false); if (config.cleanup) config.global_tempdir_name = get_base_tmpdir() + "/"; @@ -2346,6 +2353,10 @@ struct AbcPass : public Pass { config.cdc_file = args[++argidx]; continue; } + if (arg == "-filter_non_trigger_outputs") { + config.filter_non_trigger_outputs = true; + continue; + } break; } extra_args(args, argidx, design);