Robert O'Callahan
03127173c6
Fix const_iterator postincrement behavior
2025-09-16 03:17:22 +00:00
Jannis Harder
09742e27f7
Merge pull request #5266 from rocallahan/abc-parallel
...
Run ABC passes in parallel
2025-09-15 18:49:27 +02:00
Emil J
475d455698
Merge pull request #5346 from YosysHQ/emil/verilog-codeowner
...
CODEOWNERS: add myself for read_verilog and AST
2025-09-15 17:38:00 +02:00
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
Robert O'Callahan
27462da208
Run ABCs in parallel.
...
Large circuits can run hundreds or thousands of ABCs in a single AbcPass.
For some circuits, some of those ABC runs can run for hundreds of seconds.
Running ABCs in parallel with each other and in parallel with main-thread
processing (reading and writing BLIF files, copying ABC BLIF output into
the design) can give large speedups.
2025-09-15 17:18:42 +02:00
Robert O'Callahan
38f8165c80
Remove direct RTLIL access from gate_t
2025-09-15 17:10:20 +02:00
Robert O'Callahan
222f457a04
Only write out stdcells/lutcosts once for all ABC runs
2025-09-15 17:10:07 +02:00
Robert O'Callahan
13b3418a7f
Split abc_module()
into prepare_module()
and run_abc()
...
`prepare_module()` will have to run on the main thread.
2025-09-15 17:01:25 +02:00
Emil J. Tywoniak
1c422fcb6e
CODEOWNERS: add myself for read_verilog and AST
2025-09-15 16:48:56 +02:00
Emil J
7d82d80a95
Merge pull request #5344 from higuoxing/midrule
...
verilog_parser: replace manual AST node allocation with typed midrule actions
2025-09-15 16:20:47 +02:00
Claire Xen
a2fc7e4dd7
Merge pull request #4252 from zapta/master
...
Added to the Show command a -wireshape <graphviz-shape> flag.
2025-09-15 15:40:40 +02:00
Emil J
1ed4053d1c
Merge pull request #5337 from YosysHQ/emil/fix-tests-CXX
...
tests: replace CC and gcc with CXX and g++
2025-09-15 14:35:21 +02:00
Xing Guo
3d2bb1db17
verilog_parser: replace manual AST node allocation with typed midrule actions
...
Use Bison's typed midrule actions to construct AST_FCALL nodes
with std::unique_ptr, replacing manual 'new' and extra->ast_stack
management. This improves type safety, ensures proper ownership, and
eliminates potential memory leaks.
Ref: https://www.gnu.org/software/bison/manual/html_node/Typed-Midrule-Actions.html
2025-09-13 11:23:42 +08:00
github-actions[bot]
fa02d71f65
Bump version
2025-09-13 00:20:53 +00:00
Jannis Harder
193b057983
Merge pull request #5341 from rocallahan/more-varargs-conversion
...
More varargs conversion
2025-09-12 18:09:42 +02:00
Jannis Harder
b87a33d64e
Merge pull request #5211 from rocallahan/remove-log_str
...
Remove `log_str()` functions and convert their `log_signal()` users t…
2025-09-12 14:10:47 +02:00
Jannis Harder
dd9627ed05
Merge pull request #5336 from rocallahan/remove-log-cstr
...
Remove `.c_str()` calls from `log()`/`log_error()`
2025-09-12 14:09:48 +02:00
Jannis Harder
6d8dfb0750
Merge pull request #5340 from rocallahan/IdString-dead-code
...
When looking up the IdString table, it can never be empty after we've called prepopulate, so remove some dead code.
2025-09-12 14:07:28 +02:00
Jannis Harder
0ddbb5b36c
Merge pull request #5342 from YosysHQ/jix/workflow-updates
...
Updates to the CI workflows
2025-09-12 10:46:38 +02:00
Krystine Sherwin
7e1292dd2d
CI: brew install autoconf for iverilog
2025-09-12 10:41:01 +02:00
Krystine Sherwin
f102b25914
Reapply "Merge pull request #5301 from KrystalDelusion/krys/re_5280"
...
This reverts commit 88eb83a0c3
.
2025-09-12 10:41:01 +02:00
Robert O'Callahan
f4699e2b10
Remove unnecessary c_str() calls from err_at_loc/warn_at_loc
2025-09-12 06:21:56 +00:00
Robert O'Callahan
8cd3c069d6
Use C++ stringf machinery in verilog_error
2025-09-12 06:21:56 +00:00
Robert O'Callahan
733b6f0124
Remove unnecessary usage of .c_str() in parameters to input_error()
2025-09-12 06:03:05 +00:00
Robert O'Callahan
ad4ef8b775
Make AstNode::input_error use C++ stringf machinery
2025-09-12 06:01:32 +00:00
Robert O'Callahan
ff5177ce8e
Remove .c_str() from parameters to btorf() and infof()
2025-09-12 05:53:59 +00:00
Robert O'Callahan
6f0c8f56a3
Convert btorf()/infof() to C++ stringf machinery
2025-09-12 05:53:19 +00:00
Robert O'Callahan
b98e54416f
When looking up the IdString table, it can never be empty after we've called prepopulate, so remove some dead code.
2025-09-12 05:29:22 +00:00
github-actions[bot]
727998f663
Bump version
2025-09-12 00:22:43 +00:00
Robert O'Callahan
e0ae7b7af4
Remove .c_str() calls from log()/log_error()
...
There are some leftovers, but this is an easy regex-based approach that removes most of them.
2025-09-11 20:59:37 +00:00
Emil J
2ec119854c
Merge pull request #5335 from higuoxing/attr_list
...
verilog_parser: Use unique_ptr<> to store the attribute list.
2025-09-11 17:21:46 +02:00
Emil J. Tywoniak
bc24947a84
tests: replace CC and gcc with CXX and g++
2025-09-11 16:50:23 +02:00
Robert O'Callahan
c7017f7f79
Remove log_str()
functions and convert their log_signal()
users to return std::string
...
This is a small but easy step towards removing the `log_id_cache`.
See issue #5210 .
2025-09-11 04:00:49 +00:00
Xing Guo
9a6f25fb73
verilog_parser: Use unique_ptr<> to store the attribute list.
...
We can get rid of the new / delete statements and free_attr() and we
don't need to manage the memory manually.
2025-09-11 09:57:45 +08:00
github-actions[bot]
c2291c10a6
Bump version
2025-09-10 00:22:30 +00:00
Emil J
201c40072c
Merge pull request #5327 from YosysHQ/emil/do_insert-dont-build-new-hash
...
hashlib: don't build an unused hash for expired value in do_insert
2025-09-09 21:53:39 +02:00
Emil J
5278b9cfe1
Merge pull request #5332 from YosysHQ/parse_specify-rebased
...
Add state_dependent_path_declaration so that `ifnone` can be parsed (rebased)
2025-09-09 21:53:04 +02:00
Jannis Harder
04de6209da
Merge pull request #5243 from rocallahan/typed-log
...
Make `log` functions variadic templates
2025-09-09 17:38:09 +02:00
Jannis Harder
75a97241fa
Maintain logging ABI compatiblity with YosysHQ Verific Extensions
...
The YosysHQ Verific Extensions are compiled separately using their own
stripped-down version of the Yosys headers. To maintain ABI
compatibility with older extension builds post C++-ification of Yosys's
logging APIs, which are backwards compatible on the API but not ABI
level, this commit adds ABI compatible versions of a subset of the old
logging API used by the extensions.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
a137d03c32
Make log_cmd_error() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
243f5f5201
Make log_file_error() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
974455378b
Make log_error() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
c3924d0616
Move log_abort()'s call to log_error() into an out-of-line non-varargs function
2025-09-09 15:41:03 +02:00
Robert O'Callahan
1b5373de0d
Move log_assert_worker()'s call to log_error() into an out-of-line non-varags function
2025-09-09 15:41:03 +02:00
Robert O'Callahan
ea2bb5b79a
Make log_file_info() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
ec5f62e6d4
Make log_file_warning() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
9764fa5c41
Remove superfluous/wasteful .c_str()s in log_file_warning() filename parameter
2025-09-09 15:41:03 +02:00
Robert O'Callahan
2a2c586e2c
Make log_experimental() just take an std::string, since it doesn't need to be varargs.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
25cba6181e
Make log_warning()/log_warning_noprefix() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
66d2c2af08
Make log_header()
use variadic templates.
2025-09-09 15:41:03 +02:00