3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-09 15:47:31 +00:00
Commit graph

16078 commits

Author SHA1 Message Date
Robert O'Callahan
4d209c187d Switch OptMergeWorker cell type switching to use IdString::in() 2025-09-25 03:06:58 +00:00
Robert O'Callahan
1c73011e7e Swap SigSpecs using std::swap with moves 2025-09-25 03:04:17 +00:00
github-actions[bot]
3f29cd7f4e Bump version 2025-09-25 00:22:44 +00:00
Jannis Harder
83dd99efb7 verific: New -sva-continue-on-error import option
This option allows you to process a design that includes unsupported
SVA. Unsupported SVA gets imported as formal cells using 'x inputs and
with the `unsupported_sva` attribute set. This allows you to get a
complete list of defined properties or to check only a supported subset
of properties. To ensure no properties are unintentionally skipped for
actual verification, even in cases where `-sva-continue-on-error` is
used by default to read and inspect a design, `hierarchy -simcheck` and
`hierarchy -smtcheck` (run by SBY) now ensure that no `unsupported_sva`
property cells remain in the design.
2025-09-24 18:58:54 +02:00
Jannis Harder
cb8f86b64f
Merge pull request #5387 from jix/misc-log-cleanup
Various logging fixes and cleanup
2025-09-24 17:24:22 +02:00
Jannis Harder
2dce50516b log: Print static message as fatal error for YOSYS_ABORT 2025-09-24 13:20:27 +02:00
Jannis Harder
86a46b9e5c log: Flush stdout before printing a fatal error to stderr
This hasn't been an issue when using -l to redirect or when stdout is
line buffered, explaining how we didn't notice this earlier, but for
`yosys ... > log` that extra flush is required to ensure all messages
preceding the fatal error are flushed.
2025-09-24 13:20:27 +02:00
Jannis Harder
71882debe7 simplemap: Remove leftover debug output 2025-09-24 13:20:27 +02:00
Jannis Harder
904d49c6d8 abc9_ops: Remove temporary debug log message
I missed this when adding the -replace_zbufs option.
2025-09-24 13:20:27 +02:00
Emil Jiří Tywoniak
4508676e67 libcache: support liberty filename globbing 2025-09-24 11:41:51 +02:00
Emil Jiří Tywoniak
856a387aad dfflibmap: support liberty filename globbing 2025-09-24 11:41:51 +02:00
Emil Jiří Tywoniak
a28c0c632b clockgate: support liberty filename globbing 2025-09-24 11:41:51 +02:00
Emil Jiří Tywoniak
161cdd349c io: add append_globbed to resolve globs in regular pass arguments 2025-09-24 11:30:29 +02:00
Emil J
99a23c777c
Merge pull request #5380 from YosysHQ/emil/dev-jf-contributing
CONTRIBUTING: add link to dev jf doc, replace slack with Discourse
2025-09-24 11:07:55 +02:00
Emil Jiří Tywoniak
6de21a8999 CONTRIBUTING: prefer Discourse over GitHub Discussions 2025-09-24 11:07:26 +02:00
Jannis Harder
9c1d0a2346
Merge pull request #5382 from rocallahan/fix-bounds-check
Fix off-by-one error in bounds check in `RTLIL::SigChunk::operator[]`
2025-09-24 08:41:16 +02:00
Jannis Harder
7a69dbb63d
Merge pull request #5372 from rocallahan/abc-done
Make ABC_DONE tracking more robust
2025-09-24 08:40:26 +02:00
Krystine Sherwin
137a801b4a
Don't unquote args in bugpoint or setenv 2025-09-24 17:39:57 +12:00
Krystine Sherwin
ab6bdb50a9
tests/scripts: Use logger -check-expected 2025-09-24 17:26:55 +12:00
Krystine Sherwin
51dc09ca4a
logger.cc: Don't unquote args 2025-09-24 17:25:53 +12:00
Krystine Sherwin
d6f3ac60f1
io.cc: Support single quoted arguments
Single quoted strings have no escape character and are treated verbatim.
This is useful for minimizing the number of backslashes in (for example) `logger -expect` regexps (e.g. `"\\\""` -> `'\"'`).
`Yosys::quote()` will use single quotes by default, unless the string contains a single quote and then it will use `std::quoted()`.

Fix strange behaviour arrising from always using `std::quoted(result)`.  Because of the way the function interacts with streams, if there is only one quotation mark then the result would end at the first whitespace.
2025-09-24 17:24:40 +12:00
Krystine Sherwin
6328c808db
io.cc: Quoting fixes
Add other special characters to `needs_quote()` check.
Fix `"\" ` being treated as a complete quoted string because of the space after the `"` even though it's escaped.
2025-09-24 15:20:46 +12:00
Krystine Sherwin
0ab1d6d28c
Handle quoted arguments in passes
Use `std::quoted()` from `<iomanip>` to quote/unquote pass arguments.
In order to maintain handling of (unquoted) comments and semicolons this occurs when adding the token to the arg list, rather than in the tokenization itself.
Passes no longer receive tokenized-but-raw arguments and are instead pre-unquoted.
This will cause problems for some passes (e.g. `setparam`) which rely on arguments having quotation marks for disambiguation.
In order to maintain reproducibility with `echo on`, arguments which require quoting will automatically quote (arguments which were quoted but didn't need to be will not be quoted in the echo).
2025-09-24 14:20:12 +12:00
Krystine Sherwin
0a88c159c1
tests/scripts: Also check hashes in quotes
i.e. they should be part of the quote instead of starting a comment
2025-09-24 14:03:49 +12:00
github-actions[bot]
ef22c6ee73 Bump version 2025-09-24 00:22:58 +00:00
Krystine Sherwin
5c1dd0c5b2
Testing quoted strings 2025-09-24 12:07:30 +12:00
Robert O'Callahan
e9aacd8a05 Move OptMerge cell filtering logic to happen while building the cell vector.
This code is quite confusing because there are two "is the cell known" filters
applied, one while building the cell vector and one after building the cell
vector, and they're subtly different. I'm preserving the actual behaviour here
but it looks like there is, or was, a bug here.
2025-09-23 23:26:47 +00:00
Robert O'Callahan
0a17205a95 Fix off-by-one error in bounds check 2025-09-23 21:29:57 +00:00
Emil J
5f6819fd76
Merge pull request #5361 from YosysHQ/emil/simplemap-transfer-src
simplemap: fix src attribute transfer
2025-09-23 20:40:57 +02:00
Martin Povišer
3f4b6dc5d3 Support multiple lib files in abc9_exe 2025-09-23 20:34:08 +02:00
Emil Jiří Tywoniak
6527cc2134 gowin: fix test 2025-09-23 20:03:50 +02:00
Emil Jiří Tywoniak
9409a11be4 CONTRIBUTING: don't mention dead slack, add link to dev jf doc 2025-09-23 19:34:13 +02:00
Emil J
a316b8f90c
Merge pull request #4997 from YosysHQ/emil/techmap-alu-half-adder
techmap: map $alu to $fa instead of relying on extract_fa
2025-09-23 18:40:38 +02:00
KrystalDelusion
d4071b63f7
Merge pull request #5268 from YosysHQ/krys/cutpoint_inout
Track wire drivers in cutpoint
2025-09-24 04:14:19 +12:00
Miodrag Milanović
fcc3d7132d
Fix building and running unit tests (#5374)
* Fix building and running unit tests

* Enable unit tests

* Add gtest always

* test-sanitizers.yml: Use makefile.conf

* proper test setup

* make it run on macOS

* Run libyosys build only for unit tests after testing is done

* Disable LTO on public CI

---------

Co-authored-by: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com>
2025-09-23 17:10:18 +02:00
Emil J. Tywoniak
d30f7847d8 techmap: map $alu to $fa instead of relying on extract_fa 2025-09-23 17:05:12 +02:00
George Rennie
b586043647
Merge pull request #5379 from YosysHQ/george/dump_cmds_json
docs typo: -dump-cmds-json
2025-09-23 14:39:19 +01:00
George Rennie
398e5d4bf0 docs typo: -dump-cmds-json 2025-09-23 14:36:27 +01:00
Jannis Harder
e8f8297e5d
Merge pull request #5376 from rocallahan/remove-more-cstr
Remove more uses of `.c_str()`
2025-09-23 12:41:09 +02:00
Robert O'Callahan
1e5f920dbd Remove .c_str() from parameters to log_debug() 2025-09-23 19:10:33 +12:00
Jannis Harder
cb9d0b6ff9
Merge pull request #5378 from rocallahan/static-ID-namespace
Make `ID::` constants be `StaticIdString`s for better optimization
2025-09-23 08:25:54 +02:00
KrystalDelusion
991561fe98
Merge pull request #5363 from KrystalDelusion/krys/yosyshq-only-jobs 2025-09-23 17:27:43 +12:00
Robert O'Callahan
effc52fedc Make ID:: constants be StaticIdStrings for better optimization.
Their internal indexes will be known at compile time, like we already support for the `ID()` macro.
2025-09-23 03:25:16 +00:00
Krystine Sherwin
6f7cd637cb
CI: Check repo for YosysHQ specific jobs
Prevents unintended bumps on the flake.lock and Yosys version on forks (provided the forks synchronize their main after this gets merged).
Update version.yml to use the same style of `if` on the job, rather than on specific actions.
Wheels will still build as a cron job, but won't try to upload if it's a fork.
2025-09-23 15:08:04 +12:00
github-actions[bot]
93dca50b91 Bump version 2025-09-23 00:22:45 +00:00
Jannis Harder
13a2481da7
Merge pull request #5365 from rocallahan/deterministic-abc
Extract ABC results in the order of `assigned_cells`
2025-09-22 23:21:11 +02:00
Jannis Harder
e546f3b8f0
Merge pull request #5355 from rocallahan/deprecate-logv_file_error
Deprecate `logv_file_error()`
2025-09-22 14:23:55 +02:00
Emil J
a78eb9e151
Merge pull request #5315 from YosysHQ/emil/write_rtlil-no-sort
write_rtlil: don't sort
2025-09-22 11:14:39 +02:00
Robert O'Callahan
7f6fae1f66 Extract ABC results in the order of assigned_cells.
Currently the order of extraction can vary based on which ABC runs finish first. That's
nondeterministic, therefore bad. Instead, force the processing to happen in the same order
as `assigned_cells`, i.e. the same order we use when not using parallelism. This should
make everything deterministic.

Note that we still allow ABC runs to complete out of order. Out-of-order results are
just not extracted until all the previous runs have completed and their results
extracted.
2025-09-22 05:07:03 +00:00
Robert O'Callahan
4fc782ef2b Make ABC_DONE detection more robust.
1) Change token from ABC_DONE to YOSYS_ABC_DONE to be a bit more robust against false matches.
2) Emit the token from the sourced script so that we don't have to worry about it showing up in the echoing
of the command as it executes. It will only appear in ABC stdout when it executes, i.e. when
our script has completed.
3) `set abcout` doesn't actually switch ABC to line buffering on stdout, since HAVE_SETVBUF is not actually
set in ABC builds in general. So stop using that. ABC does the necessary flushing when
`source` has finished.
2025-09-22 05:01:51 +00:00