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
git config core.hooksPath scripts/hooks  # runs `ruff format` on commit

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.3.0.tar.gz (20.0 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.3.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for svdoc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4283348c427c41f9b507f2fa6c53b6430e73b75fc225ec7b5593e4b473dd3771
MD5 197ff4c2bdbb30c8f3012f7c20bed843
BLAKE2b-256 571f520d07c8b740ea6c4458764181e46e024c7dcbc90ab1960794082239e388

See more details on using hashes here.

File details

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

File metadata

  • Download URL: svdoc-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e8d7ecd13dfc54c289f42ce59bb4acf77f4f5209d5a8f2517f76613e3dc605
MD5 b3e183ac93f854c057b4268a858f6904
BLAKE2b-256 47251e73858421a920d2f263244b61911ba25349e75f6082dcb1e23f7683ba84

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