3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-06 17:11:01 +00:00
Commit graph

17268 commits

Author SHA1 Message Date
Krystine Sherwin
0cc2906bae
tests/symfpu: Extra muladd tests
Switch inputs back to `anyseq`, and add coverage for muladd with constant multiplier output and varying addend (also an assertion).
Use an `ifdef` to control clocked properties (because of the assertion, it's no longer just covers that are clocked).
2026-06-06 09:34:45 +12:00
Krystine Sherwin
7495ad2664
tests/symfpu: Testing sqrt
Coverage supports `sqrt`, including new general rounding detection instead of just inf/ebmin/zero (since they aren't possible with `sqrt`).
More `sqrt` assertions, as well as the addition of `altsqrt` verification.
Some adjustments of macros.
2026-06-06 09:34:44 +12:00
Krystine Sherwin
ba5756a1dc
symfpu: Add altsqrt
No denormalization here.  That can be a problem for later (or not at all).
2026-06-06 09:34:44 +12:00
Krystine Sherwin
c6f6baf270
symfpu: Add alt2div
`altdiv` but without denormalization, because as it turns out HardFloat unpacks subnorms in the same way, so lets just support both styles.
2026-06-06 09:34:44 +12:00
Krystine Sherwin
67a6b10e7b
symfpu: Add altdiv 2026-06-06 09:34:43 +12:00
Krystine Sherwin
d628022459
tests/symfpu: Add cover checks
Include mask/map for abc inputs (and switch to `anyconst` instead of `anyseq`).
Add false divide check for mantissa.
Covers aren't currently being tested by anything (and have to be removed for `sat`), but I've been using it locally with SBY to confirm that the different edge cases are able to be verified (e.g. when verifying HardFloat against symfpu while using the masked inputs to reduce solver time).
2026-06-06 09:34:43 +12:00
Krystine Sherwin
acf011b0f0
Fix tininess when rounding to ebmin 2026-06-06 09:34:43 +12:00
Krystine Sherwin
a2c8d6cea0
tests/symfpu: UF to ebmin is valid 2026-06-06 09:34:42 +12:00
Krystine Sherwin
1829dd3659
Don't raise DZ when left is inf 2026-06-06 09:34:42 +12:00
Krystine Sherwin
29036bc4a0
symfpu: Dynamic rounding mode 2026-06-06 09:34:42 +12:00
Krystine Sherwin
f81d37a67f
symfpu: Tidying output
Also switching to cleaner library branch
2026-06-06 09:34:42 +12:00
Krystine Sherwin
acd0e5680d
symfpu: floatWithStatusFlags
Now with verified muladd exceptions.
2026-06-06 09:34:41 +12:00
Krystine Sherwin
2af3557373
symfpu: Verifying rounding modes
Works for everything but muladd.
Which I saw coming, but am still frustrated by.
2026-06-06 09:34:41 +12:00
Krystine Sherwin
58c2c95618
symfpu: Configurable rounding modes
Including tests, but currently only testing rounding modes on multiply.
Also missing the ...01 case.
2026-06-06 09:34:41 +12:00
Krystine Sherwin
c02114af8a
symfpu: Add flags
Use symfpu fork.
Add tests for symfpu properties and extra edge case checking for flags.
2026-06-06 09:34:05 +12:00
Krystine Sherwin
a4bcb0eea4
symfpu: Configurable op 2026-06-06 09:33:00 +12:00
Krystine Sherwin
b3f3fe55e2
symfpu: Configurable eb and sb 2026-06-06 09:33:00 +12:00
Jannis Harder
75822ea17e
wip: symfpu pass 2026-06-06 09:32:59 +12:00
Catherine
cc9692caab
Merge pull request #5935 from YosysHQ/cat/cmake-macos
CMake: improve macOS Homebrew compatibility
2026-06-05 18:28:22 +00:00
Catherine
39ecd0d93f CMake: specify Flex and Bison version requirements.
macOS ships Bison 2.6, which is too old for Yosys.
2026-06-05 17:59:23 +00:00
Catherine
d50dc9a461 CMake: add all Homebrew packages to root search path.
Homebrew doesn't provide a merged (FHS) prefix and tools installed from
it cannot be expected to appear on PATH. Furthermore, XCode provides
some tools and headers (Flex, Bison) which must not be used if
a Homebrew alternative is installed.
2026-06-05 17:58:29 +00:00
Catherine
c9e3ae8c9a CMake: improve and vendor upstream FindBISON module.
This change uses the `find_program(VALIDATOR)` functionality available
since CMake 3.25 to find the acceptable Bison executable instead of
failing if the first one found is too old. (macOS ships with Bison 2.6.)

This change also explicitly finds a usable M4 and ensures the Bison
command will use it. (macOS ships with an m4 which can fail if XCode
Tools aren't installed.)
2026-06-05 17:40:25 +00:00
Miodrag Milanović
017c99be5b
Merge pull request #5933 from YosysHQ/cleanups
Various cleanups
2026-06-05 10:25:19 +00:00
Miodrag Milanovic
0e137c462e Removed docker related file 2026-06-05 10:27:30 +02:00
Miodrag Milanovic
6a2ed9075f Removed YosysJS related files 2026-06-05 10:14:13 +02:00
Miodrag Milanovic
102f008194 Remove EMSCRIPTEN leftovers 2026-06-05 10:03:27 +02:00
Miodrag Milanovic
d4ac3b1e7d No need for script when CMake is used 2026-06-05 09:24:19 +02:00
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