User Guide: DSim Managing Libraries

Modified on Thu, 11 Jul at 11:43 AM

User Guide: DSim Managing Libraries

The dlib utility is used to perform various maintenance tasks on libraries created with dvlcom or dvhcom.



Library Repository Versioning

Each numbered release of the Metrics simulation tool set maintains a separate repository of items in your work area. More than one version may exist at any given time. This is useful if you need to switch between tool versions, e.g. to troubleshoot a problem.


However, this may be confusing, as the contents of the same library work area may appear different to different versions of the tools. To minimize this problem, the working revision is displayed in reports and messages generated by dlib.


It is not possible to examine a work area from version A of the toolset with version B of dlib, if A and B are different. Rather, you must use version A of dlib.



Multiple Analysis Jobs

dvlcom/dvhcom jobs may be run in sequence or in parallel. If you run dvlcom/dvhcom jobs in sequence, the first one will initialize a work area to hold intermediate compiled forms. If you run dvlcom/dvhcom jobs in parallel, each job will attempt to initialize the work area, but only one will succeed causing the others to fail. To avoid such a failure, it is suggested to initialize the work area beforehand by using a single invocation of the dlib prep command.


Note: This problem can only be mitigated when each invocation of dvlcom/dvhcom is preparing a different library. When more than one command is focused on the same library, by name, the only solution is to run sequentially.



Mapping to Remote Work Areas

DSim Cloud CLI


Name Description
mdc dlib -a 'map -lib name path' Creates new mapping.
mdc dlib -a 'map -all-libs path' Creates new mapping for all libraries known in path.

DSim


Name Description
dlib map -lib name path Creates new mapping.
dlib map -all-libs path Creates new mapping for all libraries known in path.

It is possible to have a library of read-only components located in a common work area. dlib -map creates the mapping. The path argument must refer to a dsim_work directory, other than the local work area, and which must already exist.



Using a Search Path

It is possible to have a one or more libraries of read-only components located accross multiple work areas. To incorporate these additional libraries into the Metrics simulation flow simply add the other work area directories to the environment variable DSIM_FE_PATH in the order they should be searched.


The first library in the search path of a given name will be used, while others of the same name will be ignored. dlib will annotate these other libraries as Blocked.



Listing Contents of Libraries and Work Area

DSim Cloud CLI


Name Description
mdc dlib -a 'ls' Lists all libraries in work area.
mdc dlib -a 'ls -lib name' Lists contents of a library.
mdc dlib -a 'ls -all-libs' Lists contents of all libraries in the work directory.

DSim


Name Description
dlib ls Lists all libraries in work area.
dlib ls -lib name Lists contents of a library.
dlib ls -all-libs Lists contents of all libraries in the work directory.

This command is used to display the contents of a work area, or a library in the work area. The work area can be expanded to include more than one using the search path.


Without -lib or -all-libs, the names of all libraries are displayed. For each library the type and remote path are also included. The type may be one of the following:


  • Local: A library located in the local work directory. Remote path is not applicable.
  • Mapped: A library mapped/linked in the local work directory. Remote path is the linked library location.
  • Search Path: A library found outside of the local work directory in one of the search path locations. Remote path is the library location found using the search path.
  • Blocked: A library found using the search path but will not be used because a library of the same name was found earlier. Remote path is the library location found using the search path.

With -lib or -all-libs, the contents of a library are displayed. The following items are displayed for each object in the library:


  • Name of the item
  • Type of the item (entity, module, etc.)
  • Time of last modification

Details about encrypted design elements are not listed. However, the report will indicate whether encrypted design elements are present.



Output Format

By default the output from the ls command is formatted into text-based tables.


The option of -json is provided to output information as JSON objects that can be easily parsed by enternal programs.



Removing a Library or Mapping

DSim Cloud CLI


Name Description
mdc dlib -a 'rm -lib name ' Remove library or mapping.
mdc dlib -a 'rm -lib libname item' Remove item from library.
mdc dlib -a 'rm -all-libs' Remove all libraries or mappings from work directory.

DSim


Name Description
dlib rm -lib name Remove library or mapping.
dlib rm -lib libname item Remove item from library.
dlib rm -all-libs Remove all libraries or mappings from work directory.

The first form of the dlib rm command removes an entire library or mapping. If the library is mapped to a remote work area, only the mapping is removed, leaving the contents of the remote work area unaffected.


If the library is local, then the entire library is removed.


The second form of the command removes an item from a library. If the item is a SystemVerilog package/configuration that has the same name as another design element, then the -config or -package options can be used to disambiguate.


Secondary elements are also removed.


The third form of the dblib rm command removes all the libraries or mappings in the work directory.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article