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

4495 commits

Author SHA1 Message Date
Krystine Sherwin
895dfd963f
raise_error: Add -always 2025-08-02 14:53:36 +12: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
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
Krystine Sherwin
3bef122a3f
WIP docs: Proto log_help
Define `PrettyHelp` class with methods for declaring different parts of help message.
Currently able to produce standard help messages as expected.
Updates chformal to use (only) the new help_v2.
Currently makes use of a global static to track the current help context, allowing register.h to live in blissful ignorance and instead rely on help_v2 implementations calling `auto *help = PrettyHelp::get_current();` and `return true;` to minimise impact on rebuilds (i.e. not requiring every source file to be recompiled).
2025-07-21 10:34:11 +12:00
Krystine Sherwin
5ce097ed3d
Docs: Test new pass help with chformal 2025-07-21 10:33:31 +12:00
Martin Povišer
9ab1946799
Merge pull request #5209 from povik/hieropt
Start `opt_hier` to enable hierarchical optimization
2025-07-17 14:12:18 +02:00
N. Engelhardt
d009bcc9b6
Merge pull request #5198 from YosysHQ/nak/lcov 2025-07-17 11:57:58 +02:00
N. Engelhardt
beb71a6c47 update short help 2025-07-16 17:11:19 +02:00
N. Engelhardt
fb6974dcd7 print summary of line coverage to log 2025-07-16 13:40:07 +02:00
Emil J. Tywoniak
21e68ec9be libparse: fix space ANDs 2025-07-15 12:53:13 +02:00
Emil J. Tywoniak
bf1f236998 dfflibmap: add back tab and quote filters for good vibes 2025-07-11 23:12:58 +02:00
Emil J. Tywoniak
c6e1d461fa libparse: support space ANDs 2025-07-11 23:09:30 +02:00
Emil J. Tywoniak
4b1a8a3b66 libparse: add LibertyExpression::str for testing 2025-07-11 18:27:19 +02:00
Emil J
14aad097f0
Merge pull request #5190 from YosysHQ/emil/dfflibmap-fix-negated-next_state
dfflibmap: propagate negated next_state to output correctly
2025-07-10 19:50:02 +02:00
N. Engelhardt
02323295b0
Merge pull request #5179 from YosysHQ/krys/assert2cover 2025-07-10 14:53:22 +02:00
Emil J. Tywoniak
ad80e2bd39 libparse: install headers for use in plugins 2025-07-08 13:39:03 +02:00
Emil J
66035f706e
Merge pull request #5177 from YosysHQ/emil/rename-unescape
rename: add -unescape
2025-07-08 10:45:11 +02:00
Emil J. Tywoniak
658c7dd424 rename: fix help 2025-07-07 16:16:57 +02:00
Martin Povišer
22a44e4333 Start opt_hier 2025-07-05 16:45:52 +02:00
Miodrag Milanović
54013c6da7
Merge pull request #5162 from YosysHQ/micko/attrmap
Make attrmap able to alter memory attributes as well
2025-06-30 15:24:04 +02:00
N. Engelhardt
ef3f541501 add linecoverage command to generate lcov report from selection 2025-06-26 13:21:53 +02:00
Emil J. Tywoniak
2b659626a3 rename: add -unescape 2025-06-24 12:33:33 +02:00
Emil J. Tywoniak
778079b058 dfflibmap: propagate negated next_state to output correctly 2025-06-24 12:01:12 +02:00
George Rennie
170933ecb0
Merge pull request #5165 from georgerennie/george/opt_dff_uaf
opt_dff: don't remove cells until all have been visited to prevent UAF
2025-06-20 23:33:26 +01:00
Krystine Sherwin
beaca05b40
Include boxes in attrmap
Rename `selected_members` iterator to memb.
Add comment on `selected_processes` loop for clarity.
2025-06-21 09:49:56 +12:00
Krystine Sherwin
45131f4425
chformal: Add -assert2cover option
Also add to chformal tests.
2025-06-14 10:54:23 +12:00