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

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.1.0.tar.gz (16.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.1.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: svdoc-0.1.0.tar.gz
  • Upload date:
  • Size: 16.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.1.0.tar.gz
Algorithm Hash digest
SHA256 fad7fef6ac7af60ebb00c7395e08a5092d70150951075bdfcad3f89c5111fb06
MD5 b6d5c95ff556d20cd420f9b71da0c08e
BLAKE2b-256 3f199e8f623c9528fbb2a1ffba56d9c0634338fc1b33f05714c7d971108938fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: svdoc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52eb73274370e0c306208c0c6f9d5d18aeaa0611ed243c348f19163c3ca60cad
MD5 bd0b89aefdca129924233e012be32d75
BLAKE2b-256 a1cae21dbeca184c3d2a4913599f7b58ab779c1671925843bb9261b44cd69d8c

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