Skip to main content

sphinx-rtl

A Python package to build docs for any RTL codes (VHDL, Verilog, SystemVerilog ...*) and related programs (cocotb). Operate in three steps :

  1. Extracting the data from the built AST and CST
  2. Inferring elements by performing an analysis of the fetched nodes.
  3. Render of the inferred elements into docutils nodes.

It is designed to offer the lowest friction as possible for the user, by removing most of the documentation process. The code says enough to be used !

Main features

What make Sphinx-RTL better than others ? There are two points :

  • IR documentation pass : By reading the intermediate representation after parsing the file, we can extract more information : Related clock, CDC, nets groups, outputs ...
  • Git integration : The tool natively read your repo and search for commits, tags, author, messages ... No need to configure that in the top of the file.

An example could be found here

Example link

How to use it ?

  1. Install the extension. It's available on PyPi, so :
pip install sphinx-rtl
  1. Add the extension to the project :

Add this line in the conf.py file you used for your sphinx documentation.

extensions = ["sphinx-rtl"]
  1. Configure the used files :

Add this line, configured as you need in the main rst file.

.. rtl-autodoc:: ../examples/systemverilog/*.sv
.. rtl-autodoc:: ../examples/vhdl/*.vhd
  1. Run sphinx as you always did

Advanced usages

More advanced users may want to fine the output documentation. For this, sphinx-rtl propose a three level system :

Method Scope
config.toml at the root of the project. All runs by the tool.
arguments passed to the file. All files targeted by the directive.
arguments added on the module. The file only.

All the arguments are reusing an older syntax scheme, close to what Doxygen proposed. This look like :

@warning This module must be held in reset for at least 10 clock cycle.

But, unless Doxygen, all of them are fully optional. Sphinx-RTL could perfectly run without any of them, and still produce a decent option. The approach retained was an additive process : You can only add element to the documentation.

List of the flags :

Flag Syntax Description
warning @warning <str> Display a custom warning in top of the documentation.
notes @notes <str> Display a custom note in top of the documentation.
testbench @testbench Flag this module as a testbench.
package @package Flag this module as a package.
nterface @interface Flag this module as an interface.
constraint @constraint Add a constraint for this module. Will be displayed in a nice code block.
clock @clock <name> <frequency> <net> Configure the clock speed for a net. Will be shown in the panel properties.
latency @latency <cycles> Configure the module latency between input to output.
throughput @throughput <str> Configure the throughput of the module.
register @register <name> <offset> <size> <description> Add a register to the module, to support for memory mapped elements. A register map will be generated.
target @target <name> Configure the target (chip, node ...). Only used for indication.
tool @tool <name> Configure the tool used. Only used for indication.
sim @sim <name> Configure the simulator used. Only used for indication.
compliance @compliance <name> Set the compliance target of the module. Could be anything, generally standard buses (AXI ...).
burst @burst <size> Set the burst capacity of the module, for the standard buses.
security @security <name> Set the security level of the module, if applicable.
status @status <status> Display the status of the module (alpha, beta, release, stable ...)
deprecated @deprecated <message> Set the module as deprecated. A message can be added in top of it.
version @version <version> Set the module version. Only used for indication.
task @task <name> Set a task name for the module. Could be a git issue or a JIRA sprint ...
license @license <name> Set the license for the file.
copyright @copyright <name> Set the copyright for the file.
tag @tag <name> Set a custom tag for the file. Feel free to use any of them.

Configuration flags

These flags target the user, by enabling or disabling features for the final render.

@warning This module must be held in reset for at least 10 clock cycle.

List of the flags :

Flag Syntax Description
noclocks @noclocks Disable the clock inferring process for ports (Output and input).
noresets @noresets Disable the reset inferring process for ports (Output only).
noio @noio Disable the process IO inferring pass.
notype @notype Disable the file type inferring (testbench, package ...)
nopolarity @nopolarity Disable the polarity inferring process
nogroups @nogroups Disable the port group inferring pass
nosource @nosource Disable the source copy on the documentation.
nomermaid @nomermaid Disable the mermaid package from a CDN. Could be required for portable doc without internet connection.
wavedrom @wavedrom Disable the wavedrom package from a CDN. Could be required for portable doc without internet connection.
notemplate @notemplate Disable the template instance generation.
nosignals @nosignals Disable the signal show at the end of the doc.
nointernals @nointernals Disable the process / enums for the doc.
novendors @novendors Disable the vendors inferring pass
vendor @vendor Set the vendor manually.

Metadata

Release files for sphinx-rtl 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-rtl 0.3.1
File Size Uploaded
sphinx_rtl-0.3.1.tar.gz 36.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-rtl 0.3.1
File Interpreter ABI Platform
sphinx_rtl-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 86.1 kB

Release files / sphinx_rtl-0.3.1.tar.gz

Download URL sphinx_rtl-0.3.1.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eda99067bc11959c6c13724fc0f161f1a5427e0b804d24cd12c4baee9a73a3f9
BLAKE2b-256 checksum
How to use checksums
92189b835b3f466103b9d5aa80360b0ee708c84034a0daa9f1e3fbc7117605b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / sphinx_rtl-0.3.1-py3-none-any.whl

Download URL sphinx_rtl-0.3.1-py3-none-any.whl
Size 49.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9aa96fa4933c10e2eee710d1b81bc2faca9a7297f95cb56504e7152e155315a6
BLAKE2b-256 checksum
How to use checksums
ef3dda7ba66912596001e757cc5ea41b62f8f0681ded22e9ea54083b7438f232
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.1

2 release files

0.4.0

2 release files

This release

0.3.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page