Return to Support Page
 homesearchagentssupportask xilinxmap

Answers Database


VERILOG-XL: Specifying multiple libraries in a Verilog simulation


Record #1089

Product Family:  Software

Product Line:  Cadence

Problem Title:
VERILOG-XL: Specifying multiple libraries in a Verilog simulation


Problem Description:
Keywords: multiple verilog libraries simulation

Urgency: standard

General Description:
Multiple libraries can be specified for a Verilog simulation using
the `uselib directive, but the procedure in the Cadence Openbook
online documentation needs some clarification.


Solution 1:

Say you want to declare two libraries that are to be searched--
a "patch" library, and the standard verilog4000 library, in
that order.  A single `uselib directive specifying both
libraries will allow you to do this.

For readability, each macro may be defined in terms of a
`define macro:

  `timescale 1 ns/100 ps

  `define TTL_LIB dir=/tools/xact/esv521.sun/verilog4000
    libext=.v
  `define PATCH_LIB dir=/user/verilog/propxfd/patch libext=.v

  `uselib dir `PATCH_LIB `TTL_LIB


Verilog scans the specified libraries from left to right, and
should report that the specified libraries have been read in
the order specified:

    Scanning library directory
      "dir=/user/verilog/propxfd/patch"
    Scanning library directory
      "/tools/xact/esv521.sun/verilog4000"


Alternatively, the path to each of the libraries can be specified explicitly as
follows:

   `uselib dir=/user/verilog/propxfd/patch libext=.v \

	dir=/tools/xact/esv521.sun/verilog4000 libext=.v


All libraries you wish to specify must be on the same line.
Note the use of the "\" line continuation character at the end
of the first line, which tells the interpreter to concatenate
the next line with the previous one.



Solution 2:


You can also do this in command line mode using the -y
option as follows:

Say you have libraries in directories lib1 and lib2, and the
extensions in these libraries are ".v" and ".vpd" respectively.
To specify the two libraries on the Verilog command line, you
would invoke Verilog-XL in the following manner:

   verilog -y lib1 -y lib2 +libext+.v+.vpd  <other verilog options>




End of Record #1089

For the latest news, design tips, and patch information on the Xilinx design environment, check out the Xilinx Expert Journals!

© 1998 Xilinx, Inc. All rights reserved
Trademarks and Patents