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

325 commits

Author SHA1 Message Date
Krystine Sherwin 9966c5cd2d
Docs: Naming techlibs 2025-03-21 10:28:48 +13:00
Krystine Sherwin 925b00dd94
cmdref: Groups and group names 2025-03-21 10:28:48 +13:00
Krystine Sherwin 1161dfd274
Docs: Include internal cmds in toctree
Also fixing some missing refs (using single backticks instead of double).
2025-03-21 10:28:48 +13:00
Krystine Sherwin b9f0fabff0
docs/internal: Add note on synth_* script highlighting 2025-03-21 10:28:48 +13:00
Krystine Sherwin ebd6d5f85b
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-03-21 10:28:48 +13:00
Krystine Sherwin b1c9097a12
cmdref: codeblock language now works
Add `options` map for setting `ContentListing` options with key:val pairs; currently only used with `ContentListing::codeblock()` language arg.
Fix generated codeblock rst to print each line of code with indentation, and change it to use explicit an `code-block` so we can set a language on it.
2025-03-21 10:28:48 +13:00
Krystine Sherwin fb944ca0fb
cmdref: Drop pmgen index 2025-03-21 10:28:47 +13:00
Krystine Sherwin 435e3d5fc1
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-03-21 10:28:47 +13:00
Krystine Sherwin 6f96f9c373
Docs: Title for index_internal 2025-03-21 10:28:47 +13:00
Krystine Sherwin 753b418a8b
Docs: Skeleton documentation for writing command help
Use `chformal` as example, comparing the `autocmd` output with `ChformalPass::formal_help()`, the json dump from the `ContentListing`, the command line output, and the RST generated (using `autocmd_rst`).
Includes bullet points on each step for more information.
Should eventually end up in `yosys_internals/extending_yosys/contributing.rst`, but it currently lives in `cmd/index_internal.rst` to avoid merge conflicts since cell help documentation is still WIP.
Also exports chformal source and help output to `docs/source/generated` during `make docs/prep`.
2025-03-21 10:28:47 +13:00
Krystine Sherwin b4ccaf8c08
autocmd_rst: autodoc for generated RST
Adds `autocmd_rst` directive, which effectively calls `autocmd` for the same command, but wraps it in a code-block in order to render the raw RST generated.
2025-03-21 10:26:13 +13:00
Krystine Sherwin 97b9a4c095
cmd_documenter: Fix option_spec
Need to copy parent class `option_spec` to retain default options (e.g. `:noindex:`).
2025-03-21 10:26:13 +13:00
Krystine Sherwin 07b6a35553
Docs: Option lists have yoscrypt highlights 2025-03-21 10:26:13 +13:00
Krystine Sherwin d1d419cb51
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-03-21 10:26:12 +13:00
Krystine Sherwin a74aeb1301
Docs: Grouping changes
Keep techlibs folder hierarchy.
techlibs/* and passes/* groups are now nested under index_techlibs and index_passes respectively, with most (all?) of the passes/* pages getting proper headings, as well as backends/frontends/kernel.  `index_passes_techmap` also references `index_techlibs`.
Split command reference toc in twain, one with maxdepth=2 and one with maxdepth=3, since passes and techlibs now have an extra level of nesting.
Move the `cmd_ref` link to the command reference, instead of top of the page.
Remove `index_internal` and `index_other` from the toc, and mark the pages as orphan. Internal commands get a note callout after the command reference toc (although this doesn't work for the pdf build), while other commands are linked in the warning for missing `source_location` (since that *should* be the only time when there are any commands in the "unknown" group).
Update autodoc extension versions, and mark the directives extension as not `parallel_read_safe` (it might be, but I'm not sure about how the xref lookups work if it is parallel so better to be safe).
2025-03-21 10:26:12 +13:00
Krystine Sherwin 598b41406c
Docs: Don't force READTHEDOCS on local
readthedocs detection should only trigger on actual readthedocs builds.
2025-03-21 10:26:12 +13:00
Krystine Sherwin 024bfcdc53
Docs: Add :cmd:title: directive
Calling :cmd:title:`<cmd>` will generate a cross reference to `<cmd>`, but unlike :cmd:ref: which displays a literal block and puts the title (short_help) in the hovertext (the title field of an a-ref), :cmd:title: will display "<cmd> - <short_help>" as plain text.
Thus replacing the previous use case of referring to :doc:`cmd/<cmd>`.
Also refactor util py scripts to have more descriptive names.
2025-03-21 10:26:12 +13:00
Krystine Sherwin a898ade473
cmdref: Export internal_flag to json
Commands flagged as internal will display a warning, just like experimental commands.
Drop `passes/tests` group in favour of `internal` group, which is automatically assigned for any command without an assigned group which is flagged as internal.
2025-03-21 10:26:12 +13:00
Krystine Sherwin bce73af324
Docs: Show warning on experimental cmds 2025-03-21 10:26:12 +13:00
Krystine Sherwin a3125ce892
cmdref: Add cmd titles
Display subheadings for each command.
Remove now redundant toc entry for `yosys> help <cmd>` line.
2025-03-21 10:26:11 +13:00
Krystine Sherwin 49907914c4
Docs: Fix warnings
Changes a bunch of :doc:`/cmd/*` to :cmd:ref:`*` with the intention of changing it later to something that replicates the previous effect of displaying the commands `short_help`.
2025-03-21 10:26:11 +13:00
Krystine Sherwin 11af1a275b
Docs: Downgrade missing cmdgroup warning
Log an info message, and put a warning for the content instead.
2025-03-21 10:26:11 +13:00
Krystine Sherwin 431cb2d1b9
Docs: Group commands
Removes group parsing from command ref domain, instead relying on a 'groups' object in the cmds.json file.
`docs/source/cmd` is no longer ignored or cleaned.
2025-03-21 10:26:10 +13:00
Krystine Sherwin 35498ae3f6
docs: Working cmdref groups
Also adds note on source location if available.
2025-03-21 10:26:10 +13:00
Krystine Sherwin 69fa0f9fef
Docs: Update cmdref domain
Compatible with `dump_cmds_json`.
2025-03-21 10:25:46 +13:00
Krystine Sherwin e289e32e61
Docs: Improve autoref
Fix `help $cell` type references, as well as actually implement the fallback to yoscrypt.
2025-03-21 10:24:28 +13:00
Krystine Sherwin 5d239204f2
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-03-21 10:24:28 +13:00
Scott Ashcroft d8af6b0616 docs: Add latex magic to make PDFs reproducible again 2025-03-14 21:48:08 +01:00
Martin Povišer 6da543a61a
Merge pull request #4818 from povik/macc_v2
Add `$macc_v2`
2025-03-12 22:55:40 +01:00
Miodrag Milanovic c4b5190229 Release version 0.51 2025-03-12 08:31:37 +01:00
N. Engelhardt c74df780b7
Merge pull request #4884 from YosysHQ/docs-preview-functional_tutorial
Docs: More on FunctionalIR
2025-03-10 15:05:55 +00:00
Krystine Sherwin c9785584da
docs/rosette: Fix tenses 2025-03-07 08:39:21 +13:00
Krystine Sherwin b56e3ec6e4
docs/functional: Minimal backend paragraphs
I was thinking about compiling the dummy example and including a simple example usage, but it turns out functional.h isn't (currently) available for extensions.
2025-03-01 16:15:54 +13:00
Krystine Sherwin 3c493d2bef
docs/rosette: Reword
Acknowledge the minimal functional backend, highlighting what's new/different for our SExpr targets.
Add and use the reference `minimal backend`.
Use `note` directives to point out missing code sections (highlighting that the included diffs are not complete).
Racket *is* still strongly-typed, it's just dynamic instead of static.  Adjust phrasing to reflect that.
Adjust some of the literal includes, adding a new section from the `Functional::AbstractVisitor`, splitting the `Module::write_eval()` in twain and adding a `smtlib.cc` literal include for the node iteration, as well as for the `FunctionalSmtBackend` to compare against the minimal backend.
Move `Backend` description up to minimal functional backend section.
2025-02-28 16:33:57 +13:00
Krystine Sherwin e01a413722
docs/rosette: List major changes in overview
Also a little paragraph on why SMT-LIB is used as the base.
2025-02-28 14:57:41 +13:00
Krystine Sherwin 560b5fe6bd
docs/functional: Add dummy toy example
Add `dummy.cc`, loosely based on `backends/functional/test_generic.cc` but as an actualy backend and without the memory testing.
Skeleton section for minimal functional backend, describing the aforementioned `dummy.cc`.
2025-02-27 16:14:59 +13:00
Krystine Sherwin db823a6acb
docs/rosette: Fix inline code 2025-02-27 16:11:44 +13:00
Krystine Sherwin c429aef60f
docs/rosette: More intro of SMT-LIB backend
As the intro paragraph (now) says:
> This section will introduce the SMT-LIB functional backend and what changes are needed...

The example is intended to be read without prior knowledge of the SMT-LIB backend, but the previous version glossed over a lot and instead focused on *just* what was changed.
This version should now be easier to follow without prior knowledge, while still being able to learn enough about the `Smt` version to adapt it to a different s-expression target that isn't Rosette.
Also adds a few `literalinclude`s of smtlib.cc, which is now copied to `docs/source/generated` along with producing the rosette diff on the fly (which now also has up to 20 lines of context, enabling the full `Module::write()` diff to be literal included).
2025-02-22 17:14:13 +13:00
Krystine Sherwin 38746ea5fa
docs: Cross reference contributing
.md points to .html on latest
.rst points to .md on main (not that it will work before this is merged)
2025-02-20 14:16:41 +13:00
Miodrag Milanovic b5170e1394 Release version 0.50 2025-02-11 07:55:17 +01:00
Krystine Sherwin 819c3260ec
docs/rosette: Backend section body 2025-02-07 15:33:40 +13:00
Krystine Sherwin b02d2c633e
docs/rosette: Module section body 2025-02-07 15:09:06 +13:00
Krystine Sherwin 34c424be68
docs/rosette: Minor updates
- Fixing typo
- Reference `write_functional_rosette`
- Adjusting/fixing diff sections
- Comment on why the `code-block:: diff` isn't a `literalinclude`
2025-02-07 15:08:24 +13:00
Krystine Sherwin dc5a5b7bd1
docs/rosette: Regen rosette.diff
This time from the actual source, which apparently means changing all of the spaces for tabs.
2025-02-07 14:13:34 +13:00
Krystine Sherwin d73c58fad1
docs/rosette: Sort, Struct, and PrintVisitor sections 2025-02-04 12:24:34 +13:00
Krystine Sherwin 1b6b6a77ba
docs/rosette: Add details for Scope
Add a diff file and use it for showing changes from smtlib to rosette.
Also add relevant sections of diff to Sort and Struct sections.
2025-01-25 09:51:20 +13:00
Martin Povišer 61450e8b6e Update codebase for macc_v2 2025-01-24 12:38:03 +01:00
Krystine Sherwin 242c037158
docs/rosette: Add overview 2025-01-24 13:10:34 +13: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