Skip to content

Commit

Permalink
Docs: Use sby role shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Jun 10, 2024
1 parent a3844d4 commit 0fab912
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
.. role:: sby(code)
:language: sby

Reference for .sby file format
==============================

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
is for the most part irrelevant, but by convention the usual order is
``[tasks]``, ``[options]``, ``[engines]``, ``[script]``, and ``[files]``.
section header in square brackets. The order of sections in a ``.sby`` file is
for the most part irrelevant, but by convention the usual order is
:sby:`[tasks]`, :sby:`[options]`, :sby:`[engines]`, :sby:`[script]`, and
:sby:`[files]`.

Tasks section
-------------

The optional ``[tasks]`` section can be used to configure multiple verification tasks in
a single ``.sby`` file. Each line in the ``[tasks]`` section configures one task. For example:
The optional :sby:`[tasks]` section can be used to configure multiple
verification tasks in a single ``.sby`` file. Each line in the :sby:`[tasks]`
section configures one task. For example:

.. code-block:: sby
Expand All @@ -30,9 +34,9 @@ calling ``sby`` on a ``.sby`` file:
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:

.. code-block:: sby
Expand Down Expand Up @@ -101,7 +105,7 @@ combinations of some host implementations A and B and device implementations X a
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.

The command ``sby --dumptasks <sby_file>`` prints the list of all tasks defined in
Expand All @@ -110,7 +114,7 @@ a given ``.sby`` file.
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:

========= ===========
Expand Down Expand Up @@ -374,7 +378,7 @@ other engines. This makes it easier to use the same models outside of sby.
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
design file ``mytest.sv`` with the top-module ``mytest``:

Expand Down Expand Up @@ -447,8 +451,8 @@ File sections
-------------

File sections can be used to create additional files in ``<outdir>/src/`` from
the literal content of the ``[file <filename>]`` section ("here document"). For
example:
the literal content of the :sby:`[file <filename>]` section ("here document").
For example:

.. code-block:: sby
Expand Down

0 comments on commit 0fab912

Please sign in to comment.