Skip to content

Commit 8022c44

Browse files
committed
doc: Added QuickStart sections.
1 parent d2da94f commit 8022c44

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

doc/QuickStartGuide.rst

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,83 @@ Do the actions appropriate for your simulator.
5252

5353
tbd
5454

55+
56+
57+
Run the Demos
58+
*************
59+
60+
Run the following commands in your simulator's command line:
61+
62+
.. code-block::
63+
64+
# analyze OSVVM's packages and verification components
65+
build ../OsvvmLibraries
66+
# analyze and run demo tests
67+
build ../OsvvmLibraries/RunDemoTests.pro
68+
69+
These will produce some reports, such as :file:`OsvvmLibraries_RunDemoTests.html`.
70+
71+
.. todo:: We will discuss these in the next section, OSVVM Reports.
72+
73+
74+
Writing Scripts by Example
75+
**************************
76+
77+
OSVVM Scripts are an API layer that is build on top of :term:`Tcl`. The API layer simplifies the
78+
steps of analyzing and running simulations. For most applications you will not need any Tcl, however, it is there if you
79+
need more capabilities.
80+
81+
Scripts are named in the form :file:`\<script-name\>.pro`. The scripts are Tcl code that is augmented with the OSVVM script
82+
API. The script API is created using Tcl procedures.
83+
84+
.. rubric:: Basic Script Commands
85+
86+
:tclcode:`library <library-name>`
87+
Make this library the active library. Create it if it does not exist.
88+
:tclcode:`analyze <VHDL-file>`
89+
Compile (aka analyze) the design into the active library.
90+
:tclcode:`simulate <test-name>`
91+
Simulate (aka elaborate + run) the design using the active library.
92+
:tclcode:`include <script-name>.pro`
93+
Include another project script.
94+
:tclcode:`build <script-name>.pro`
95+
Start a script from the simulator. It is ``include`` + start a new log file and report for this script.
96+
97+
.. todo:: For more details, see Command Summary later in this document.
98+
99+
.. topic:: First Script
100+
101+
At the heart of running a simulation is setting the library, compiling files, and starting the simulation.
102+
To do this, we use ``library``, ``analyze``, and vsimulate``.
103+
104+
The following is an excerpt from the scripts used to run OSVVM verification component library regressions.
105+
106+
.. admonition:: ``testbench_MultipleMemory.pro``
107+
108+
.. code-block:: tcl
109+
110+
library osvvm_TbAxi4_MultipleMemory
111+
analyze TestCtrl_e.vhd
112+
analyze TbAxi4_MultipleMemory.vhd
113+
analyze TbAxi4_Shared1.vhd
114+
TestName TbAxi4_Shared1
115+
simulate TbAxi4_Shared1
116+
117+
In OSVVM scripting, calling ``library`` activates the library. An ``analyze`` or ``simulate`` that follows
118+
``library`` uses the specified library. This is consistent with VHDL’s sense of the *working library*.
119+
120+
.. note::
121+
122+
Note that there are no directories to the files. For OSVVM commands that use paths, the path is always relative to
123+
the directory the script is located in unless an absolute path is specified.
124+
125+
The above script is in :file:`testbench_MultipleMemory.pro`. It can be run by specifying:
126+
127+
.. code-block:: tcl
128+
129+
build ../OsvvmLibraries/AXI4/Axi4/testbench_MultipleMemory/testbench_MultipleMemory.pro
130+
131+
.. hint::
132+
133+
If you were to open :file:`testbench_MultipleMemory.pro`, you would find that ``RunTest`` is used instead as it is
134+
an abbreviation for the ``analyze``, ``TestName`` and ``simulate`` when the names are the same.

0 commit comments

Comments
 (0)