3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-25 01:55:33 +00:00
Commit graph

32 commits

Author SHA1 Message Date
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
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
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
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
Krystine Sherwin
927dc445dd
Docs: Render cell titles
Also put property lists *after* cell description.
2024-10-15 07:35:42 +13:00
Krystine Sherwin
ce6a7fe4fc
docs/util: Cells now have properties
Properties are both an option:
```
.. cell:def:: $add
   :properties: is_evaluable
```
and a field:
```
.. cell:def:: $eqx

   :property x-aware:
   :property is_evaluable:
```

Properties as an option appear in the property index: linking a given property to all cells with that property; while properties as a field display with the cell.
2024-10-15 07:35:41 +13:00
Krystine Sherwin
c6414e08eb
Docs: Switch to furo-ys for YoscryptLexer 2024-10-15 07:34:53 +13:00
Krystine Sherwin
6aceb6a297
cmdref.py: Support autoref for 'help <cmd>' 2024-10-15 07:34:52 +13:00
Krystine Sherwin
b127ac07f8
Docs: Preliminary autocellgroup usage
Remove `/source/cell` from .gitignore.
Add a few initial cell pages.
Add YosysCellGroup documenter and cell:group directive.
Update Documenters to use nested json.
Better nested tocs for group.module.source layout.
2024-10-15 07:26:04 +13:00
Krystine Sherwin
37573a6f00
Docs: Use json for cellref
e.g.
```
.. autocell:: $alu
   :source:
   :linenos:
```
2024-10-15 07:26:04 +13:00
Krystine Sherwin
84f2968031
cellref: Better name checking
Fix RTD not including source with warning
`WARNING: invalid signature for autocellsource ('/home/docs/checkouts/readthedocs.org/user_builds/yosys/checkouts/manual-rewrite/source/generated/simlib.v:$alu::__source')`.
2024-10-15 07:24:14 +13:00
Krystine Sherwin
ccd3bace23
Docs: Add cells loc config value 2024-10-15 07:24:14 +13:00
Krystine Sherwin
e5f54dd7cd
Docs: Cell reference as a custom documenter
Use autodocs to perform cell reference docs generation instead of generating rst files directly.
e.g.
```
.. autocell:: simlib.v:$alu
   :source:
   :linenos:
```
2024-10-15 07:23:45 +13:00
Krystine Sherwin
c0f9828b3c
Docs: Add autoref role
Use new `autoref` role when using single backticks. Allows automatic mapping to a cmd ref or a cell ref.
2024-10-15 07:17:36 +13:00
Krystine Sherwin
f9b4e04fef
Docs: Add cell reference
Subclass the command reference code in order to support smart references to the internal cells.
2024-10-15 07:17:36 +13:00
Krystine Sherwin
e2c0f8fc50
Some tidy up 2023-08-14 12:13:29 +12:00
Krystine Sherwin
f8333e52f7
cmd links use title text 2023-08-08 12:19:13 +12:00
Krystine Sherwin
8203a01ba9
Adding custom domain for cmdref 2023-08-08 11:51:57 +12:00
KrystalDelusion
a14dec79eb
Rst docs conversion (#3496)
Rst docs conversion
2022-11-15 12:55:22 +01:00