|
|
|
When simulating, compile the Verilog source files in any order since Verilog is compile order independent. However, VHDL components must be compiled bottom-up due to order dependency. Xilinx recommends that you specify the test fixture file before the HDL netlist of your design, as in the following examples.
Xilinx recommends giving the name test to the main module in the test fixture file. This name is consistent with the name of the test fixture module that is written later in the design flow by NGD2VER during post-NGDBuild, post-MAP, or post-route simulation. If this naming consistency is maintained, you can use the same test fixture file for simulation at all stages of the design flow with minimal modification.
The following is information regarding ModelSim Vcom.
Simulation Libraries have to be compiled to compiled_lib_dir before using VCS/VCSi. See the "Compiling HDL Libraries" section for instruction on how to compile the Xilinx Verilog libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, specify the following at the command-line
vcom -work work_macro1.vhd logiblox_macro.vhd top_level.vhd testbench.vhd testbench_cfg.vhd
For timing simulation or post-Ngd2vhdl, the Simprims-based libraries are used. Specify the following at the command-line:
vcom -work work_design.vhd testbench.vhd
The following is information regarding VSS.
Simulation Libraries have to be compiled to compiled_lib_dir before using VSS vhdlan. See the "Compiling HDL Libraries" section for instruction on how to compile the Xilinx VHDL libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated components, or CORE Generator components), for RTL simulation, specify the following at the command-line.
vhdlan -i macro1.vhd
vhdlan -i logiblox_macro.vhd
vhdlan -i top_level.vhd
vhdlan -i testbench.vhd
vhdlan -i testbench_cfg.vhd
For timing simulation or post-Ngd2vhdl, the Simprims-based libraries are used. Specify the following at the command-line.
vhdlan -i design.vhd
vhdlan -i testbench.vhd
For more information and a tutorial on running the VSS simulator, go to Synopsys tutorial at http://support.xilinx.com/support/techsup/tutorials.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, specify the following at the command-line.
verilog -y $XILINX/verilog/src/unisims -y $XILINX/verilog/src/simprims
+incdir+$XILINX/verilog/src +libext+.v $XILINX/verilog/src/glbl.vtestfixture
.v
design
.v
The -y switch points the simulator to the HDL models.
For timing simulation or post-NGD2VER, the Simprims-based libraries are used. Specify the following at the command-line:
verilog -y $XILINX/verilog/src/simprims $XILINX/verilog/src/glbl.v \
+libext+.vtestfixture
.v
design
.v
For more information on specifying Xilinx SimPrims library using the -ul switch with NGD2VER instead of using the -y switch in Verilog-XL, go to http://support.xilinx.com/techdocs/ 3167.htm.
There are two methods to run simulation with NC-Verilog.
Using library source files with compile time options (similar to Verilog-XL).
Using shared pre-compiled libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, specify the following at the command-line:
ncxlmode +libext+.v -y $XILINX/verilog/src/unisims -y $XILINX/verilog/
src/simprims +incdir+$XILINX/verilog/src $XILINX/verilog/src/glbl.vtestfixture
.v
design
.v
For timing simulation or post-NGD2VER, the Simprims-based libraries are used. Specify the following at the command-line.
ncxlmode -y $XILINX/verilog/src/simprims $XILINX/verilog/src/glbl.v
+libext+.vtestfixture
.v time_sim.v
Simulation Libraries have to be compiled to compiled_lib_dir before using NC-Verilog. See the "Compiling HDL Libraries" section for instruction on how to compile the Xilinx Verilog libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, edit the hdl.var and cds.lib files to specify the library mapping.
# cds.lib
DEFINE simprims_vercompiled_lib_dir
/simprims_ver
DEFINE xilinxcorelib_vercompiled_lib_dir
/xilinxcorelib_ver
DEFINE worklib worklib
# hdl.var
DEFINE VIEW_MAP ($VIEW_MAP, .v =v) DEFINE LIB_MAP ($LIB_MAP,
compiled_lib_dir
/unisims_ver =
unisims_ver)
DEFINE LIB_MAP ($LIB_MAP,compiled_lib_dir
/simprims_ver =
![]()
simprims_ver)
DEFINE LIB_MAP ($LIB_MAP,compiled_lib_dir
/simprims_ver =
![]()
xilinxcorelib_ver)
DEFINE LIB_MAP ($LIB_MAP, + =worklib)
// After setting up the libraries, now compile and simulate the design:
ncvlog -messages -update $XILINX/verilog/src/glbl.vtestfixture
.v
design
.v
ncelab -messages testfixture_name glbl
ncsim -messages testfixture_name
The -update option of Ncvlog enables incremental compilation.
For timing simulation or post-Ngd2ver, the Simprims-based libraries are used. Specify the following at the command-line:
ncvlog -messages -update $XILINX/verilog/src/glbl.vtestfixture
.v time_sim.v
ncelab -messages -autosdf testfixture_name glbl
ncsim -messages testfixture_name
For more information on how to back-annotate the SDF file for timing simulation, go to http://support.xilinx.com/techdocs/947.htm.
VCS and VCSi are identical except that VCS is more highly optimized, resulting in greater speed for RTL and mixed level designs. Pure gate level designs run with comparable speed. However, VCS and VCSi are guaranteed to provide the exact same simulation results. VCSi is invoked using the vcsi command rather than the vcs. command
There are two methods to run simulation with VCS/VCSi.
Using library source files with compile time options (similar to Verilog-XL).
Using shared pre-compiled libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, specify the following at the command-line.
vcs -y $XILINX/verilog/src/unisims -y $XILINX/verilog/src/simprims
incdir+$XILINX/verilog/src +libext+.v $XILINX/verilog/src/glbl.v
-Mupdate -Rtestfixture
.v
design
.v
For timing simulation or post-NGD2VER, the Simprims-based libraries are used. Specify the following at the command-line.
vcs +compsdf -y $XILINX/verilog/src/simprims $XILINX/verilog/src/glbl.v+libext+.v -Mupdate -Rtestfixture
.v time_sim.v
The -R option automatically simulates the executable after compilation .
The -Mupdate option enables incremental compilation. Modules will be recompiled because of one of the following reasons:
Target of a hierarchical reference has changed.
Some compile time constant such as a parameter has changed.
Ports of a module instantiated in the module has changed.
Module inlining. For example, merging, internally in VCS, of a group of module definitions into a larger module definition which leads to faster simulation. These affected modules are again recompiled. This is done only once.
For more information on how to back-annotate the SDF file for timing simulation, go to http://support.xilinx.com/techdocs/6349.htm.
Simulation Libraries have to be compiled to compiled_lib_dir before using VCS/VCSi. See the "Compiling HDL Libraries" section for instruction on how to compile the Xilinx Verilog libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, specify the following at the command-line
vcs -Mupdate -Mlib=compiled_dir
/unisims_ver -y $XILINX/verilog/src/
unisims -Mlib=compiled_dir
/simprims_ver -y $XILINX/verilog/src/simprims
-Mlib=compiled_dir
/xilinxcorelib_ver +incdir+$XILINX/verilog/src
+libext+.v $XILINX/verilog/src/glbl.v -Rtestfixture
.v
design
.v
For timing simulation or post-NGD2VER, the Simprims-based libraries are used. Specify the following at the command-line.
vcs +compsdf -y $XILINX/verilog/src/simprims $XILINX/verilog/src/glbl.v+libext+.v-Mupdate -Rtestfixture
.v time_sim.v
The -R option automatically simulates the executable after compilation. Finally, the -Mlib=
compiled_lib_dir
option provides VCS with a central place to look for the descriptor information before
it compiles a module and a central place to get the object files when it links together the executable.
The -Mupdate option enables incremental compilation. Modules will be recompiled because of one of the following reasons:
Target of a hierarchical reference has changed.
Some compile time constant such as a parameter has changed.
Ports of a module instantiated in the module has changed.
Module inlining. For example, merging, internally in VCS, of a group of module definitions into a larger module definition which leads to faster simulation. These affected modules are again recompiled. This is done only once.
For more information on how to back-annotate the SDF file for timing simulation, go to http://support.xilinx.com/techdocs/6349.htm.
There are two methods to run simulation with ModelSim Vlog.
Using library source files with compile time options (similar to Verilog-XL).
Using shared pre-compiled libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, specify the following at the ModelSim prompt:
set XILINX $env(XILINX)
vlog -y $XILINX/verilog/src/unisims -y $XILINX/verilog/src/simprims
+incdir+$XILINX/verilog/src +libext+.v $XILINX/verilog/src/glbl.v -incrtestfixture
.v
design
.v
vsimtestfixture
glbl
For timing simulation or post-NGD2VER, the Simprims-based libraries are used. Specify the following at the ModelSim prompt:
vlog -y $XILINX/verilog/src/simprims $XILINX/verilog/src/glbl.v
+libext+.vtestfixture
.v time_sim.v -incr
vsimtestfixture
glbl +libext+.v
testfixture
.v
The -incr option enables incremental compilation.
Simulation Libraries have to be compiled to compiled_lib_dir before usingModelSim Vlog. See the "Compiling HDL Libraries" section for instruction on how to compile the Xilinx Verilog libraries.
Depending on the makeup of the design (LogiBLOX, Xilinx instantiated primitives, or CORE Generator components), for RTL simulation, specify the following at the ModelSim prompt:
set XILINX $env(XILINX)
vlog $XILINX/verilog/src/glbl.vtestfixture
.v time_sim.v -incr
vsim -L unisims_ver -L simprims_ver -L xilinxcorelib_vertestfixture
glbl
For timing simulation or post-NGD2VER, the Simprims-based libraries are used. Specify the following at the ModelSim prompt:
vlog $XILINX/verilog/src/glbl.vtestfixture
.v time_sim.v -incr
vsim -L simprims_vertestfixture
glbl
The -incr option enables incremental compilation. The -L
compiled_lib_dir
option provides VSIM with a library to search for design units instantiated from Verilog.