Home

Awesome

sphinx-hwt

CircleCI PyPI version Coverage Status Documentation Status Python version

Extension for Sphinx document generator. Add automatically generated schemes and other visual documentation of hardware. Currently mainly for HWT library (but VHDL,Verilog -> HWT is possible).

Live demo is documentation of hwtLib library, this library contains many components. The schematic is in documentation of compoents for example there in documentation of CRC generator.

Installation

Install as standard python package, using pip. If you have NPM installed javascript in package will be updated.

pip3 install sphinx-hwt

sphinx-hwt package provides sphinx_hwt extension for sphinx doc. gen. In order to use this extension you have to register in in your conf.py sphinx doc. configuration.

extensions = ['sphinx_hwt']

From now Sphinx will be able to use directives from sphinx-hwt to render schematics and others.

Usage

Add hwt-schematic directive in docstring of HwModule class like this (will add scheme to a html doc).

from hwt.hwModule import HwModule

def explicit_constructor():
    return ExampleCls0()

class ExampleCls0(HwModule):
    """
    .. hwt-schematic::

    or

    .. hwt-schematic:: explicit_constructor

    There are also other directives, read the feature list below.
    """

Feature list

Similar software