Skip to main content

svdoc

CI PyPI Python License

A pydoc-style documentation generator for SystemVerilog RTL, built on pyslang (Python bindings for the slang SystemVerilog compiler).

Extracts Doxygen-style doc comments (/** @brief ... */, ///< ...) from modules, interfaces, and packages, and renders clean Markdown or HTML documentation — no manual editing required.

What it documents today

  • Modules — name, parameters, ports, doc comments

  • Interfaces — parameters, ports, signals, modports

  • Packages — typedefs (enums, packed structs, aliases), functions, tasks

  • Classes — standalone or inside a package: base class, parameters, properties, methods (incl. extern/virtual/static)

  • Cross-file type resolution — a module's port typed from a package in another file resolves to its fully-qualified package::type name

  • Diagrams — Mermaid module symbol and instance-hierarchy diagrams, embedded in module pages by svdoc build (opt out with --no-diagrams); HTML pages load Mermaid from a pinned jsDelivr CDN script and fall back to the readable Mermaid source offline

Not yet supported: UVM-specific constructs.

Install

pip install svdoc

Usage

# print Markdown to stdout
svdoc my_module.sv

# write a .md or .html file instead
svdoc my_module.sv --out md
svdoc my_module.sv --out html

# resolve cross-file types (e.g. a module using a package's enum/struct)
svdoc my_module.sv my_package.sv --out html

# auto-scaffold missing doc comments in place (like `ruff --fix`);
# covers module/interface headers, interface bodies, and packages
# (typedefs, enum values, struct fields, functions/tasks and their args)
svdoc my_module.sv --fix
# (--include-dir works with --fix too, for `include targets outside the file's directory)

# build a full linked HTML site from many files (any directory layout)
svdoc build my_module.sv my_interface.sv my_package.sv --out-dir site/

# same, but cross-linked Markdown pages + index.md of [[wikilinks]] (Obsidian)
svdoc build my_module.sv my_interface.sv my_package.sv --out-dir site/ --format md

# build embeds Mermaid diagrams in module pages by default; opt out with
svdoc build my_module.sv my_interface.sv --out-dir site/ --no-diagrams

# files that don't parse (or have no module/interface/package/class) are skipped
# with a warning, as are constructs whose name is already taken by an earlier
# file (pages are named after the construct); fail instead with
svdoc build src/*.sv --out-dir site/ --strict

# single file: embed the module symbol diagram too
svdoc my_module.sv --out md --diagrams

Example output

Given a small FIFO module (spike/example.sv), svdoc generates Markdown and HTML docs — see the example output on the published docs site.

Doc comment convention

Doxygen-style, both forms supported:

/**
 * @brief A simple synchronous FIFO.
 */
module fifo #(
    parameter int DEPTH = 16  ///< Number of entries in the FIFO
) (
    input logic clk  ///< Clock
);

Development

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,docs]"
python -m pytest
git config core.hooksPath scripts/hooks  # runs `ruff format` on commit

Contributing

See CONTRIBUTING.md.

Changelog

See CHANGELOG.md.

License

MIT — see LICENSE.

Metadata

Release files for svdoc 1.0.0

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

Source distribution (sdist)

Source distribution for svdoc 1.0.0
File Size Uploaded Provenance Actions
svdoc-1.0.0.tar.gz 27.8 kB With provenance Details for svdoc-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for svdoc 1.0.0
File Interpreter ABI Platform Actions
svdoc-1.0.0-py3-none-any.whl Python 3 none any Details for svdoc-1.0.0-py3-none-any.whl

Total release size: 57.9 kB

Release files / svdoc-1.0.0.tar.gz

Download URL svdoc-1.0.0.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
685d5d00075ba80e35b62d2f9b9c81c581be87af9e53080a0a599ee4578f02be
BLAKE2b-256 checksum
How to use checksums
8131f1d0470d71b406857cd62464bf70fe853704cd9aaddf62903792ee4a203f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / svdoc-1.0.0-py3-none-any.whl

Download URL svdoc-1.0.0-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68f41baa485a01989e6edeacfa9b96749b1eba4ea9ee600e5d4f9c3f0d5f90bf
BLAKE2b-256 checksum
How to use checksums
2c511a048fc14d9548489c00de962bff4267b9d09598ed267ba6df9e6203d3a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Security for svdoc 1.0.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for svdoc-1.0.0.tar.gz

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 Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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