3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-12 16:28:17 +00:00

Docs: Use sby role shortcut

This commit is contained in:
Krystine Sherwin 2024-06-10 18:46:31 +12:00
parent a3844d4a30
commit 0fab912005
No known key found for this signature in database

View file

@ -1,17 +1,21 @@
.. role:: sby(code)
:language: sby
Reference for .sby file format Reference for .sby file format
============================== ==============================
A ``.sby`` file consists of sections. Each section start with a single-line A ``.sby`` file consists of sections. Each section start with a single-line
section header in square brackets. The order of sections in a ``.sby`` file section header in square brackets. The order of sections in a ``.sby`` file is
is for the most part irrelevant, but by convention the usual order is for the most part irrelevant, but by convention the usual order is
``[tasks]``, ``[options]``, ``[engines]``, ``[script]``, and ``[files]``. :sby:`[tasks]`, :sby:`[options]`, :sby:`[engines]`, :sby:`[script]`, and
:sby:`[files]`.
Tasks section Tasks section
------------- -------------
The optional ``[tasks]`` section can be used to configure multiple verification tasks in The optional :sby:`[tasks]` section can be used to configure multiple
a single ``.sby`` file. Each line in the ``[tasks]`` section configures one task. For example: verification tasks in a single ``.sby`` file. Each line in the :sby:`[tasks]`
section configures one task. For example:
.. code-block:: sby .. code-block:: sby
@ -30,9 +34,9 @@ calling ``sby`` on a ``.sby`` file:
sby example.sby task2 sby example.sby task2
If no task is specified then all tasks in the ``[tasks]`` section are run. If no task is specified then all tasks in the :sby:`[tasks]` section are run.
After the ``[tasks]`` section individual lines can be specified for specific After the :sby:`[tasks]` section individual lines can be specified for specific
tasks or task groups: tasks or task groups:
.. code-block:: sby .. code-block:: sby
@ -101,7 +105,7 @@ combinations of some host implementations A and B and device implementations X a
deviceY: read -sv deviceY.v deviceY: read -sv deviceY.v
... ...
The ``[tasks]`` section must appear in the ``.sby`` file before the first The :sby:`[tasks]` section must appear in the ``.sby`` file before the first
``<taskname>:`` or ``~<taskname>:`` tag. ``<taskname>:`` or ``~<taskname>:`` tag.
The command ``sby --dumptasks <sby_file>`` prints the list of all tasks defined in The command ``sby --dumptasks <sby_file>`` prints the list of all tasks defined in
@ -110,7 +114,7 @@ a given ``.sby`` file.
Options section Options section
--------------- ---------------
The ``[options]`` section contains lines with key-value pairs. The ``mode`` The :sby:`[options]` section contains lines with key-value pairs. The ``mode``
option is mandatory. The possible values for the ``mode`` option are: option is mandatory. The possible values for the ``mode`` option are:
========= =========== ========= ===========
@ -374,7 +378,7 @@ other engines. This makes it easier to use the same models outside of sby.
Script section Script section
-------------- --------------
The ``[script]`` section contains the Yosys script that reads and elaborates The :sby:`[script]` section contains the Yosys script that reads and elaborates
the design under test. For example, for a simple project contained in a single the design under test. For example, for a simple project contained in a single
design file ``mytest.sv`` with the top-module ``mytest``: design file ``mytest.sv`` with the top-module ``mytest``:
@ -447,8 +451,8 @@ File sections
------------- -------------
File sections can be used to create additional files in ``<outdir>/src/`` from File sections can be used to create additional files in ``<outdir>/src/`` from
the literal content of the ``[file <filename>]`` section ("here document"). For the literal content of the :sby:`[file <filename>]` section ("here document").
example: For example:
.. code-block:: sby .. code-block:: sby