3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-29 20:05:52 +00:00

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`.
This commit is contained in:
Krystine Sherwin 2025-03-21 10:28:47 +13:00
parent b4ccaf8c08
commit 753b418a8b
No known key found for this signature in database
2 changed files with 157 additions and 1 deletions

View file

@ -1028,6 +1028,15 @@ docs/source/generated/functional/rosette.diff: backends/functional/smtlib.cc bac
PHONY: docs/gen/functional_ir
docs/gen/functional_ir: docs/source/generated/functional/smtlib.cc docs/source/generated/functional/rosette.diff
docs/source/generated/%.log: docs/source/generated $(TARGETS) $(EXTRA_TARGETS)
$(Q) ./$(PROGRAM_PREFIX)yosys -qQT -h '$*' -l $@
docs/source/generated/chformal.cc: passes/cmds/chformal.cc docs/source/generated
cp $^ $@
PHONY: docs/gen/chformal
docs/gen/chformal: docs/source/generated/chformal.log docs/source/generated/chformal.cc
PHONY: docs/gen docs/usage docs/reqs
docs/gen: $(TARGETS)
$(Q) $(MAKE) -C docs gen
@ -1063,7 +1072,7 @@ docs/reqs:
$(Q) $(MAKE) -C docs reqs
.PHONY: docs/prep
docs/prep: docs/source/generated/cells.json docs/source/generated/cmds.json docs/gen docs/usage docs/gen/functional_ir
docs/prep: docs/source/generated/cells.json docs/source/generated/cmds.json docs/gen docs/usage docs/gen/functional_ir docs/gen/chformal
DOC_TARGET ?= html
docs: docs/prep