TestBencher Pro and Reactive Test Bench Help

8.5 Parsing Package Files into Libraries

8.5 Parsing Package Files into Libraries

Previous topic Next topic  

8.5 Parsing Package Files into Libraries

Previous topic Next topic  

The interface to your model under test may require definitions for a package defined in a different library. For example, your device may have a PCI port and require constants defined in a library that defines the bus sizes for the PCI signals. TestBencher needs to parse the files containing these packages in order to know the values of these constants when it parses your model under test, so these package files must also be included in the list of user source files. In addition, you need to to tell TestBencher the destination library for these packages:

Parsing Package files into Libraries

By default, the source files under the User Source File folder (in the Project Window) are compiled to the standard 'work' library in VHDL. Sometimes, however, these source files may need to be compiled to a different library. You can override the default work library destination for a source file by specifying the new library using a right click context menu.

In the User Source Files folder, right click on the source file and choose Set Destination Library for Compiled File from the context menu. This opens a dialog where you can set the name of the logical library that this file will be compiled to when Builds are performed.

Library_setting_menu

 

Compiling Files to Libraries in 3rd party Simulators

The above steps are sufficient to allow TestBencher to parse a model under test that uses packages from other libraries, but additional steps may be required to tell a 3rd party simulator where to look for the libraries on disk. These steps vary, depending on the simulator used.

For Cadence Incisive (ncsim):

Open the cds_project.lib file located in the project directory and add the logical-library-to-physical-directory mapping.

       DEFINE lib1 ./lib1_ncsim

For example, the above would map a logical library named lib1 to a directory called lib1_ncsim. Note: If a directory called lib1_ncsim doesn't already exist, you will also need to create this directory from the shell.

For ModelSim and Aldec:

No further steps required as TestBencher automatically runs the required vlib commands.