nella
bc07c6b1b0
Improve arith_tree: FMA add, elarith WIP.
2026-06-08 13:29:05 +02:00
Miodrag Milanovic
102f008194
Remove EMSCRIPTEN leftovers
2026-06-05 10:03:27 +02:00
Miodrag Milanovic
58f44a1c1b
Fix compile with VisualStudio
2026-06-04 12:25:41 +02:00
Krystine Sherwin
72f5836fb1
docs: Resolving todos
...
Make explicit the location for the `CMakeUserPresets.json` file.
Update docs tests documentation.
Move `BUILD_DIR` and `PROGRAM_PREFIX` comments into the functional tests todo.
Add cmake to MacPorts/FreeBSD install instructions.
Add ccache to example `CMakeUserPresets.json` (it isn't otherwise documented, and is no longer as obvious without an `ENABLE_CCACHE` makevar).
Addressing comments
2026-06-04 20:35:52 +12:00
Krystine Sherwin
7c24b69e62
register.cc: Make cmd paths proximate
...
The CMake refactor changes relative paths to absolute when calling `source_location::current()`. Use the path to `register.cc` to find the root yosys dir, and use that as the base for other paths.
Includes provisions for when plugins have a valid location; if it's not in the yosys source tree we shouldn't try to make the path relative, and we shouldn't try to auto group by path (since such groups will never be allocated, leaving them as unknown is preferable).
Limited to non wasm (I think that's the only one where we can't (easily) use `<filesystem>`). But where we do use `<filesystem>` we can also simplify the auto group to use `fs::path::parent_path()`.
2026-06-04 20:34:52 +12:00
Catherine
afc0e78d11
Update top-level Python project for CMake compatibility.
...
This commit reimplements the (no longer recommended) setuptools based
build system using a standards-based in-tree PEP517 build backend.
The implementation is partially based on
https://codeberg.org/ziglang/zig-pypi/src/branch/main/make_wheels.py
which is licensed under BSD-0-clause.
It also adds a new option `YOSYS_BUILD_PYTHON_ONLY` that is available
only if the binary or the library aren't going to be installed, which
turns off these targets entirely, as well as some dependent ones
(e.g. tests).
Co-authored-by: Mohamed Gaber <me@donn.website>
2026-06-03 09:03:23 +00:00
Catherine
780588f28c
Drop `YOSYS_ENABLE_HELP_SOURCE` since C++20 is required.
2026-06-03 08:58:11 +00:00
Catherine
0d15cb55bf
Fix Windows portability issues that break MSVC build.
2026-06-03 08:58:11 +00:00
Miodrag Milanovic
ce280354cf
Update CI scripts for CMake
...
Co-authored-by: Catherine <whitequark@whitequark.org>
2026-06-03 08:58:11 +00:00
Catherine
a727e7f6e7
Migrate build system to CMake
...
See #5895 for details.
This commit does not include CI or documentation changes.
2026-06-03 08:58:10 +00:00
Emil J. Tywoniak
0c2786be1f
threading: make no-op locks specialized to Mutex instead of templates
2026-05-18 16:26:14 +02:00
Emil J. Tywoniak
1c831aa50d
threading: whitespace
2026-05-18 16:26:14 +02:00
Emil J. Tywoniak
d322e2fbe0
threading: redirect locks to no-op when ENABLE_THREADS=0 or undefined YOSYS_ENABLE_THREADS
2026-05-18 16:14:01 +02:00
Miodrag Milanovic
75dcbe03c6
Convert RTLIL::unescape_id of IdString to unescape()
2026-05-16 19:49:45 +02:00
Miodrag Milanovic
8bbc3c359c
Remove id2cstr uses in our code base
2026-05-16 19:49:45 +02:00
Miodrag Milanović
1d87cefd80
Merge pull request #5882 from YosysHQ/std_cpp20
...
Bump required standard to C++20
2026-05-15 13:13:43 +00:00
Miodrag Milanović
36eceed720
Merge pull request #5862 from codexplorer-fish/cleaning-up-log-id
...
Cleaning up log_id()
2026-05-15 11:07:43 +00:00
Miodrag Milanovic
70b17181b4
Bump gcc and clang versions
2026-05-14 10:51:40 +02:00
nella
7d3e56523b
Preserve param signedness across overrides.
2026-05-13 16:25:15 +02:00
Miodrag Milanovic
105011a53b
Zero array for for MSVC
2026-05-13 12:05:13 +02:00
Miodrag Milanovic
1ef6311e5b
Update documentation and few more defines
2026-05-13 11:24:45 +02:00
Miodrag Milanovic
1e28e8ccab
Handle unused variable for WIN32
2026-05-13 09:49:39 +02:00
Emil J. Tywoniak
74efc883c7
threading: temporarily cast to void unused stuff, until we rework single-threaded builds again
2026-05-12 23:16:43 +02:00
Emil J. Tywoniak
4eb1c61bd5
hashlib: error on unused containers
2026-05-12 12:51:41 +02:00
Codexplorer
e41b969da2
Refactored uses of log_id()
2026-05-08 20:59:24 -07:00
Codexplorer
89d83a3410
Logging now handles classes with an IdString "name" member
2026-05-08 16:30:25 -07:00
Lofty
ab316c14d2
Merge pull request #5844 from YosysHQ/lofty/abc-refactor-5
...
abc_new: integration testing via synth_gatemate
2026-05-06 13:40:15 +00:00
Lofty
de1dd3b1c5
add aiger2_zbuf to constids
2026-05-06 14:03:07 +01:00
bin
5dfe1937a0
Upgrade to WASI SDK 33 and enable exceptions
2026-05-01 13:30:43 -04:00
Emil J
627b691578
Merge pull request #5831 from stashcroft/main
...
Make sure co-simulation only uses integer arithmetic
2026-04-27 14:03:58 +00:00
Emil J
ec0a102302
Merge pull request #5832 from YosysHQ/emil/simple-extract
...
rtlil: rewrite SigSpec::extract for perf and packing
2026-04-24 19:03:53 +00:00
Emil J. Tywoniak
10bbda93f7
rtlil: extend SigSpec::extract test
2026-04-24 11:04:19 +02:00
Emil J. Tywoniak
25b9b796c4
rtlil: complicate extract again for packing
2026-04-24 11:04:19 +02:00
Scott Ashcroft
23a05fcf35
Add comments to make sure it is clear scale is an exponent of 10
2026-04-23 17:22:14 +01:00
Scott Ashcroft
e69341cd5f
Make sure co-simulation only uses integer arithmetic
2026-04-23 17:22:14 +01:00
Emil J. Tywoniak
14b0efeced
rtlil: simplify extract for performance
2026-04-23 13:58:20 +02:00
Emil J
64e7ce2f57
Merge pull request #5803 from YosysHQ/emil/specrule-port-sanity
...
Fix $specrule port naming inconsistency
2026-04-22 10:46:36 +00:00
Petter Reinholdtsen
89d360aa4a
Rewrote Linux edition of proc_self_dirname() to handle any symlink length.
...
This make sure the method work also when the program is located in
deep or long file paths, longer than both PATH_MAX and "getconf
PATH_MAX .". Use the same code on GNU Hurd, where it now work.
I am not sure how to test this in a platform independent way.
2026-04-19 20:56:05 +02:00
Emil J. Tywoniak
0b3d03e69c
newcelltypes: fix $specrule port naming
2026-04-13 22:34:46 +02:00
Emil J. Tywoniak
3e45f9729e
fix $specrule port naming
2026-04-13 22:34:46 +02:00
nella
a02c238874
Consolidate Wallace from booth and CSA.
2026-04-13 12:48:05 +02:00
Lofty
d51a5535c7
Merge pull request #5798 from rocallahan/hashtable-destruction-race
...
Avoid racing accesses to shards[0] in ShardedHashtable parallel destruction
2026-04-11 10:25:58 +00:00
nella
a54bca5493
Merge pull request #5794 from rocallahan/dispatch-pool-destruction
...
Fix data race in ParallelDispatchThreadPool destruction
2026-04-09 09:57:25 +00:00
Robert O'Callahan
1f6559a5cf
Avoid racing accesses to shards[0] in ShardedHashtable parallel destruction
2026-04-08 21:56:36 +00:00
Emil J
b485173428
Merge pull request #5792 from YosysHQ/emil/toposort-stability
...
toposort: avoid run to run variance caused by pointer sensitivity
2026-04-08 08:51:47 +00:00
Robert O'Callahan
d586af0074
Fix data race in ParallelDispatchThreadPool destruction
2026-04-07 23:21:17 +00:00
Emil J. Tywoniak
41b41fefb3
utils: forbid the use of std::less on pointers in TopoSort
2026-04-06 15:09:52 +02:00
Emil J. Tywoniak
2033df5958
utils: refactor TopoSort
2026-04-06 15:09:52 +02:00
Lofty
162eeea29a
cellaigs: remove some dead code
2026-03-31 09:37:18 +01:00
Robert O'Callahan
290fb0556d
Prevent race on `num_active_worker_threads_`.
...
The core issue here is that we need to ensure `num_active_worker_threads_`
is read before incrementing `done_workers`. See the comments
added in this PR to explain why, and why the resulting code is
race-free.
2026-03-24 22:20:18 +00:00
Emil J
7b2ab9b245
Merge pull request #5763 from YosysHQ/emil/c-slow-init
...
genrtlil: fast memory initialization
2026-03-23 10:21:21 +00:00
nella
ee0461eb00
Change time log format.
2026-03-19 14:38:22 +01:00
nella
d6ab610622
Implement wall clock time meas.
2026-03-19 14:38:22 +01:00
Emil J. Tywoniak
ea11453cef
rtlil: faster remove2
2026-03-18 23:33:35 +01:00
Emil J
c8f715fed8
Merge pull request #5664 from rocallahan/parallel-opt-clean
...
Parallelize `opt_clean` pass
2026-03-16 09:52:34 +00:00
Drew Lewis
4251cd69ed
Fix missing return in NDEBUG case
...
Signed-off-by: Drew Lewis <cannada@google.com>
2026-03-13 19:51:49 +00:00
Emil J
2f1cdc2df9
Merge pull request #5728 from povik/tcl-set-result
...
Replace deprecated Tcl API to fix use-after-free
2026-03-06 13:36:48 +00:00
Martin Povišer
167c6c4585
Replace deprecated Tcl API to fix use-after-free
...
Under Tcl 9.0 the Tcl_SetResult utility is a macro:
#define Tcl_SetResult(interp, result, freeProc) \
do { \
const char *__result = result; \
Tcl_FreeProc *__freeProc = freeProc; \
Tcl_SetObjResult(interp, Tcl_NewStringObj(__result, -1)); \
if (__result != NULL && __freeProc != NULL && __freeProc != TCL_VOLATILE) { \
if (__freeProc == TCL_DYNAMIC) { \
Tcl_Free((char *)__result); \
} else { \
(*__freeProc)((char *)__result); \
} \
} \
} while(0)
Temporaries constructed as part of the 'result' expression will be
dropped before the 'result' pointer is used. What was safe when
Tcl_SetResult was a function isn't safe with the macro definition.
Transition away from deprecated SetResult to calling
SetObjResult/MewStringObj directly.
2026-03-06 11:52:17 +01:00
Robert O'Callahan
ac55935a68
Add unit-tests for `ParallelDispatchThread` and friends
2026-03-06 02:20:08 +00:00
Robert O'Callahan
b42bb05b63
Parallelize `Design::check()`
2026-03-06 02:03:21 +00:00
Robert O'Callahan
e2166c4684
Parallelize `collect_garbage()`
2026-03-06 02:03:21 +00:00
Robert O'Callahan
5ff7d344c9
Add `FfInitVals::set_parallel()` method
...
We'll use this later in the PR.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
fe329a0e14
Add `MonotonicFlag`
...
We'll use this later in the PR.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
e71da96314
Add `ConcurrentWorkQueue`
...
We'll use this later in the PR.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
ab238c3145
Add `ShardedHashSet`
...
We'll use this later in the PR.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
87521df534
Add `ShardedVector`
...
We'll use this later in the PR.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
b079e5721c
Add `ParallelDispatchThreadPool`
...
We'll use this later in the PR.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
898a288a99
Add `work_pool_size`, `IntRange`, `item_range_for_worker`, and `ThreadIndex`
...
We'll use these later in this PR.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
bd7f2d9ba4
Make `log_error()` work in a `Multithreaded` context.
...
`log_error()` causes an exit so we don't have to try too hard here. The main
thing is to ensure that we normally are able to exit without causing a stack
overflow due to recursive asserts about not being in a `Multithreaded` context.
2026-03-06 02:03:21 +00:00
Robert O'Callahan
7af5dbae35
Add `IdString::unescape()` method
...
We've already talked about adding this as an alternative to `log_id()`, and we'll
need it later in this PR.
2026-03-06 02:03:21 +00:00
Emil J. Tywoniak
23eb38fe3f
celltypes: include newcelltypes to allow legacy code access to migrated yosys_celltypes
2026-03-05 11:59:20 +01:00
Emil J. Tywoniak
6485a13809
newcelltypes: mark header unstable
2026-03-04 15:17:26 +01:00
nella
04822c6660
Readd builtin_ff_cell_types for plugin parity.
2026-03-04 12:39:45 +01:00
nella
66bd4716cf
rtlil use newcelltypes.
2026-03-04 12:39:45 +01:00
Emil J. Tywoniak
0284595e9c
celltypes: fix absurd eval declarations
2026-03-04 12:39:45 +01:00
Emil J. Tywoniak
793a3513c6
newcelltypes: use unordered_map
2026-03-04 12:39:45 +01:00
Emil J. Tywoniak
661fcb24cb
newcelltypes: fix MSVC build
2026-03-04 12:39:45 +01:00
Emil J. Tywoniak
12412d1fa5
register: use newcelltypes
2026-03-04 12:39:45 +01:00
Emil J. Tywoniak
ecb8b20f62
yosys: use newcelltypes for yosys_celltypes users
2026-03-04 12:39:44 +01:00
Emil J. Tywoniak
5216d32d1b
yosys: use newcelltypes for yosys_celltypes
2026-03-04 12:22:47 +01:00
Emil J. Tywoniak
c3ed884bc4
drivertools: use newcelltypes
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
31b86ebc2e
newcelltypes: comment
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
8e17fb0266
consteval: use newcelltypes
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
a0f87dc2d1
modtools: use newcelltypes
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
a9463d1aee
newcelltypes: fix non-cells
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
e3f9911e33
newcelltypes: refactor
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
07ec8708e4
share: use newcelltypes
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
3212dfaf1f
newcelltypes: fix unit test
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
7e9e88c2ec
newcelltypes: bounds check
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
9e59f05c25
newcelltypes: wrap design celltypes support
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
35ccaa60d7
newcelltypes: TurboCellTypes -> StaticCellTypes
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
6adc08b0e5
opt_expr: use newcelltypes
2026-03-04 12:22:14 +01:00
Emil J. Tywoniak
a61455645d
newcelltypes: init
2026-03-04 12:22:14 +01:00
Emil J
5f8489d36d
Merge pull request #5666 from YosysHQ/emil/equiv_induct-missing-model-errors
...
equiv_induct: error on missing model
2026-02-25 15:39:31 +01:00
Emil J
74f7b0cf92
Merge pull request #5685 from chathhorn-galois/chathhorn/issue5684
...
Fix segfault from shift with 0-width signed arg.
2026-02-20 11:53:05 +01:00
Emil J
53509a9b2a
Merge pull request #5692 from YosysHQ/emil/modtools-fix-db-port-deletion
...
modtools: fix database sanity
2026-02-20 10:49:28 +01:00
Emil J. Tywoniak
abc7563a35
modtools: add ModIndex unit test
2026-02-18 22:15:44 +01:00
Emil J. Tywoniak
c75d80905a
modtools: fix database sanity on wire name swap
2026-02-18 21:23:21 +01:00
Gus Smith
29a270c4b6
Merge pull request #5675 from rowanG077/add-missing-celledges
...
kernel/celledges: cover more cell types
2026-02-18 07:50:41 -08:00
Emil J. Tywoniak
62f19cb3a9
modtools: fix port_del db erase
2026-02-18 12:20:36 +01:00