diff --git a/README.md b/README.md index 259416a..2fd369e 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,10 @@ conda XXXX * `netlistsvg` -## New Directives +## Usage + +The `verilog-diagram` RST directive can be used to generate a diagram from Verilog code and include it in your documentation. +Check out the [examples](https://sphinxcontrib-verilog-diagrams.readthedocs.io/en/latest/) to see how to use it. ```rst @@ -72,7 +75,9 @@ conda XXXX ``` -Verilog Diagram Types; +### Options + +`:type:` - Verilog Diagram Types; * `yosys-blackbox` - Netlist rendered by Yosys. * `yosys-aig` - Verilog file run through `aigmap` before image is generated directly in Yosys. @@ -82,6 +87,12 @@ Verilog Diagram Types; `:flatten:` - Use the Yosys `flatten` command before generating the image. +### Example + +Here is a diagram of a 4-bit carry chain. + +![4-bit carry chain](diagrams/carry4-flatten.svg) + ## Licence diff --git a/diagrams/carry4-flatten.svg b/diagrams/carry4-flatten.svg new file mode 100644 index 0000000..a7deccb --- /dev/null +++ b/diagrams/carry4-flatten.svg @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CO + + + + + + O + + + + + + CI + + + + + + CYINIT + + + + + + DI + + + + + + S + + + + + + + + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + + 0 + + + 1 + + + 2 + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +