From 900f8408af6f533bdd98c405fee2fea7eebb0c02 Mon Sep 17 00:00:00 2001 From: AdvaySingh1 Date: Mon, 2 Feb 2026 10:27:33 -0800 Subject: [PATCH] Fixed read_until_abc_done --- passes/techmap/abc.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc index d58851bd3..88d3ba1a9 100644 --- a/passes/techmap/abc.cc +++ b/passes/techmap/abc.cc @@ -1149,6 +1149,12 @@ bool read_until_abc_done(abc_output_filter &filt, int fd, DeferredLogs &logs) { // Ignore any leftover output, there should only be a prompt perhaps return true; } + // If ABC aborted the sourced script, it returns to the prompt and will + // never print YOSYS_ABC_DONE. Treat this as a failed run, not a hang. + if (line.substr(0, 7) == "Error: ") { + logs.log_error("ABC: %s", line.c_str()); + return false; + } filt.next_line(line); line.clear(); start = p + 1; @@ -1157,6 +1163,7 @@ bool read_until_abc_done(abc_output_filter &filt, int fd, DeferredLogs &logs) { } } + void RunAbcState::run(ConcurrentStack &process_pool) { std::string buffer = stringf("%s/input.blif", tempdir_name);