Commit Graph

17241 Commits

Author SHA1 Message Date
Miodrag Milanovic 4b5fb15579 use env for bash 2026-06-05 09:18:05 +02:00
Miodrag Milanovic 5f2456ac03 WASI now support filesystem 2026-06-05 09:18:00 +02:00
Miodrag Milanović d7093743b8
Merge pull request #5932 from YosysHQ/cmake_fixes
Populate link_flags in yosys-config
2026-06-04 11:10:02 +00:00
Miodrag Milanović 7261c2b444
Merge pull request #5927 from YosysHQ/docs-preview-cmake
Update docs for CMake
2026-06-04 10:51:45 +00: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 e1931596ae
CMake: Add wrapper for test-docs
Also skip calling `tail` on stubnets log outputs.

Fix auxprog prefixes

i.e. if we've set `YOSYS_PROGRAM_PREFIX=why`, we shouldn't be trying to call `build/yosys` when building docs (because if we've done a clean build it doesn't exist).
I suspect this also affects tests, but I was working on docs when I noticed it.
2026-06-04 20:35:51 +12:00
Krystine Sherwin 2889c73338
Tidy up install instructions
Fill out sentences, move things around a little, switch from recommending `Configuration.cmake` to `CMakeUserPresets.json`.
2026-06-04 20:34:52 +12:00
Krystine Sherwin 042dbe593d
docs: Remove build dir from tool help
Pipes the help through sed for the tools that include the path.  Also means we can drop the `|| true` from abc, since we're now reading the sed return instead.
2026-06-04 20:34: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
Krystine Sherwin 1bef426124
docs: Run stubnets with docs tests 2026-06-04 20:34:51 +12:00
Krystine Sherwin 776995c74d
WIP docs 2026-06-04 20:34:51 +12:00
Miodrag Milanovic 81bf182a4d Populate link_flags in yosys-config 2026-06-04 10:15:47 +02:00
Miodrag Milanović 693d5a7eb0
Merge pull request #5903 from YosysHQ/krys/verific_memsize
verific: Fix non-contiguous memory flattening producing out of bounds accesses in some cases
2026-06-04 05:43:04 +00:00
Miodrag Milanović 78e05dfb00
Merge pull request #5894 from YosysHQ/gcc_16
Bump CI to gcc-16 and fix warnings
2026-06-03 12:07:45 +00:00
Emil J 136d80e3d7
Merge pull request #5918 from mikesinouye/keywords
verilog backend: runtime optimization for keyword pool
2026-06-03 11:26:20 +00:00
Miodrag Milanovic 4124649b1b Bump CI to use gcc-16 as latest compiler 2026-06-03 13:09:38 +02:00
Miodrag Milanovic a599999d1f Fixed warnings found by gcc-16 2026-06-03 13:09:38 +02:00
Miodrag Milanović 337df7fc75
Merge pull request #5895 from YosysHQ/cat/cmake
Migrate build system to CMake
2026-06-03 09:31:46 +00: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
Catherine bcc736ed7d Revert "Putting back some Makefile.conf"
This reverts commit d8587f44f0.
2026-06-02 15:01:50 +00:00
nella 8125af88d6
Merge pull request #5921 from phsauter/peepopt-shiftpow2
peepopt: add shiftpow2 pattern
2026-06-02 08:07:03 +00:00
Miodrag Milanović 7d3819c6bb
Merge pull request #5923 from YosysHQ/release/v0.66
Release version 0.66
2026-06-01 16:58:38 +00:00
Miodrag Milanovic 8bb194af22 Next dev cycle 2026-06-01 18:23:28 +02:00
Miodrag Milanovic 86f2ddebce Release version 0.66 2026-06-01 17:01:26 +02:00
Miodrag Milanović 2105caa844
Merge pull request #5922 from YosysHQ/wheels_fix
Fix wheels
2026-06-01 09:19:13 +00:00
Miodrag Milanovic 904151acd8 Fix wheels 2026-06-01 09:59:04 +02:00
Philippe Sauter c89cfe1e6e peepopt: add shiftpow2 pattern
Rewrite power-of-two indexed word selects to $bmux when the shift
amount already carries the scale as low zero bits.

Keep the rule to non-overlapping selections and bound the generated
mux ways. Add regressions for aligned shifts, padding, signed
extension, and shiftmul handoff cases.
2026-05-31 02:01:32 +02:00
Krystine Sherwin 0360a4bd0a
tests/check_mem: Drop unused init check
It was also raising an error in `read_verilog`.
2026-05-30 11:06:11 +12:00
Mike Inouye a14650d07b verilog backend: runtime optimization for keyword pool
Signed-off-by: Mike Inouye <mikeinouye@google.com>
2026-05-29 17:53:31 +00:00
Miodrag Milanović e56c6a954c
Merge pull request #5915 from YosysHQ/emil/auto-lifetime-hotfix-nosync
genrtlil: don't avoid emitting flops for nosync
2026-05-29 14:08:45 +00:00
Miodrag Milanović b85777a6e6
Merge pull request #5914 from pu-cc/gatemate-scopename
gatemate: add option to create 'scopename' attributes when flattening netlist
2026-05-29 10:31:04 +00:00
Emil J. Tywoniak 80bdbaa010 genrtlil: don't avoid emitting flops for nosync 2026-05-29 11:37:08 +02:00
Krystine Sherwin 5f53410db7
verific: Fix negative array dimensions
Recurse over memory dimensions once, doing both our min/max address checking and parsing out the initval.  This also avoids problems with negative numbers (if `a < b` and one or both are negative, `a` might be the intended `max_addr_chunk`).
Fix sub addressing, where we use some but not all of the current dimension's bits.
2026-05-29 18:40:25 +12:00
Krystine Sherwin 52e0030cc5
tests/check_mem: Add problematic case
Verific reports it as 16 2-bit addresses, meaning we have to iterate over the last dimension while skipping indices.
2026-05-29 18:40:25 +12:00
Krystine Sherwin 21966ef496
verific: Fix non-contiguous memory init
Recurse over nested type ranges to calculate true addresses.
2026-05-29 18:40:25 +12:00
Krystine Sherwin ab5f25db9a
Add test for non-contiguous memory init
Also negative memory addresses.
2026-05-29 18:40:24 +12:00
Krystine Sherwin aac7366862
tests: Add check_mem to vanilla-test 2026-05-29 18:40:24 +12:00
Krystine Sherwin f6327cc444
check_mem: Add -non-const option
Can identify potentially dangerous addressing, but also prone to false-positives.
2026-05-29 18:40:24 +12:00
Krystine Sherwin 099c664dc9
verific: Fix upto ranges 2026-05-29 18:40:23 +12:00
Krystine Sherwin 7cf0c55466
verific: Fix non-contiguous memory flattening
May not be the best approach, insofar as it uses empty memory elements for padding out the alignment, but it does avoid costly address arithmetic.
Still needs to adjust ascii init val addresses, but should work fine for read/write accesses.
2026-05-29 18:40:23 +12:00
Krystine Sherwin 07e3d648aa
Add check_mem command
Comes with a set of tests which (currently) pass with `read_verilog` but fail with `verific` based on #5878.
Add `--check-sv`, an alternative to `--prove-sv` with generator defined yosys commands.  Helpful for when you want to run the same set of commands on a bunch of sv files.
2026-05-29 18:40:23 +12:00
Patrick Urban 1d86b3cd6e gatemate: add option to create 'scopename' attributes when flattening the netlist 2026-05-28 14:46:25 +02:00
Miodrag Milanović 1801abf30a
Merge pull request #5913 from YosysHQ/abcexternal
Putting back some Makefile.conf
2026-05-28 09:49:16 +00:00
Miodrag Milanovic d8587f44f0 Putting back some Makefile.conf 2026-05-28 11:13:29 +02:00
KrystalDelusion 4230ebff71
Merge pull request #5912 from YosysHQ/krys/opt_clean_docs
opt_clean: Set group for docs gen
2026-05-28 08:35:52 +00:00