3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-17 16:52:16 +00:00
Commit graph

4520 commits

Author SHA1 Message Date
Jannis Harder
77089a8d03 rename: add -move-to-cell option in -wire mode 2025-08-13 11:11:52 +02:00
Emil J
fb024c4d55
Merge pull request #5135 from YosysHQ/emil/ast-ownership
ast, read_verilog: ownership in AST, use C++ styles for parser and lexer
2025-08-12 10:58:12 +02:00
Krystine Sherwin
20c2d2a6f3
test_cell: Add comment on $pmux
`-simlib` also doesn't work.
2025-08-12 10:57:59 +12:00
Martin Povišer
c589714433
test_cell: Update to $macc_v2 2025-08-12 10:57:59 +12:00
Krystine Sherwin
db4ffaffd2
consteval: Fix $bwmux handling
If the cell type has a S signal and hasn't already been handled, use `CellTypes::eval(cell, A, B, S)`.
2025-08-12 10:57:58 +12:00
Krystine Sherwin
014eadd8b9
test_cell: Fix $bweqx 2025-08-12 10:57:58 +12:00
Krystine Sherwin
22aa9fba3b
test_cell: Support more cell types
Still unsupported:
- wide muxes (`$_MUX16_` and friends)

Partially supported types have comments in `test_cell.cc`.

Fix `CellTypes::eval() for `$_NMUX_`.
Fix `RTLIL::Cell::fixup_parameters()` for $concat, $bwmux and $bweqx.
2025-08-12 10:57:58 +12:00
Krystine Sherwin
481ecb51a7
test_cell: Disable $macc testing
Needs updating to `$macc_v2`.
2025-08-12 10:57:58 +12:00
Emil J. Tywoniak
c8e0ac0c61 ast, read_verilog: ownership in AST, use C++ styles for parser and lexer 2025-08-11 13:34:10 +02:00
KrystalDelusion
1ae82d7b9d
Merge pull request #5233 from YosysHQ/krys/equiv_assume
Assumptions for equiv_*
2025-08-09 10:39:04 +12:00
Emil J
d68d28d05e
Merge pull request #5183 from YosysHQ/emil/test-diagnostics
logger: add -expect types prefix-log, prefix-warning, prefix-error
2025-08-08 14:46:25 +02:00
Krystine Sherwin
e02f4469c0
equiv_simple: Avoid std::array
VS build currently failing with `error C2641: cannot deduce template arguments for 'std::array'`.
Changing to `std::array<Cone, 2>` gives `error C2027: use of undefined type` instead.
2025-08-08 12:37:38 +12:00
Emil J. Tywoniak
fcd9f98245 equiv_simple: refactor 2025-08-08 01:35:33 +02:00
Emil J
1e58443397
Merge pull request #5264 from YosysHQ/krys/raise_error_always
raise_error: Add -always
2025-08-07 11:43:04 +02:00
Krystine Sherwin
b1eeb7de3d
Less verbose equiv assumes
both only print on the first step, and equiv_simple only prints if also verbose
2025-08-06 15:21:10 +12:00
Krystine Sherwin
93b39ad9b3
equiv_induct: Add -set-assumes option
Uses mostly the same code as equiv_simple, but the assumes are already being imported so long as they're in the selection, so it's even easier.
2025-08-06 15:12:48 +12:00
Krystine Sherwin
3959d19291
Reapply "Add groups to command reference"
This reverts commit 81f87ce6ed.
2025-08-06 13:52:12 +12:00
Lofty
7537a49f0d
Merge pull request #5241 from Anhijkt/opt_dff-simplify-pt
opt_dff: implement simplify_patterns
2025-08-04 09:44:57 +01:00
Krystine Sherwin
895dfd963f
raise_error: Add -always 2025-08-02 14:53:36 +12:00
Anhijkt
85e0e8ca67 typo 2025-07-30 21:40:20 +03:00
Anhijkt
bfff7a47f1 typo 2025-07-30 21:34:42 +03:00
Anhijkt
206d2a4553 opt_dff: refactor simplify_patterns 2025-07-30 21:31:34 +03:00
KrystalDelusion
a18acaca82
Merge pull request #5068 from YosysHQ/krys/bugpoint_fixes
Updates to bugpoint
2025-07-30 10:05:22 +12:00
Fred Tombs
b64484795d Fix typos in memlib 2025-07-29 15:27:59 -04: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
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
N. Engelhardt
81f87ce6ed
Revert "Add groups to command reference" 2025-07-23 14:41:49 +00:00
Anhijkt
d9fc6dda9e typo 2025-07-21 14:42:52 +03:00
Anhijkt
ca8af1f8c8 opt_dff: implement simplify_patterns 2025-07-21 14:15:26 +03:00
Krystine Sherwin
3eb7b35c29
flatten: Move to hierarchy folder 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
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
da9bf5d610
cmdref: Drop optiongroups
Linking to optiongroups doesn't add *that* much, and is kind of a pain; meanwhile having the optiongroups adds an extra level of indentation.
Instead of options needing to be in an option group, they instead go in either the root node or nested in a usage node.  Putting them in a usage node allows for more-or-less the previous behaviour but without making it the default.
2025-07-21 10:36:18 +12:00
Krystine Sherwin
5d010789e2
cmdref: Split passes/status from passes/cmds
Rename passes/cmds from "General passes" to "Design modification".
More `yosys.h` includes.

cmdref: Split passes/status from passes/cmds

Rename passes/cmds from "General passes" to "Design modification".
More `yosys.h` includes.
2025-07-21 10:35:57 +12:00
Krystine Sherwin
f2ef17b581
cmdref: Assign rmports to greenpak group
Also tidy `#include`s.
2025-07-21 10:35:57 +12:00
Krystine Sherwin
92ab125113
cmdref: Assigning cmds to formal group
Give formal index a proper title.
Use `Pass::formatted_help()` to assign the group, but still return `false` because the help text still comes from `Pass::help()`.
Tidy up some of the affected files' includes to make use of the shared `yosys.h` includes.
2025-07-21 10:35:56 +12:00
Krystine Sherwin
d62a110dc8
register.h: Add internal_flag to Pass
Update experimental pass warnings to use a shared function.  Reduces repetition, and also allows all of the warning flags to be combined (which at present is just experimental and the new internal).
Update `test_*` passes to call `internal()` in their constructors.
2025-07-21 10:35:19 +12:00
Krystine Sherwin
1529d991fd
log_help: Refactor help content adding
Content is now added to the `ContentListing` rather than the `PrettyHelp`.
`open_*` methods return the `ContentListing` that was added instead of leaving a hanging continuation.
This allows for (e.g.) options to be added directly to optiongroups, instead of requiring that groups be closed before continuation.
This also means that all `PrettyHelp`s are a listing, with the actual log being called by the default `Pass::help()`; making the mode field redundant.
Added `PrettyHelp::log_help()` which replaces the `PrettyHelp::Mode::LOG` logic.
Added `ContentListing::back()` which just returns the last element of the underlying content vector.
Some of the content tracking was made redundant and removed, in particular `PrettyHelp::_current_listing` and `ContentListing::parent`.

Converted `ContentListing` to a class instead of a struct, adjusting constructors to match.
Added `ContentListing` constructor that accepts a `source_location`.

Update `HelpPass::dump_cmds_json()` for new log_help.
2025-07-21 10:35:18 +12:00
Krystine Sherwin
605f12c2ae
Rename help_v2 to formatted_help
Also add comments to `help()` and `formatted_help()` to clarify usage.
2025-07-21 10:34:54 +12:00
Krystine Sherwin
1c627f4a1b
log_help: Add manual group support
Sets `chformal` group to "formal" for testing purposes
2025-07-21 10:34:31 +12:00
Krystine Sherwin
10fea26fa9
log_help: Options can have content
Refactor `PrettyHelp::endgroup()` -> `PrettyHelp::close(int levels = 1)`.
2025-07-21 10:34:11 +12:00