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

17278 commits

Author SHA1 Message Date
Krystine Sherwin
63e8c5bb03
tests/symfpu: Switch to generate_mk.py 2026-06-06 10:04:17 +12:00
Krystine Sherwin
1332c72c85
libs/symfpu: tinyAfterRounding 2026-06-06 09:34:47 +12:00
Krystine Sherwin
37479777c8
symfpu: Missed a space 2026-06-06 09:34:47 +12:00
Krystine Sherwin
7dccc4dac5
symfpu_convert: Handle signed ints
Use input wire `is_signed` to select between signed and unsigned handling.
2026-06-06 09:34:47 +12:00
Krystine Sherwin
82f074880a
symfpu: Use ubv for convert flags 2026-06-06 09:34:46 +12:00
Krystine Sherwin
e9f77001df
symfpu: Convert with flags 2026-06-06 09:34:46 +12:00
Krystine Sherwin
b0f9680fd9
symfpu: Add symfpu_convert
Convert one input to three outputs (int -> float, float -> int, float -> float).
No rounding mode, no flags (yet).
2026-06-06 09:34:46 +12:00
Krystine Sherwin
cdcd082797
symfpu: Test comparisons 2026-06-06 09:34:46 +12:00
Krystine Sherwin
aa096d4e3f
symfpu: Add -compare mode
Also `min` and `max` ops.  RISC-V uses IEEE 754-2019 semantics where `min(+0,-0) == -0` and `max(+0,-0) == +0` so we do the same here.  We could make it optional, but as I understand it the newer behavior is still backwards compatible (since previously it was valid to have selected either).
2026-06-06 09:34:45 +12:00
Krystine Sherwin
e429175533
Add symfpu -classify
Add description text for standard `symfpu` signature.
2026-06-06 09:34:45 +12:00
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