3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-27 06:27:57 +00:00
Commit graph

15318 commits

Author SHA1 Message Date
Krystine Sherwin
fe2be07bc8
Docs: Fix dump_cmds_json for PrettyHelp 2025-07-21 10:34:12 +12:00
Krystine Sherwin
7d0bcd8b48
log_help: {add,push,pop}_content helpers 2025-07-21 10:34:12 +12:00
Krystine Sherwin
d4498acea7
log_help: Json dumpable
Current modes are `LOG` and `LISTING`, which `log()` and store for conversion to json respectively.
Add `ContentListing` listing struct to (recursively) contain help data for conversion to a json object to be exported and used elsewhere (e.g. the docs).
Rather than formatting as rst we can just export with type information and do the conversion at the destination (i.e. in the python code which loads the domain for autodoc).
Implement `PrettyHelp::has_content()`.
Provide `PrettyHelp::get_content()` which returns a read-only list of the current content.
`PrettyHelp` constructor takes optional `Mode` enum to define format of help content.
Updates `PrettyHelp` methods to use a switch case for checking current mode, calling `log_abort()` in the default case (i.e. unsupported mode).
2025-07-21 10:34:12 +12:00
Krystine Sherwin
ae3514adfd
log_help: Include source_location
Use `std::experimental::source_location` because clang support is `??`
Add `ENABLE_SOURCE_LOCATION` make variable and corresponding `YOSYS_ENABLE_SOURCE_LOCATION` define.
Dummy out the struct if disabled and check for null instead of using `#ifdef` blocks everywhere.
2025-07-21 10:34:12 +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
3718f916f3
Makefile: Add cmds.json to docs/prep 2025-07-21 10:33:31 +12:00
Krystine Sherwin
f5ace20bf6
Docs: Improve autoref
Fix `help $cell` type references, as well as actually implement the fallback to yoscrypt.
2025-07-21 10:33:31 +12:00
Krystine Sherwin
714790c70b
Docs: Proto doc_string approach for cmd help
Add `doc_string` field to `Pass` constructor
Add `docs/util/newcmdref.py` to contain command domain
Update `docs/util/cmdref.py` with `cmd:usage` and `cmd:optiongroup` for describing commands.
Functional, but WIP.
2025-07-21 10:33:31 +12:00
Krystine Sherwin
5ce097ed3d
Docs: Test new pass help with chformal 2025-07-21 10:33:31 +12:00
Krystine Sherwin
804e18e0c6
Docs: WIP dump_cmds_json 2025-07-21 10:32:51 +12:00
Krystine Sherwin
28ecb91052
register: Add pass_usages and default help
Experimental new formatting for describing passes that can be rendered into the standard help format, as well as being more amenable to smarter formatting for web documentation.
2025-07-21 10:32:51 +12:00
Krystine Sherwin
2c79aeb7ad
json.h: Fix array template
Using `{begin|end}_object` inserts curly braces instead of square brackets, which can result in reordering (and may be syntactically incorrect?).
2025-07-21 10:32:09 +12:00
Krystine Sherwin
fe3adfd960
Docs: Remove unused write_cell_rst function
The `help -write-rst-cells-manual` approach was made redundant by `help -dump-cells-json`.
2025-07-21 10:32:09 +12:00
github-actions[bot]
aa1daa7023 Bump version 2025-07-18 00:25:48 +00: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
Martin Povišer
415b7d3f65 Drop experimental label off synth -hieropt 2025-07-17 12:02:44 +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
github-actions[bot]
af0b263557 Bump version 2025-07-16 00:25:58 +00:00
George Rennie
0f40bb3076
Merge pull request #5232 from georgerennie/george/firrtl_name_cache
write_firrtl: clear used names cache each invocation
2025-07-15 16:49:52 +01:00
Emil J
0f784fd084
Merge pull request #5219 from YosysHQ/emil/fix-liberty-expr-space
dfflibmap: fix dffe inference when spaces used for ANDs in liberty next_state
2025-07-15 16:39:26 +02:00
George Rennie
381381c997 write_firrtl: clear used names cache each pass 2025-07-15 14:14:07 +01:00
Emil J. Tywoniak
c7a3abbcc4 libparse: LibertyExpression unit test 2025-07-15 12:53:30 +02:00
Emil J. Tywoniak
21e68ec9be libparse: fix space ANDs 2025-07-15 12:53:13 +02:00
Emil J. Tywoniak
e960428587 unit tests: fix run failure detection 2025-07-15 12:21:01 +02:00
Martin Povišer
46eafa9466
Merge pull request #5230 from whitequark/install-dev
Allow installing headers and `yosys-config` without the rest
2025-07-15 10:57:41 +02:00
Catherine
62c270a38b Allow installing headers and yosys-config without the rest.
This is useful to be able to build a plugin like `yosys-slang` without
having to build the entirety of Yosys, which can save a lot of time.
2025-07-15 01:28:09 +00: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
github-actions[bot]
e57a2b9442 Bump version 2025-07-11 00:25:36 +00:00
Emil J. Tywoniak
6ee01308f2 dfflibmap: show dffe inference is broken by space ANDs 2025-07-11 00:33:01 +02:00
Emil J
dfe86b50d8
Merge pull request #5217 from rocallahan/fix-importSigSpecWorker-leak
Fix space leak in `SatGen::importSigSpecWorker()` by avoiding `log_id…
2025-07-10 19:56:56 +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
Emil J. Tywoniak
7fe817c52f dfflibmap: test negated state next_state with mixed polarities 2025-07-10 18:54:43 +02:00
N. Engelhardt
02323295b0
Merge pull request #5179 from YosysHQ/krys/assert2cover 2025-07-10 14:53:22 +02:00
N. Engelhardt
d21a553fdc
Merge pull request #5218 from YosysHQ/nak/limit_ub 2025-07-10 14:53:11 +02:00
Emil J. Tywoniak
f34c4f2e26 log: deduplicate unescape_id from log_id 2025-07-09 16:20:27 +02:00
N. Engelhardt
e47f5369fd verificsva: check -L value is small enough for code to work 2025-07-09 15:58:35 +02:00
Emil J
9334a5c275
Merge pull request #5216 from YosysHQ/emil/publish-libparse-header
Install libparse.h for use in plugins
2025-07-09 14:28:59 +02:00
github-actions[bot]
7566af4a4b Bump version 2025-07-09 00:25:57 +00:00
Robert O'Callahan
743df9f0f9 Fix space leak in SatGen::importSigSpecWorker() by avoiding log_id().
Calling `log_id()` leaks a copy of the ID into `log_id_cache` until the
end of the pass, which causes exorbitant memory usage.

See issue #5210.
2025-07-08 23:53:38 +00:00
George Rennie
478b6a2b3f kernel: treat zero width constant as zero 2025-07-08 19:37:59 +01: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
github-actions[bot]
e60cf3e2fa Bump version 2025-07-08 00:25:06 +00:00
KrystalDelusion
1a215719e5
Merge pull request #5192 from garytwong/multiline-string
verilog: support newline and hex escapes in string literals
2025-07-08 10:27:01 +12:00
Emil J. Tywoniak
658c7dd424 rename: fix help 2025-07-07 16:16:57 +02:00