Getting started¶
Install¶
pip install sphinx-systemverilog
The extension depends on sphinx and pyslang; both are installed
automatically.
Enable the extension¶
Add it to your conf.py and point it at your SystemVerilog sources:
extensions = [
"sphinx_systemverilog",
]
# One or more directories scanned (recursively) for .sv / .svh files.
sv_source_dirs = ["../rtl", "../verif"]
# The default doc-comment dialect: "native", "naturaldocs", "doxygen", or "auto".
sv_doc_style = "native"
On each build the extension parses the configured sources once into a project-wide index, then every directive resolves names against that index.
Document something¶
Use an auto* directive in any .rst (or MyST .md) page:
.. autosvclass:: my_pkg::my_transaction
:members:
This renders the class, its inheritance, and its documented members, pulling the text from the doc comments in your source.
Configuration reference¶
Option |
Default |
Meaning |
|---|---|---|
|
|
Directories scanned for |
|
|
Additional |
|
|
Preprocessor |
|
|
Explicit root files to parse (instead of scanning dirs). |
|
|
Default doc-comment dialect. |
|
|
Options applied to every |