Skip to content

Commit 9f35a2b

Browse files
committed
docs: finished first version of the tutorial
1 parent 2029056 commit 9f35a2b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/tutorial.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,45 @@ The output directory and basename for the resulting files can be specified as fo
5555
Advanced
5656
--------
5757

58+
When the input files are VHDL, libraries can be specified by adding a semicolon after the file path:
59+
60+
.. code-block:: bash
61+
62+
vhdl2vhdl -top Top blink.vhdl,blink_lib blink_pkg.vhdl,blink_lib top.vhdl
63+
64+
While generics values and the desired architecture are specified as follows:
65+
66+
.. code-block:: bash
67+
68+
vhdl2vlog --generic FREQ 10000000 --generic SECS 1 --arch Arch --top Counter counter.vhdl
69+
70+
For SystemVerilog inputs, you can specify parameters values, defines, and directories to be included:
71+
72+
.. code-block:: bash
73+
74+
slog2vlog --param FREQ 10000000 --param SECS 1 --define DEFINE1 1 --define DEFINE2 1 \
75+
--include hdl/slog/include1 --include hdl/slog/include2 --top Counter counter.sv
76+
5877
Alternatives
5978
------------
79+
80+
The ``vhdl2vhdl`` script is solved using only ``ghdl``, but others provide more than one alternative, where frontend or backend tools are modified.
81+
82+
By default, ``vhdl2vlog`` uses only ``ghdl``, but the combination of ``ghdl-yosys-plugin`` and ``yosys`` can be used instead, specifying the desired backend:
83+
84+
.. code-block:: bash
85+
86+
vhdl2vlog --backend yosys --top Counter counter.vhdl
87+
88+
By default, ``slog2vlog`` uses the combination of ``yosys-slang`` and ``yosys``, referred to as ``slang`` for simplicity, but an alternative frontend can be specified.
89+
One alternative is to use ``synlig``, a synthesizer based on ``surelog`` and ``yosys``, as follows:
90+
91+
.. code-block:: bash
92+
93+
slog2vlog --frontend synlig --top Counter counter.sv
94+
95+
The other option is to simply use ``yosys``, which has simpler SystemVerilog support but could be sufficient in some cases:
96+
97+
.. code-block:: bash
98+
99+
slog2vlog --frontend yosys --top Counter counter.sv

0 commit comments

Comments
 (0)