Overview String Manipulation Config Files Usage Examples Class Reference

svlib Users Guide and Programmer Reference

A few notes about general principles of use

svlib has been designed to be as un-selfish and un-intrusive as possible for use in any SystemVerilog environment. To achieve these goals it was necessary to introduce some underlying behaviours that are common to the whole library. It is important for users to be aware of these behaviours to avoid unpleasant surprises. Overall structure of the library

The package

svlib is organized as a single SystemVerilog package named svlib_pkg. Having compiled this package using their simulator of choice, users should then import this package into their own code so that the facilities of svlib are readily available.

The package should always be imported at the start of any module or package that needs it, just after the module or package header. Do not be tempted to put your import statement at the outermost scope, outside any module or package - this is very bad practice and should always be avoided.

Macros

In addition to the package, svlib has a few macros that are useful or necessary when using the package features. To make these macro definitions available, users should do `include "svlib_macros.svh" at the outermost ($unit) scope of their code, outside any module or package. It is safe to include this file as often as you wish, because it is protected by sentinels so that it cannot be compiled twice. Consequently it is a good idea to provide this include at the top of any file that makes use of svlib facilities.

More Navigation