UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 19446

NC-VHDL - How do I run a simulation with NC-VHDL?

Description

How do I run simulation with NC-VHDL?

For information on compiling the simulation libraries for NC-VHDL, see (Xilinx Answer 9420).

Solution

Simulation libraries must be compiled to <compiled_lib_dir> before NC-VHDL is used. For instructions on compiling the Xilinx VHDL libraries, see (Xilinx Answer 9420).

Depending on the composition of the design (Xilinx instantiated primitives, COREGen, etc.) for RTL simulation, edit the hdl.var and cds.lib files to specify the library mapping as follows:

# cds.lib

DEFINE unisimr <compiled_lib_dir>/unisim

DEFINE simprim <compiled_lib_dir>/simprim

DEFINE xilinxcorelib <compiled_lib_dir>/xilinxcorelib

DEFINE worklib worklib

# hdl.var

DEFINE VIEW_MAP ($VIEW_MAP, .v => v)

DEFINE LIB_MAP ($LIB_MAP, <compiled_lib_dir>/unisimr => unisim)

DEFINE LIB_MAP ($LIB_MAP, <compiled_lib_dir>/simprim => simprim)

DEFINE LIB_MAP ($LIB_MAP, <compiled_lib_dir>/xilinxcorelib => xilinxcorelib)

DEFINE LIB_MAP ($LIB_MAP, + => worklib)

After setting up the libraries, compile and simulate the design as follows:

ncvhdl test_dv.vhd dcmt.vhd

ncelab -vhdl_time_precision 1ps -work worklib -cdslib cds.lib -access +wc worklib.testbench:behavior

Note: If using IUS5.5 and higher, this command will change to:

ncelab -lib_binding -vhdl_time_precision 1ps -work worklib -cdslib cds.lib -access +wc worklib.testbench:behavior

ncsim -extassertmsg -gui -cdslib cds.lib worklib.testbench:behavior

See (Xilinx Answer 19447) for information on back-annotating the SDF file for timing simulation.

Once the SDF is annotated correctly, change NC-Elab to the following:

ncelab -vhdl_time_precision 1ps -work worklib -cdslib cds.lib -SDF_CMD_FILE <file_name> -access +wc worklib.testbench:behavior.

Note: If using IUS5.5 and higher, this command will change to:

ncelab -lib_binding -vhdl_time_precision 1ps -work worklib -cdslib cds.lib -SDF_CMD_FILE <file_name> -access +wc worklib.testbench:behavior.

AR# 19446
Date Created 09/03/2007
Last Updated 12/15/2012
Status Active
Type General Article