Verilog Domain for Sphinx
Project description
Dependencies
lark-parser
Enabling
Add extension in conf.py:
extensions = [ 'sphinx_verilog_domain' ]
Usage
Module headers (non-ANSI-style only for now):
.. verilog::module:: module Top(a, b);
Port declarations:
.. verilog:port:: input wire [31:0] a, b;
Parameter declarations:
.. verilog:parameter:: parameter logic param_name_05 = 1, param_name_05_b = 2;
Custom name for use in references:
.. verilog:module:: module \35(4p3|) (z); :refname: module_escaped
References:
Reference to :verilog:ref:`Top` Reference to :verilog:ref:`module_escaped` - links to ``\\35(4p3|)``
Nesting:
.. verilog:module:: module Top1(a, b, c); .. verilog:port:: input a; Description of port ``a`` .. verilog:port:: input b; Description of port ``b`` .. verilog:module:: module Nested(a); .. verilog:port:: output a; Description of port ``a`` in ``Nested`` Reference to module ``Top1``'s port ``a``: :verilog:ref:`Top1.a`.
Namespaces
There are three directives for changing current Verilog scope:
.. verilog:namespace:: A::B - sets current scope to A::B. Using $root as an argument or using the directive without argument at all sets global namespace.
.. verilog:namespace-push:: C::D - sets current scope to C::D relatively to current scope
.. verilog:namespace-pop:: - restores scope which was active before previous namespace-push was called. If there is no matching namespace-push, scope is set to global scope.
Example:
.. verilog:namespace:: A::B .. verilog:port:: input inside_a_b; .. verilog:namespace-push:: C::D .. verilog:port:: input inside_a_b_c_d; .. verilog:namespace-pop:: .. verilog:port:: input inside_a_b_again; .. verilog:namespace:: .. verilog:port:: input in_global_namespace;
Development
To create and open the development environment with all system and python packages use:
make env source env/conda/bin/activate sphinx-verilog-domain
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinx-verilog-domain-0.0.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfdc424735f2f0fb2592b8ff9452b0e5c2d798ffd1b27484daee92ab9b55abff |
|
MD5 | 4af5dc3fc92cc84038aea1ba4f22ecae |
|
BLAKE2b-256 | 93c93b1c2e2ec2b973552a8ae9ccd055e92cc466fdb1ef9c478b010a5acb1e80 |
Hashes for sphinx_verilog_domain-0.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2db51884f40e4273b6d9e60a1204116d96c7aba8f08d40283ec48a5f4dfae19 |
|
MD5 | 4353024d8084bea42165077e5d8898da |
|
BLAKE2b-256 | 89c56566eb98aa13a335f1a6760b7a7c1be264dea8dc1aa16a8906b74657dde0 |