3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-03 18:00:24 +00:00
Commit graph

15407 commits

Author SHA1 Message Date
Matt Young
a049121ab3 docs: mention Yosys Discourse group and blog 2025-07-31 16:32:29 +10:00
Matt Young
ddc99a3b97 Merge branch 'main' of https://github.com/YosysHQ/yosys 2025-07-31 16:30:54 +10:00
github-actions[bot]
262b00d5e5 Bump version 2025-07-31 00:26:33 +00:00
Miodrag Milanovic
f92a53ec31 verific: handle nullptr for message_id 2025-07-30 10:51:54 +02:00
github-actions[bot]
6440499e57 Bump version 2025-07-30 00:26:56 +00:00
KrystalDelusion
a18acaca82
Merge pull request #5068 from YosysHQ/krys/bugpoint_fixes
Updates to bugpoint
2025-07-30 10:05:22 +12:00
Martin Povišer
df32a7fba3
Merge pull request #5258 from gigeresk/fredt_fix_typos_in_memlib_docs
Fix typos in memlib.md
2025-07-29 21:37:36 +02:00
Fred Tombs
b64484795d Fix typos in memlib 2025-07-29 15:27:59 -04:00
Emil J
6375c97e55
Merge pull request #5247 from calewis/concat_changes
Improve the performance of `concat_name` in the flattening pass
2025-07-29 18:40:36 +02:00
Emil J
41295175dc
Merge pull request #5248 from calewis/try_unordereded_map
Use unordered_map instead of dict for IdString's char* to index storage.
2025-07-29 18:40:07 +02:00
Miodrag Milanović
41a53d580f
Merge pull request #5256 from YosysHQ/abc_29072025
Update ABC to latest
2025-07-29 17:51:35 +02:00
Miodrag Milanovic
5392a42a97 Update ABC to latest 2025-07-29 16:11:13 +02:00
Miodrag Milanović
1d229ae254
Merge pull request #5221 from rocallahan/typed-stringf
Introduce variadic template implementation of `stringf` that supports `std::string` parameters
2025-07-29 15:12:49 +02:00
Emil J
4d51e62ab7
Merge pull request #5240 from rocallahan/verilog-sort
In the Verilog backend, only sort modules that we're going to emit.
2025-07-29 11:04:20 +02:00
Emil J
8f76a426e2
Merge pull request #5244 from rocallahan/gitignore
Create a general `tests/.gitignore` and remove redundant entries from subdirectories
2025-07-29 11:03:47 +02:00
Emil J
f845bf3e83
Merge pull request #5245 from YosysHQ/nak/comment_gitignore
sort and comment .gitignore
2025-07-29 10:53:34 +02:00
Drew Lewis
d9b3a3f7bb Improve the performance of concat_name in the flattening pass
- Make IdString parameter pass by const ref to avoid IdString ref counting in the constructor
- Remove extra std::string allocation to remove prefix
- Avoid using `stringf` for concatenation
2025-07-29 10:52:32 +02:00
Drew Lewis
2c8b4d7ad1 Use unordered_map instead of dict for IdString char* to index storage.
dict is pretty slow when you don't ever need to iterate the container in
order.  And the hashfunction for char* in dict hashes for every single
byte in the string, likely doing significantly more work than std::hash.
2025-07-29 10:48:44 +02:00
Robert O'Callahan
6ee3cd8ffd Replace stringf() with a templated function which does compile-time format string checking.
Checking only happens at compile time if -std=c++20 (or greater) is enabled. Otherwise
the checking happens at run time.

This requires the format string to be a compile-time constant (when compiling with
C++20), so fix a few places where that isn't true.

The format string behavior is a bit more lenient than C printf. For %d/%u
you can pass any integer type and it will be converted and output without
truncating bits, i.e. any length specifier is ignored and the conversion is
always treated as 'll'. Any truncation needs to be done by casting the argument itself.
For %f/%g you can pass anything that converts to double, including integers.

Performance results with clang 19 -O3 on Linux:
```
hyperfine './yosys -dp "read_rtlil /usr/local/google/home/rocallahan/Downloads/jpeg.synth.il; dump"'
```
C++17 before: Time (mean ± σ):     101.3 ms ±   0.8 ms    [User: 85.6 ms, System: 15.6 ms]
C++17 after:  Time (mean ± σ):      98.4 ms ±   1.2 ms    [User: 82.1 ms, System: 16.1 ms]
C++20 before: Time (mean ± σ):     100.9 ms ±   1.1 ms    [User: 87.0 ms, System: 13.8 ms]
C++20 after:  Time (mean ± σ):      97.8 ms ±   1.4 ms    [User: 83.1 ms, System: 14.7 ms]

The generated code is reasonably efficient. E.g. with clang 19, `stringf()` with a format
with no %% escapes and no other parameters (a weirdly common case) often compiles to a fully
inlined `std::string` construction. In general the format string parsing is often (not always)
compiled away.
2025-07-29 05:29:33 +00:00
github-actions[bot]
8f6d7a3043 Bump version 2025-07-29 00:29:04 +00:00
Krystine Sherwin
fe07d390f1
tests/bugpoint: More tests
More coverage.
2025-07-29 11:39:52 +12:00
Krystine Sherwin
d3ff803b81
bugpoint: Add -suffix option
Allows for adding a suffix to the `bugpoint-case` file name so that multiple `bugpoint`s can run in the same directory, e.g. during a `make test -j4`.
2025-07-29 11:39:52 +12:00
Krystine Sherwin
93f7429f4f
tests: Add bugpoint to MK_TEST_DIRS
Also change `-err_grep` to `-err-grep` for consistency with `-expect-return`.
2025-07-29 11:39:51 +12:00
Krystine Sherwin
b5a13ae95b
bugpoint.cc: Rename to -err_grep 2025-07-29 11:39:51 +12:00
Krystine Sherwin
65147670a6
bugpoint.cc: Include csignal for windows 2025-07-29 11:39:51 +12:00
Krystine Sherwin
fb92eabdcd
bugpoint: Add -greperr option
`-greperr <string>` redirects stderr to 'bugpoint-case.err', and then searches that file for `<string>`.
Move `-runner` option up with the other options to reduce ambiguity (i.e. so it doesn't look like it's another design parts constraint).
Also some shuffling of `err.ys`.
2025-07-29 11:39:51 +12:00
Krystine Sherwin
8d5dbae06e
raise_error.cc: Option for direct to stderr
Add more to help text to describe usage.
Add test for no value (should `exit(1)`).
2025-07-29 11:39:50 +12:00
Krystine Sherwin
134da811f7
Add raise_error pass
Raise errors from attributes for testing.
I want it for bugpoint tests but it could be useful elsewhere.
2025-07-29 11:39:50 +12:00
Krystine Sherwin
a7a926b247
bugpoint.cc: WIN32 exit signals 2025-07-29 11:39:50 +12:00
Krystine Sherwin
8a732080e0
bugpoint: Add -expect-return
Allows checking return value from crashing design.  Makes it possible to only accept designs that crash with e.g. SEGFAULT.
Based on `exec -expect-return`.
2025-07-29 11:39:50 +12:00
Krystine Sherwin
902cbda4f9
bugpoint: Document -wires flag 2025-07-29 11:39:49 +12:00
Miodrag Milanović
89879eceba
Merge pull request #5252 from mikesinouye/verific
Correctly reset Verific flags to Yosys defaults after -import and war…
2025-07-28 15:45:38 +02:00
Mike Inouye
0314db80ea Correctly reset Verific flags to Yosys defaults after -import and warn this has occurred.
Co-authored-by: Chris Pearce <chris@pearce.org.nz>
Signed-off-by: Mike Inouye <mikeinouye@google.com>
2025-07-25 19:15:01 +00:00
github-actions[bot]
bf9aaac0fe Bump version 2025-07-25 00:26:42 +00:00
N. Engelhardt
b25259aa9a
Merge pull request #5251 from YosysHQ/revert-4860-docs-preview-cmdref_groups 2025-07-24 12:40:57 +02:00
N. Engelhardt
81f87ce6ed
Revert "Add groups to command reference" 2025-07-23 14:41:49 +00:00
Robert O'Callahan
8b75c06141 Add a general tests/.gitignore and remove redundant entries in subdirectory .gitignore files. 2025-07-22 10:38:38 +00:00
N. Engelhardt
875e068334 sort and comment .gitignore 2025-07-22 10:22:16 +02:00
github-actions[bot]
2223d7848b Bump version 2025-07-22 00:26:35 +00:00
N. Engelhardt
3c5cc18a9f
Merge pull request #4860 from YosysHQ/docs-preview-cmdref_groups 2025-07-21 10:22:23 +02:00
Robert O'Callahan
f25f8fe7c4 In the Verilog backend, only sort modules that we're going to emit.
If you have a large design with a lot of modules and you use the Verilog
backend to emit modules one at a time to separate files, performance is
very low. The problem is that the Verilog backend calls `design->sort()`
every time, which sorts the contents of all modules, and this is slow
even when everything is already sorted.

We can easily fix this by only sorting the contents of modules that
we're actually going to emit.
2025-07-21 05:32:31 +00:00
Krystine Sherwin
c770c1e39d
Docs: Improve cmd index
Lists all commands with their short help.
Also link to it.
2025-07-21 11:47:50 +12:00
Krystine Sherwin
14a5cd6c4c
Makefile: Fix chformal.cc copy 2025-07-21 10:37:30 +12:00
Krystine Sherwin
c92f200491
Drop <cmd>.rst dump 2025-07-21 10:37:30 +12:00
Krystine Sherwin
3eb7b35c29
flatten: Move to hierarchy folder 2025-07-21 10:36:19 +12:00
Krystine Sherwin
3804af35fc
Docs: Naming techlibs 2025-07-21 10:36:19 +12:00
Krystine Sherwin
4ba403829b
cmdref: Groups and group names 2025-07-21 10:36:19 +12:00
Krystine Sherwin
d0ce6a3bd6
Docs: Include internal cmds in toctree
Also fixing some missing refs (using single backticks instead of double).
2025-07-21 10:36:18 +12:00
Krystine Sherwin
af3c28f274
synthprop: Use override keyword
`formatted_help()` introduced the override keyword, which means that the other two methods that were marked as virtual instead raised a warning about inconsistent use of override.  This fixes that by bringing the synthprop (more) in line with the rest of the code-base.
2025-07-21 10:36:18 +12:00
Krystine Sherwin
87ec486962
docs/internal: Add note on synth_* script highlighting 2025-07-21 10:36:18 +12:00