Metadata-Version: 2.4
Name: svdoc
Version: 0.2.0
Summary: pydoc-style documentation generator for SystemVerilog RTL
License: MIT License
        
        Copyright (c) 2026 svdoc contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyslang>=11.0.0
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# svdoc

A pydoc-style documentation generator for SystemVerilog RTL, built on
[`pyslang`](https://pypi.org/project/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:

```systemverilog
/**
 * @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`.
