Commit Graph

14669 Commits

Author SHA1 Message Date
Krystine Sherwin e1c7dfbacb
docs: Working cmdref groups
Also adds note on source location if available.
2025-01-29 09:27:21 +13:00
Krystine Sherwin f7b168a2a1
log_help: Better location tracking
Assign root location in call to `PrettyHelp::get_current()`.
Set default `source_file` to `"unknown"`, since that appears to be the default value rather than `nullptr`.
2025-01-29 09:27:21 +13:00
Krystine Sherwin 3a2cf0b078
Makefile: Drop cmds rst from docs/prep 2025-01-29 09:27:21 +13:00
Krystine Sherwin 3444d96756
cmdref: Combine consecutive code blocks
Formatting is nicer when there is only one code block instead of multiple in a row, especially in pdf.
2025-01-29 09:27:21 +13:00
Krystine Sherwin e21d3503b4
Docs: Update cmdref domain
Compatible with `dump_cmds_json`.
2025-01-29 09:25:55 +13:00
Krystine Sherwin 4ac58dbeaa
Docs: Fix dump_cmds_json for PrettyHelp 2025-01-29 09:25:55 +13:00
Krystine Sherwin 12c3546d8c
log_help: {add,push,pop}_content helpers 2025-01-29 09:25:55 +13:00
Krystine Sherwin da81faae14
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-01-29 09:25:55 +13:00
Krystine Sherwin 7c2c0791d0
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-01-29 09:25:55 +13:00
Krystine Sherwin 810781a655
log_help: Options can have content
Refactor `PrettyHelp::endgroup()` -> `PrettyHelp::close(int levels = 1)`.
2025-01-29 09:25:55 +13:00
Krystine Sherwin 11c632d4ba
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-01-29 09:25:55 +13:00
Krystine Sherwin cb946f6f2b
Makefile: Add cmds.json to docs/prep 2025-01-29 09:24:27 +13:00
Krystine Sherwin a4526e73a6
Docs: Improve autoref
Fix `help $cell` type references, as well as actually implement the fallback to yoscrypt.
2025-01-29 09:24:27 +13:00
Krystine Sherwin fdb5bd3572
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-01-29 09:24:26 +13:00
Krystine Sherwin 27792d8a5d
Docs: Test new pass help with chformal 2025-01-29 09:24:26 +13:00
Krystine Sherwin e5894a7a6f
Docs: WIP dump_cmds_json 2025-01-29 09:24:26 +13:00
Krystine Sherwin f066ccd75e
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-01-29 09:24:26 +13:00
Krystine Sherwin 9277ec10e1
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-01-29 09:24:26 +13:00
Krystine Sherwin 8b466de5be
Docs: Remove unused write_cell_rst function
The `help -write-rst-cells-manual` approach was made redundant by `help -dump-cells-json`.
2025-01-29 09:24:17 +13:00
github-actions[bot] 3d35f367cf Bump version 2025-01-24 00:20:25 +00:00
Catherine 3076803c9e
write_json: missing \n in help text. 2025-01-23 05:17:52 +00:00
github-actions[bot] 4a27d93b06 Bump version 2025-01-22 00:20:51 +00:00
Miodrag Milanovic e456f2e972 Next dev cycle 2025-01-21 15:26:22 +01:00
Miodrag Milanovic 427b5a251b Release version 0.49 2025-01-21 14:59:09 +01:00
Emil J da5c20dcfb
Merge pull request #4849 from YosysHQ/emil/hashlib-merge-top-ops
hashlib: merge hash_ops with hash_top_ops for plugin compat
2025-01-21 12:09:27 +01:00
Miodrag Milanovic d50849ea83 Copyright year update 2025-01-21 08:48:29 +01:00
github-actions[bot] 3f4f6c17d6 Bump version 2025-01-21 00:20:11 +00:00
Martin Povišer 0c95a76c97
Merge pull request #4856 from gadfort/synth-flatten
add support for passing flatten -separator to flatten in synth
2025-01-20 19:38:25 +01:00
Peter Gadfort 66545caa1b Merge branch 'main' into synth-flatten 2025-01-20 10:24:38 -07:00
N. Engelhardt f6517a5931
Merge pull request #4859 from YosysHQ/docs-preview-git_links
Fix links for view/edit source
2025-01-20 15:39:34 +00:00
Miodrag Milanović 2c6dc1ac83
Merge pull request #4858 from YosysHQ/update_latest-24.04
Update workflow(s) for ubuntu-latest == ubuntu-24.04
2025-01-20 16:34:46 +01:00
Emil J. Tywoniak a2c26a00f2 hashlib: document merged hash_top_ops with hash_ops 2025-01-20 16:25:52 +01:00
Emil J. Tywoniak aa01ef3312 hashlib: simplify loopback. NFC 2025-01-20 16:15:48 +01:00
Miodrag Milanovic 6b449970ef test-build: Fix missing bzlib.h 2025-01-20 16:08:42 +01:00
N. Engelhardt 398024e813
Merge pull request #4851 from YosysHQ/nak/scopeindex_private_hdlname
handle some cases of hdlname attribute on private objects
2025-01-20 14:12:25 +00:00
KrystalDelusion 0c61f1a9a8
conf.py: Fix source_directory 2025-01-20 16:30:30 +13:00
KrystalDelusion ab4bda8ae2
Docs: Fix links for view/edit source 2025-01-20 16:19:36 +13:00
KrystalDelusion 90b1ccf67b
test-compile: Set oldest clang to 10
clang-11 through clang-16 fail under 24.04, but clang-10 works, so we can move that up to the oldest supported and drop the extra target for ubuntu-20.04
2025-01-20 11:57:47 +13:00
KrystalDelusion 2403c406fb
test-compile: Update latest clang
Use clang-19 as latest
2025-01-20 11:21:17 +13:00
KrystalDelusion 37acfce8c4
test-compile: Update oldest clang for 24.04
Oldest clang on 24.04 appears to be 16.
2025-01-20 11:07:40 +13:00
Peter Gadfort f0860459ac add support for using scratchpad value for flatten.separator in flatten command 2025-01-18 10:45:19 -07:00
Peter Gadfort c4f90693aa Revert "add support for passing flatten -separator to flatten in synth"
This reverts commit 63074ccb89.
2025-01-18 10:37:56 -07:00
Peter Gadfort 63074ccb89 add support for passing flatten -separator to flatten in synth 2025-01-18 10:27:10 -07:00
github-actions[bot] 76d85fefac Bump version 2025-01-18 00:19:38 +00:00
Martin Povišer 4f0dae17ad
Merge pull request #4852 from gsomlo/gls-tcl9-json11cpp-cstdint
Fix undefined type error
2025-01-17 09:43:49 +01:00
Gabriel Somlo fe79a77e39 Fix undefined type error in libs/json11/json11.cpp
Under certain conditions, compilation errors out with
the following message:

    "error: ‘uint8_t’ does not name a type"

Explicitly including <cstdint> prevents that situation.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2025-01-16 20:09:58 -05:00
N. Engelhardt a5ba1d2eba fix bugs in handling last id in hdlname to scopename conversion 2025-01-16 12:57:08 +01:00
N. Engelhardt d640157ec4 fix some cases of hdlname being added to objects with private names 2025-01-15 15:56:42 +01:00
N. Engelhardt 17d45796a6 ModuleHdlnameIndex: handle objects with private name and hdlname attribute 2025-01-15 15:50:10 +01:00
github-actions[bot] eac2294cab Bump version 2025-01-15 00:20:50 +00:00