3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-22 09:21:29 +00:00
yosys/passes/techmap
Robert O'Callahan ae0ca7578a Use a pool of ABC processes.
Doing ABC runs in parallel can actually make things slower when every ABC run requires
spawning an ABC subprocess --- especially when using popen(), which on glibc does not
use vfork(). What seems to happen is that constant fork()ing keeps making the main
process data pages copy-on-write, so the main process code that is setting up each ABC
call takes a lot of minor page-faults, slowing it down.

The solution is pretty straightforward although a little tricky to implement.
We just reuse ABC subprocesses. Instead of passing the ABC script name on the command
line, we spawn an ABC REPL and pipe a command into it to source the script. When that's
done we echo an `ABC_DONE` token instead of exiting. Yosys then puts the ABC process
onto a stack which we can pull from the next time we do an ABC run.

For one of our large designs, this is an additional 5x speedup of the primary AbcPass.
It does 5155 ABC runs, all very small; runtime of the AbcPass goes from 760s to 149s
(not very scientific benchmarking but the effect size is large).
2025-09-15 17:22:15 +02:00
..
abc.cc Use a pool of ABC processes. 2025-09-15 17:22:15 +02:00
abc9.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
abc9_exe.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
abc9_ops.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
abc_new.cc Remove .c_str() from stringf parameters 2025-09-01 23:34:42 +00:00
aigmap.cc Reinstate #4768 2025-04-08 11:58:05 +12:00
alumacc.cc macc: Rename 'ports' to 'terms' throughout codebase 2025-03-18 13:25:10 +01:00
attrmap.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
attrmvcp.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
bmuxmap.cc Updated changelog 2023-02-08 10:11:47 +01:00
booth.cc Remove .c_str() from stringf parameters 2025-09-01 23:34:42 +00:00
bufnorm.cc bufnorm: preserve constant bits when mapping back to connections 2024-11-12 01:05:15 +01:00
bwmuxmap.cc Add bwmuxmap pass 2022-11-30 18:50:53 +01:00
cellmatch.cc cellmatch: Visit whiteboxes for -derive_luts 2024-11-04 14:28:46 +01:00
clkbufmap.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
clockgate.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
constmap.cc Add check at constmap and merge test 2025-04-14 11:44:52 +01:00
deminout.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
demuxmap.cc Add $bmux and $demux cells. 2022-01-28 23:34:41 +01:00
dffinit.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
dfflegalize.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
dfflibmap.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
dffunmap.cc Fitting help messages to 80 character width 2022-08-24 10:40:57 +12:00
extract.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
extract_counter.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
extract_fa.cc extract_fa: Invert xor3/xnor3 output when inverting majority3 input 2025-01-30 18:45:07 +01:00
extract_reduce.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
extractinv.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
filterlib.cc Moved dfflibmap from passes/dfflibmap to passes/techmap 2013-10-16 15:32:26 +02:00
flowmap.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
hilomap.cc Move implementation to constmap and add test 2025-03-26 11:52:55 +00:00
insbuf.cc Add insbuf -chain mode 2022-12-01 10:02:35 +01:00
iopadmap.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
libcache.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
libparse.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
libparse.h Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
lut2mux.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
maccmap.cc macc: Rename 'ports' to 'terms' throughout codebase 2025-03-18 13:25:10 +01:00
Makefile.inc Reapply "Add groups to command reference" 2025-08-06 13:52:12 +12:00
muxcover.cc muxcover: do not add decode muxes with x inputs 2023-01-26 05:19:45 +00:00
nlutmap.cc Reinstate #4768 2025-04-08 11:58:05 +12:00
pmuxtree.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
shregmap.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
simplemap.cc opt_clean, simplemap: Add $buf handling 2025-03-07 16:08:38 +01:00
simplemap.h Add bitwise $bweqx and $bwmux cells 2022-11-30 18:24:35 +01:00
techmap.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
tribuf.cc tribuf: -formal option: convert all to logic and detect conflicts 2022-04-12 12:46:22 +02:00
zinit.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00