-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from daniellimws/docs-clock
Update documentation for clock examples
- Loading branch information
Showing
28 changed files
with
293 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
env | ||
_build | ||
tests/**/*.md | ||
tests/**/*.svg | ||
tests/**/*.png | ||
examples/**/*.md | ||
examples/**/*.svg | ||
examples/**/*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Examples | ||
======== | ||
|
||
Here we have examples on how v2x converts a Verilog module to its corresponding model.xml and pb_type.xml files. These examples are taken from the `v2x test cases <https://github.com/SymbiFlow/python-symbiflow-v2x/tree/master/tests>`_. | ||
|
||
.. toctree:: | ||
|
||
examples/clocks.rst | ||
examples/dsp.rst | ||
examples/vtr-examples.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. Clock Example Tests | ||
Clock | ||
===== | ||
|
||
There are various ways for an input or output port to be detected as a clock by v2x. Here are examples on ways to do so. | ||
|
||
.. toctree:: | ||
clocks/autodetection.rst | ||
clocks/manual_input.rst | ||
clocks/manual_output.rst | ||
clocks/multiple.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Autodetection of clock from flipflop | ||
==================================== | ||
|
||
.. include:: ../../../tests/clocks/dff_one_clock/README.rst | ||
.. include:: ../../../tests/clocks/dff_comb_one_clock/README.rst | ||
.. include:: ../../../tests/clocks/dff_two_clocks/README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Manually set inputs as clock | ||
============================ | ||
|
||
.. include:: ../../../tests/clocks/input_attr_clock/README.rst | ||
.. include:: ../../../tests/clocks/input_attr_not_clock/README.rst | ||
.. include:: ../../../tests/clocks/input_named_clk/README.rst | ||
.. include:: ../../../tests/clocks/input_named_regex/README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Manually set outputs as clock | ||
============================= | ||
|
||
.. include:: ../../../tests/clocks/output_attr_clock/README.rst | ||
.. include:: ../../../tests/clocks/output_named_clk/README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Multiple clocks | ||
=============== | ||
|
||
.. include:: ../../../tests/clocks/multiple_inputs_named_clk/README.rst | ||
.. include:: ../../../tests/clocks/multiple_outputs_named_clk/README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.. DSP Based Example Tests | ||
DSP Examples | ||
============ | ||
DSP | ||
=== | ||
|
||
.. toctree:: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
D-Flipflop with combinational logic | ||
+++++++++++++++++++++++++++++++++++ | ||
|
||
`input wire a` should be detected as a clock because it drives the flip flop. | ||
The following shows a combinational logic design driven by a clock. ``input wire a`` should be detected as a clock because it drives the flip flop. | ||
|
||
.. symbolator:: ../../tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v | ||
.. symbolator:: ../../../tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v | ||
|
||
.. literalinclude:: ../../tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v | ||
.. verilog-diagram:: ../../../tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v | ||
:type: netlistsvg | ||
:module: BLOCK | ||
|
||
| | ||
.. literalinclude:: ../../../tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v | ||
:language: verilog | ||
:start-after: */ | ||
:caption: tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v | ||
The ``is_clock`` attribute of the ``a`` port is set to 1, and the ports ``b``, ``c`` and ``d`` have their ``clock`` attribute set to ``a``. | ||
|
||
.. literalinclude:: ../../../tests/clocks/dff_comb_one_clock/golden.model.xml | ||
:language: xml | ||
:caption: tests/clocks/dff_comb_one_clock/golden.model.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
D-Flipflop with one clock | ||
+++++++++++++++++++++++++ | ||
|
||
The following shows a simple D-flip flop driven by one clock. ``input wire a`` should be detected as a clock because it drives the flip flop. | ||
|
||
.. symbolator:: ../../../tests/clocks/dff_one_clock/dff_one_clock.sim.v | ||
|
||
.. verilog-diagram:: ../../../tests/clocks/dff_one_clock/dff_one_clock.sim.v | ||
:type: netlistsvg | ||
:module: BLOCK | ||
|
||
| | ||
.. literalinclude:: ../../../tests/clocks/dff_one_clock/dff_one_clock.sim.v | ||
:language: verilog | ||
:start-after: */ | ||
:caption: tests/clocks/dff_one_clock/dff_one_clock.sim.v | ||
As you can see in the generated model, the ``is_clock`` attribute of the ``a`` port is set to 1, while the ``b`` and ``c`` ports have their ``clock`` attribute set to ``a``. | ||
|
||
.. literalinclude:: ../../../tests/clocks/dff_one_clock/golden.model.xml | ||
:language: xml | ||
:caption: tests/clocks/dff_one_clock/golden.model.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
D-Flipflop with two clocks | ||
++++++++++++++++++++++++++ | ||
|
||
``input wire c1`` and ``input wire c2`` should be detected as clocks because they drive the flip flop. | ||
|
||
.. symbolator:: ../../../tests/clocks/dff_two_clocks/dff_two_clocks.sim.v | ||
|
||
.. verilog-diagram:: ../../../tests/clocks/dff_two_clocks/dff_two_clocks.sim.v | ||
:type: netlistsvg | ||
:module: BLOCK | ||
|
||
| | ||
.. literalinclude:: ../../../tests/clocks/dff_two_clocks/dff_two_clocks.sim.v | ||
:language: verilog | ||
:start-after: */ | ||
:caption: tests/clocks/dff_two_clocks/dff_two_clocks.sim.v | ||
The ``is_clock`` attribute of the ``c1`` and ``c2`` ports are set to 1, and the ports ``a``, ``b``, ``c``, ``o1`` and ``o2`` have their ``clock`` attribute set to the respective clocks they are driven by. | ||
|
||
.. literalinclude:: ../../../tests/clocks/dff_two_clocks/golden.model.xml | ||
:language: xml | ||
:caption: tests/clocks/dff_two_clocks/golden.model.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.