VHDL Libraries
Library Directory
OSVVMOpen Source VHDL Verification Methodology creates libraries in a library directory:
<LibraryDirectory>/VHDL_LIBS/<ToolName>-<Version>/. The tool and version part keeps the libraries of
different simulators and versions apart.
By default, <LibraryDirectory> is the simulation directory. SetLibraryDirectory
selects another one; a relative path is resolved against the simulation directory.
GetLibraryDirectory returns it.
SetLibraryDirectory ../libs
puts [GetLibraryDirectory]
Active Library
library makes a library the active library, the one analyze and simulate use. If it doesn’t exist, it’s created in the library directory. An optional second argument names another directory for it.
Library names are case insensitive, as in VHDLVHSIC Hardware Description Language. ListLibraries prints the libraries OSVVM knows.
library osvvm_TbAxi4
analyze TbAxi4.vhd
ListLibraries
Using Existing Libraries
Libraries analyzed before, by another build or in another directory, can be used without analyzing them again:
LinkLibrary maps one library.
LinkLibraryDirectory maps every library of a library directory. The path may name the directory containing
VHDL_LIBS, or the library directory itself.LinkCurrentLibraries maps all libraries OSVVM knows again, after the simulation directory changed (Don’t use Tcl’s cd).
Without a path, they use the library directory of SetLibraryDirectory.
# Use the OSVVM libraries built in another simulation directory
LinkLibraryDirectory ../sim_shared
library ExampleLib
RunTest TbExample.vhd
Removing Libraries
RemoveLibrary removes one library. The path is only needed for a library OSVVM hasn’t mapped.
RemoveLibraryDirectory removes a library directory and its libraries; without a path, the one of SetLibraryDirectory.
RemoveAllLibraries removes every library directory OSVVM knows.
RemoveLibrary osvvm_TbAxi4
RemoveLibraryDirectory
RemoveAllLibraries