3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-22 23:25:51 +00:00
Commit graph

1078 commits

Author SHA1 Message Date
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
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
Akash Levy
3cfbc0d7af
Merge branch 'YosysHQ:main' into main 2025-07-18 09:38:39 -07: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
Akash Levy
082adf8684
Merge branch 'YosysHQ:main' into main 2025-07-15 00:04:28 -04:00
N. Engelhardt
02323295b0
Merge pull request #5179 from YosysHQ/krys/assert2cover 2025-07-10 14:53:22 +02:00
Emil J. Tywoniak
658c7dd424 rename: fix help 2025-07-07 16:16:57 +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
41107e5473 log: add -expect types prefix-log, prefix-warning, prefix-error 2025-06-16 21:26:08 +02:00
Krystine Sherwin
45131f4425
chformal: Add -assert2cover option
Also add to chformal tests.
2025-06-14 10:54:23 +12:00
Akash Levy
283faf3bf9 Merge from upstream 2025-06-13 10:19:49 -07:00
Akash Levy
819fde9329 Add debugon pass 2025-06-10 16:41:17 -07:00
Emil J. Tywoniak
239c265093 splitnets: handle single-bit vectors consistently 2025-06-05 10:58:06 +02:00
Akash Levy
3a23e772dd
Merge branch 'YosysHQ:main' into main 2025-05-24 12:11:52 -07:00
Gary Wong
4f0cbf2ee6 Fix typo ("exist" -> "exit"). 2025-05-22 18:52:33 -06:00
Akash Levy
1f00bf0057 Bump yosys to latest 2025-05-15 14:44:26 -07:00
Akash Levy
aeed1ddb74 Update from upstream 2025-05-11 15:16:52 -07:00
Krystine Sherwin
af75dce660
Fix Crashes with GCC 15 #5088
When building `WITH_PYTHON`, where a global list of modules is maintained, deleting a module also erases the entry in said global list.  This can lead to memory corruption if the global list is destructed before the module.
Using `on_shutdown()` instead means the module destructor is explicitly called before the global list can be destructed, preventing the issue.
Also add a comment to `Pass::~Pass()` to suggest the same for future passes that might try to use that (and see this commit in the blame if they need a reason why).
2025-05-10 09:59:13 +12:00
Emil J. Tywoniak
90a2c92370 driver: allow --no-version still write things like Generated by Yosys 2025-05-07 11:34:23 +02:00
Emil J. Tywoniak
d7affb8821 driver: add --no-version to suppress writing Yosys version in command outputs 2025-05-05 13:12:08 +02:00
Akash Levy
d2aa569d8f
Merge branch 'YosysHQ:main' into main 2025-05-01 08:40:31 -07:00
KrystalDelusion
22c72a5af4
Merge pull request #4619 from malmeloo/fix/tee-path-whitespace
Allow whitespace in `tee` command paths
2025-05-01 09:33:47 +12:00
Emil J. Tywoniak
adb1986dc1 gzip: refactor file open failure errors 2025-04-29 10:37:35 +02:00
Akash Levy
4fad708795
Merge branch 'YosysHQ:main' into main 2025-04-22 11:23:26 -07:00
Emily Schmidt
4b4cdf75b8 timeest: gcc refuses to parse "struct ::Yosys:..." 2025-04-22 16:49:56 +01:00
Emily Schmidt
9c9a0e3e45 add some comments to timeest 2025-04-22 16:49:56 +01:00
Martin Povišer
28c7f202ca timeest: Add -select 2025-04-22 16:49:56 +01:00
Martin Povišer
e8196b1dda timeest: Update help 2025-04-22 16:49:56 +01:00
Martin Povišer
c5e154e941 timeest: Fix templating 2025-04-22 16:49:56 +01:00
Martin Povišer
4323d56b9e timeest: Fill missing header 2025-04-22 16:49:56 +01:00
Martin Povišer
386b33d192 timeest: Add command for critical path estimation 2025-04-22 16:49:56 +01:00
Akash Levy
3bec45a1ee
Merge branch 'YosysHQ:main' into main 2025-04-22 04:09:26 -07:00
KrystalDelusion
7f8d0e31f6
Fix #5046
`clean_zerowidth` had skipped $macc, but not $macc_v2
2025-04-22 17:42:52 +12:00
Akash Levy
5f5ed1b29e Merge upstream yosys 2025-04-21 17:36:24 -07:00
Emil J
6a2f2f1818
Merge pull request #5031 from suisseWalter/fix_sequential_area
stat: fix sequential area not being included in addition/multiplication
2025-04-21 11:02:40 +02:00
clemens
21b93ee1fb fix sequential area not being included in addition/multiplication
Fixes a bug where the sequential area isn't part of the Stat_numeric_members that are used to automatically add/mul the statdata_t members.
2025-04-15 09:38:04 +02:00
Akash Levy
e241c9d513
Merge branch 'YosysHQ:main' into main 2025-04-10 14:28:10 -07:00
Krystine Sherwin
237e454131
design.cc: Fix selections when copying
Use `Design::selected_modules()` directly, popping at the end instead of copying the selection.
Also default to a complete selection so that boxes work as before.
Simplify to using `RTLIL::SELECT_WHOLE_CMDERR` instead of doing it manually.
Also add tests for importing selections with boxes.
2025-04-08 16:35:12 +12:00
Krystine Sherwin
911a3ae759
setattr.cc: Use new selection helpers
Also test they work as expected.
2025-04-08 15:34:48 +12:00
Krystine Sherwin
dbc2611dd6
test_select: Add and exercise test_select pass
Developer facing, intended to check internal selection semantics work as expected.  i.e. it would have revealed the bug in the now reverted PR.
2025-04-08 11:59:45 +12:00
Krystine Sherwin
cd3b914132
Reinstate #4768
Revert the reversion so that we can fix the bugs that the PR missed.
2025-04-08 11:58:05 +12:00
Akash Levy
06c614a010
Merge branch 'YosysHQ:main' into main 2025-04-07 07:28:06 -07:00