Skip to content

Commit 6a71cc1

Browse files
committed
doc: Documented first library related functions.
1 parent 2f85ec0 commit 6a71cc1

File tree

9 files changed

+151
-13
lines changed

9 files changed

+151
-13
lines changed

OsvvmScriptsCore.tcl

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,25 @@ proc ListLibraries {} {
960960
# Library
961961
#
962962
proc library {LibraryName {PathToLib ""}} {
963+
# Set the active VHDL library to *LibraryName* (working library).
964+
#
965+
# LibraryName - Name of the active VHDL library.
966+
# PathToLib - If not specified, use the library directory specified by :ref:`RUFF/osvvm/SetLibraryDirectory`. |br|
967+
#
968+
# If a VHDL library named *LibraryName* doesn't exist, create a new VHDL library *LibraryName* in the specified
969+
# library directory.
970+
#
971+
# This command influences how :ref:`RUFF/osvvm/analyze` behaves.
972+
#
973+
# .. todo::
974+
#
975+
# * Make *LibraryName* found in library directory specified by path the active library.
976+
#
977+
# .. seealso::
978+
#
979+
# * :ref:`RUFF/osvvm/SetLibraryDirectory`
980+
# * :ref:`RUFF/osvvm/GetLibraryDirectory`
981+
#
963982
variable VhdlWorkingLibrary
964983
variable LibraryList
965984
variable VhdlLibraryFullPath
@@ -1110,8 +1129,7 @@ proc analyze {FileName args} {
11101129
# * Verilog `*.v`
11111130
# * SystemVerilog `*.sv`
11121131
#
1113-
# :ref:`ghdl::analyze <RUFF/osvvm/ghdl/analyze>`
1114-
variable AnalyzeErrorCount
1132+
variable AnalyzeErrorCount
11151133
variable AnalyzeErrorStopCount
11161134
variable ConsecutiveAnalyzeErrors
11171135

@@ -1810,13 +1828,35 @@ proc GetSimulatorResolution {} {
18101828
# SetLibraryDirectory
18111829
#
18121830
proc SetLibraryDirectory {{LibraryDirectory "."}} {
1831+
# Set the directory into which VHDL libraries will be created.
1832+
#
1833+
# LibraryDirectory - Directory to use. |br| If not set, use :ref:`UG/Concepts/CurrentSimulationDirectory`. |br|
1834+
#
1835+
# By default, VHDL libraries are created in :file:`<LibraryDirectory>/VHDL_LIBS/<tool version>/`.
1836+
#
1837+
# This command influences how :ref:`RUFF/osvvm/library` behaves.
1838+
#
1839+
# .. seealso::
1840+
#
1841+
# * :ref:`RUFF/osvvm/library`
1842+
# * :ref:`RUFF/osvvm/GetLibraryDirectory`
1843+
#
18131844
variable VhdlLibraryParentDirectory
18141845

18151846
set VhdlLibraryParentDirectory [file normalize $LibraryDirectory]
1816-
18171847
}
18181848

18191849
proc GetLibraryDirectory {} {
1850+
# Get the Library directory.
1851+
#
1852+
# Returns the directory into which VHDL libraries will be created. |br|
1853+
# If not modified by :ref:`RUFF/osvvm/SetLibraryDirectory` it defaults to :file:`<LibraryDirectory>/VHDL_LIBS/<tool version>/`.
1854+
#
1855+
# .. seealso::
1856+
#
1857+
# * :ref:`RUFF/osvvm/library`
1858+
# * :ref:`RUFF/osvvm/SetLibraryDirectory`
1859+
#
18201860
variable VhdlLibraryParentDirectory
18211861

18221862
if {[info exists VhdlLibraryParentDirectory]} {

doc/AXI4/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _AXI4:
2+
3+
AXI4
4+
####

doc/AlertLog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. _ALERT:
2+
3+
AlertLog
4+
########
5+

doc/Glossary.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ Glossary
1111
* GitHub: https://github.com/gtkwave/gtkwave
1212
* Website: https://gtkwave.github.io/gtkwave/ |br| https://gtkwave.sourceforge.net/
1313

14+
MIT
15+
**M**\ odel **I**\ ndependent **T**\ ransactions
16+
17+
* :ref:`MIT`
18+
1419
OSVVM
15-
**O**pen-**S**ource **V**HDL **V**erification **M**ethodology
20+
**O**\ pen-**S**\ ource **V**\ HDL **V**\ erification **M**\ ethodology
1621

1722
.. rubric:: Further reading
1823

@@ -27,15 +32,21 @@ Glossary
2732
* Website: https://surfer-project.org/
2833

2934
Tcl
30-
**T**ool **C**ommand **L**anguage
35+
**T**\ ool **C**\ ommand **L**\ anguage
3136

3237
.. rubric:: Further reading
3338

3439
* Wikipedia: https://en.wikipedia.org/wiki/Tcl
3540
* Website: https://www.tcl-lang.org/
3641

42+
VC
43+
**V**\ erification **C**\ omponent
44+
45+
VTI
46+
**V**\ irtual **T**\ ransaction **I**\ nterface
47+
3748
YAML
38-
**Y**AML **A**in't **M**arkup **L**anguage
49+
**Y**\ AML **A**\ in't **M**\ arkup **L**\ anguage
3950

4051
.. rubric:: Further reading
4152

doc/Installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Installation/Updates
1313

1414
OSVVM is hosted and developed at https://github.com/OSVVM. It's components are split into multiple Git repositories,
1515
which can be used individually or as a group. The all-in-one repository is called
16-
`OsvvmLibraries <https://github.com/OSVVM/OsvvmLibraries>`__.
16+
`OsvvmLibraries <https://github.com/OSVVM/OsvvmLibraries>`__. **OSVVM-Scripts** is part of **OsvvmLibraries**.
1717

1818
See :ref:`INSTALL/Download` for downloadable archives.
1919

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _MIT:
2+
3+
Model Independent Transactions
4+
##############################

doc/UserGuide.rst

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _UG:
22

3-
Scripting Guide
4-
###############
3+
User Guide
4+
##########
55

66
Overview
77
********
@@ -17,6 +17,23 @@ Overview
1717

1818
context
1919

20+
Concepts
21+
========
22+
23+
.. _UG/Concepts/CurrentSimulationDirectory:
24+
25+
CurrentSimulationDirectory
26+
--------------------------
27+
28+
.. todo:: explain :file:`CurrentSimulationDirectory`
29+
30+
31+
.. admonition:: Naming Style
32+
33+
Commands are case sensitive. |br|
34+
Single word names are all lower case. |br|
35+
Multiple word names are CamelCase.
36+
2037

2138
Basic Commands
2239
**************
@@ -47,6 +64,40 @@ To compile all of the OSVVM libraries, use build as shown below.
4764
4865
Build sets the tcl variables $::ARGC and $::ARGV (an array).
4966
67+
VHDL Library Handling
68+
*********************
69+
70+
:ref:`RUFF/osvvm/SetLibraryDirectory`
71+
:ref:`RUFF/osvvm/SetLibraryDirectory`
72+
sdbsbfs dfvdfvggdy
73+
:tclcode:`SetLibraryDirectory [LibraryDirectory]`
74+
- Set the directory in which the libraries will be created to ``LibraryDirectory``.
75+
- If ``LibraryDirectory`` is not specified, use the ``CurrentSimulationDirectory``.
76+
- By default, libraries are created in :file:`<LibraryDirectory>/VHDL_LIBS/<tool version>/`.
77+
:tclcode:`GetLibraryDirectory`
78+
- Get the Library Directory.
79+
:tclcode:`library <LibraryName> [<path>]`
80+
- Make LibraryName found in library directory specified by path the active library.
81+
- Create the LibraryName if it does not exist.
82+
- If path is not specified, use the library directory specified by SetLibraryDirectory.
83+
:tclcode:`LinkLibrary <library> [<path>]`
84+
- Create a mapping to a library that is in the library directory specified by path.
85+
- If path is not specified, use the library directory specified by SetLibraryDirectory.
86+
:tclcode:`LinkLibraryDirectory [LibraryDirectory]`
87+
- Map all of the libraries in the specified ``LibraryDirectory``.
88+
If ``LibraryDirectory`` is not specified, use the library directory specified by SetLibraryDirectory.
89+
:tclcode:`LinkCurrentLibraries`
90+
- If you use ``cd``, then use LinkCurrentLibraries immediately after
91+
to map all current visible libraries to the new CurrentSimulationDirectory.
92+
:tclcode:`RemoveLibrary LibraryName [<path>]`
93+
- Remove the named library.
94+
Path is only used to find and delete libraries that have not been mapped in OSVVM.
95+
:tclcode:`RemoveLibraryDirectory [<path>]`
96+
- Remove the Library specified in path.
97+
- If path is not specified, the library directory specified by SetLibraryDirectory is used.
98+
:tclcode:`RemoveAllLibraries`
99+
- Call RemoveLibraryDirectory on all library directories known to OSVVM.
100+
50101
Discouraged Tcl Commands
51102
************************
52103

doc/build.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,21 @@ EOF
241241
sed -i -E "s|^\.\. _r-3a3a(\w+)3a3a(\w+):|&\n.. _${RUFF_SPHINX_PREFIX}/\1/\2:| " "${rstFile}"
242242

243243
test $VERBOSE -eq 1 && printf -- " ${ANSI_LIGHT_CYAN}Remove backticks from heading${ANSI_NOCOLOR}\n"
244-
sed -i -E 's/^``(\w+)``$/\1/g' "${rstFile}"
245-
sed -i -E 's/----$//g' "${rstFile}"
244+
sed -i -E 's|^``(\w+)``$|\1|g' "${rstFile}"
245+
sed -i -E 's|----$||g' "${rstFile}"
246246

247247
test $VERBOSE -eq 1 && printf -- " ${ANSI_LIGHT_CYAN}Remove inline code markers from parameter names${ANSI_NOCOLOR}\n"
248-
sed -i -E 's/^:``(\w+)``:/:\1:/g' "${rstFile}"
248+
sed -i -E 's|^:``(\w+)``:|:\1:|g' "${rstFile}"
249+
250+
test $VERBOSE -eq 1 && printf -- " ${ANSI_LIGHT_CYAN}Cleanup ReST roles${ANSI_NOCOLOR}\n"
251+
sed -i -E 's|:ref:``([^`]*)``|:ref:`\1`|g' "${rstFile}"
252+
sed -i -E 's|:file:``([^`]*)``|:file:`\1`|g' "${rstFile}"
253+
254+
test $VERBOSE -eq 1 && printf -- " ${ANSI_LIGHT_CYAN}Fix todo directive${ANSI_NOCOLOR}\n"
255+
sed -i '/^\.\. todo::/,/^\.\. seealso::/ s/^- / - /' "${rstFile}"
256+
257+
test $VERBOSE -eq 1 && printf -- " ${ANSI_LIGHT_CYAN}Fix seealso directive${ANSI_NOCOLOR}\n"
258+
sed -i '/^\.\. seealso::/,/^\.\. index::/ s/^- / - /' "${rstFile}"
249259
done
250260
else
251261
printf -- "${ANSI_MAGENTA}[BUILD] Patch ReST files ... ${ANSI_YELLOW}[SKIPPED]\n${ANSI_NOCOLOR}"

doc/index.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,19 @@ License
100100
\part{Main Documentation}
101101

102102
.. toctree::
103-
:caption: User Guide
103+
:caption: OSVVM Utility Library
104+
:hidden:
105+
106+
AlertLog
107+
108+
.. toctree::
109+
:caption: Verification Components
110+
:hidden:
111+
112+
AXI4/index
113+
114+
.. toctree::
115+
:caption: Scripting Guide
104116
:hidden:
105117

106118
UserGuide
@@ -115,6 +127,7 @@ License
115127
:caption: References and Reports
116128
:hidden:
117129

130+
ModelIndependentTransactions
118131
Tcl Command Reference <osvvm-scripts/osvvm>
119132
YAML/index
120133

0 commit comments

Comments
 (0)