Skip to content

Commit

Permalink
docs: reorganise 'HDL Libraries', add section 'Guides'
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 23, 2023
1 parent 9d950d3 commit a1d4746
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Those are made available through the built-ins API, which is based on the librar

Both the core and builtins are available in the public :ref:`python_interface` of VUnit.
Details about how to execute a project are explained in :ref:`cli`.
Further info about the optional libraries is found in :ref:`vhdl_libraries`.
Further info about the optional libraries is found in :ref:`hdl_libraries`.

Experimental co-simulation through GHDL's VHPIDIRECT is supported in `VUnit/cosim <https://vunit.github.io/cosim/>`__.

Expand Down
4 changes: 2 additions & 2 deletions docs/blog/2018_02_12_vunit3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Verification Components
-----------------------

In VUnit 3.0 we have a *beta* version of a :ref:`verification
component <vc_library>` library. Using the improved ``com`` message
component <vc_user_guide>` library. Using the improved ``com`` message
passing it is very easy to create advanced verification components and
we hope to get many pull requests from users for other bus types in
the future. We've already seen some initiatives from the VUnit community
Expand All @@ -93,7 +93,7 @@ Out of the box we provide the following verification components:
- UART RX/TX
- (B)RAM master

For more information see the :ref:`verification component library user guide <vc_library>`.
For more information see the :ref:`verification component library user guide <vc_user_guide>`.

Logging
-------
Expand Down
4 changes: 2 additions & 2 deletions docs/check/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _check_library:

Check Library
=============
Check Library User Guide
========================

Introduction
------------
Expand Down
6 changes: 3 additions & 3 deletions docs/com/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _com_user_guide:

#####################
Communication Library
#####################
################################
Communication Library User Guide
################################

************
Introduction
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
intersphinx_mapping = {
"python": ("https://docs.python.org/3.8/", None),
"pytest": ("https://docs.pytest.org/en/latest/", None),
"osvb": ("https://umarcor.github.io/osvb", None),
}

# -- ExtLinks -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/data_types/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _data_types_library:

Data Types
##########
Data Types User Guide
#####################

VUnit comes with a number of convenient data types included:

Expand Down
1 change: 1 addition & 0 deletions docs/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def _get_eg_doc(location: Path, ref):
title = eg_doc.split("---", 1)[0][0:-1]
return "\n".join(
[
f".. _examples:{location.parent.name}:{location.name}:\n",
title,
"-" * len(title),
f":vunit_example:`➚ examples/{ref} <{ref!s}>`\n",
Expand Down
97 changes: 86 additions & 11 deletions docs/hdl_libraries.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,90 @@
.. _vhdl_libraries:
.. _hdl_libraries:

VHDL Libraries
HDL Libraries
#############

VHDL
====

Builtins
--------

By default, VUnit provides bare minimal functionality for running testbenches.
In practice, most users want to use HDL utilities to reduce verbosity and improve reporting when writting tests.
VUnit includes several optional libraries in a group named *VHDL builtins* (see :meth:`add_vhdl_builtins() <vunit.ui.VUnit.add_vhdl_builtins>`):

* :vunit_file:`core <vunit/vhdl/core>`
* :vunit_file:`logging <vunit/vhdl/logging>` (see :ref:`logging_library`)
* :vunit_file:`string_ops <vunit/vhdl/string_ops>`
* :vunit_file:`check <vunit/vhdl/check>` (see :ref:`check_library`)
* :vunit_file:`dictionary <vunit/vhdl/dictionary>`
* :vunit_file:`run <vunit/vhdl/run>` (see :ref:`run_library`)
* :vunit_file:`path <vunit/vhdl/path>`

Most of the utilities are based on some internal data types providing dynamic arrays and queues (FIFOs).
See :ref:`data_types_library`.

Communication
-------------

The VUnit communication library (``com``) provides a high-level communication mechanism based on the
`actor model <http://en.wikipedia.org/wiki/Actor_model>`__.

See :meth:`add_com() <vunit.ui.VUnit.add_com>` and :ref:`com_user_guide`.

.. NOTE::
The Communication Library depends on the builtins, which are added implicitly.

Verification Components
-----------------------

.. note:: This library is released as a *BETA* version. This means non-backwards compatible changes are still likely
based on feedback from our users.

The VUnit Verification Component Library (VCL) contains a number of useful
:ref:`Verification Components <verification_components>` (VC) as well as a set of utilities for writing your own
verification component.
Verification components allow a better overview in the test bench by raising the abstraction level of bus transactions.
Even if you do not need the advanced features that VCs offer you may still benefit from using peer-verified models of an
AXI-bus instead of re-implementing it yourself.

See :meth:`add_verification_components() <vunit.ui.VUnit.add_verification_components>` and :ref:`vc_user_guide`.

.. NOTE::
The VCL depends on both the Communication Library and OSVVM, which are added implicitly.

Random
------

VUnit provides random integer vector and pointer generation, based on built-in :ref:`Data Types <data_types_library>`
and OSVVM.

See :meth:`add_random() <vunit.ui.VUnit.add_random>`.

OSVVM
-----

VUnit includes the core of `OSVVM <https://github.com/osvvm/>`__ as a submodule and internal dependency of optional
libraries such as Random or Verification Components.
However, it can be added explicitly through :meth:`add_osvvm() <vunit.ui.VUnit.add_osvvm>`.

Moreover, multiple approaches are supported for using `OSVVMLibraries <https://github.com/OSVVM/OsvvmLibraries>`__ in
VUnit.
See :ref:`OSVB: Examples » SISO AXI4 Stream <osvb:Examples:AXI4Stream>`.

JSON-for-VHDL
-------------

VUnit includes `JSON-for-VHDL <https://github.com/Paebbels/JSON-for-VHDL>`__ as a submodule.
JSON-for-VHDL is an alternative to composite top-level generics, which supports any depth in the content structure.

See :meth:`add_json4vhdl() <vunit.ui.VUnit.add_json4vhdl>`, :vunit_file:`json4vhdl.py <vunit/json4vhdl.py>` and example
:ref:`JSON-for-VHDL <examples:vhdl:json4vhdl>`.

System Verilog
==============

.. toctree::
:maxdepth: 1
Builtins
--------

id/user_guide
logging/user_guide
check/user_guide
run/user_guide
com/user_guide
data_types/user_guide
verification_components/user_guide
See :meth:`add_verilog_builtins() <vunit.ui.VUnit.add_verilog_builtins>` and :vunit_file:`vunit_pkg.sv <vunit/verilog/vunit_pkg.sv>`.
14 changes: 13 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,22 @@ often"* approach through automation. :ref:`Read more <about>`
testimonials/testimonials

.. toctree::
:caption: Documentation
:caption: Guides
:hidden:

user_guide
id/user_guide
logging/user_guide
check/user_guide
run/user_guide
com/user_guide
verification_components/user_guide
data_types/user_guide

.. toctree::
:caption: Reference
:hidden:

cli
py/ui
hdl_libraries
Expand Down
4 changes: 2 additions & 2 deletions docs/logging/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _logging_library:

Logging Library
===============
Logging Library User Guide
==========================

Introduction
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/release_notes/3.0.0.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- *beta* version of a :ref:`verification component <vc_library>` library.
- *beta* version of a :ref:`verification component <vc_user_guide>` library.

- AXI read/write slaves
- Memory model
Expand Down
4 changes: 2 additions & 2 deletions docs/run/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _run_library:

Run Library
===========
Run Library User Guide
======================

Introduction
------------
Expand Down
12 changes: 3 additions & 9 deletions docs/verification_components/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
.. _vc_library:
.. _vc_user_guide:

Verification Component Library
===============================
Verification Components User Guide
==================================

.. NOTE::
This library is released as a *BETA* version.
This means non-backwards compatible changes are still likely based on feedback from our users.

The VUnit Verification Component Library (VCL) contains a number of useful :ref:`Verification Components <verification_components>`
(VC) as well as a set of utilities for writing your own verification component.
Verification components allow a better overview in the test bench by raising the abstraction level of bus transactions.
Even if you do not need the advanced features that VCs offer you may still benefit from using pre-verified models of an
AXI-bus instead of re-implementing it yourself.

Included verification components (VCs):

- Avalon Memory-Mapped master
Expand Down
2 changes: 1 addition & 1 deletion examples/vhdl/array_axis_vcs/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Shows how to use ``integer_array_t``, ``axi_stream_master_t`` and ``axi_stream_slave_t``.
A CSV file is read, the content is sent in a row-major order to an AXI Stream buffer
(FIFO) and it is received back to be saved in a different file. Further information can
be found in the :ref:`verification component library user guide <vc_library>`,
be found in the :ref:`verification component library user guide <vc_user_guide>`,
in subsection :ref:`Stream <stream_vci>` and in
:vunit_file:`vhdl/verification_components/test/tb_axi_stream.vhd <vunit/vhdl/verification_components/test/tb_axi_stream.vhd>`.
"""
Expand Down

0 comments on commit a1d4746

Please sign in to comment.