Skip to content

Commit

Permalink
docs: add 'examples_intro'
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Sep 6, 2021
1 parent 4343d31 commit 6cd3038
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ The VHDL revision can be specified through the :ref:`python_interface`
Alternatively, environment variable ``VUNIT_VHDL_STANDARD`` can be set to
``93``|``1993``, ``02``|``2002``, ``08``|``2008`` (default) or ``19``|``2019``.

.. warning:: the specification of an unsupported revision produces an ERROR.
Moreover, take into account that `context`` statement is not supported
previous 2008, so it must be replace with multiple ``use`` statements.
.. IMPORTANT::
Note that VHDL revision 2019 is unsupported by most vendors, and support of VHDL 2008 features is uneven.
Check the documentation of the simulator before using features requiring revisions equal or newer than 2008.

.. _json_export:

Expand Down
7 changes: 7 additions & 0 deletions docs/examples_intro.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. HINT::
Most of the examples expect the simulator to support several VHDL 2008 features.
This is made explicit by using ``context`` instead of multiple ``use`` statements.
However, some vendors do support enough VHDL 2008 features in order to run some of the examples, but they cannot
handle contexts.
In those cases, replacing ``context vunit_lib.vunit_context`` with the content of :vunit_file:`vunit/vhdl/vunit_context.vhd`
and :vunit_file:`vunit/vhdl/data_types/src/data_types_context.vhd` might work.
11 changes: 10 additions & 1 deletion tools/docs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ def examples():
"""
eg_path = ROOT.parent / "examples"
egs_fptr = (ROOT / "examples.rst").open("w+")
egs_fptr.write("\n".join([".. _examples:\n", "Examples", "========", "\n"]))
egs_fptr.write(
"\n".join(
[
".. _examples:\n",
"Examples",
"========\n",
".. include:: examples_intro.rst\n",
]
)
)
for language, subdir in {"VHDL": "vhdl", "SystemVerilog": "verilog"}.items():
egs_fptr.write("\n".join([language, "~~~~~~~~~~~~~~~~~~~~~~~", "\n"]))
for item in listdir(str(eg_path / subdir)):
Expand Down

0 comments on commit 6cd3038

Please sign in to comment.