Skip to main content

pydoc-style documentation generator for SystemVerilog RTL

Project description

svdoc

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
  • Cross-file type resolution — a module's port typed from a package in another file resolves to its fully-qualified package::type name

Not yet supported: classes/UVM, instantiation hierarchy, block diagrams, full multi-file `include resolution.

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`)
svdoc my_module.sv --fix

# 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/

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

Changelog

See CHANGELOG.md.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

svdoc-0.2.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

svdoc-0.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file svdoc-0.2.0.tar.gz.

File metadata

  • Download URL: svdoc-0.2.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for svdoc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bec403e180b78805b178422d2d4b67b67c172dec175383fa09a1a428a0e493eb
MD5 433397b3c99a9aa07c8bb3f06ad246a4
BLAKE2b-256 ad98623ada1f464957e7c34e2e31542e46dcb3154a46395450e159173f39494e

See more details on using hashes here.

File details

Details for the file svdoc-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: svdoc-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for svdoc-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0d882947bec127713bfb87dfec3223175a6271d8f9487d8b61f9a7e914b5bdd
MD5 8abfe74ba327697f61d21be42da0d020
BLAKE2b-256 51007ab18d13662e8aedb270c558b96fdecdbd37e3c38b9054f085d79a54dcb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page