Visible to Intel only — GUID: alp1671230502039
Ixiasoft
Visible to Intel only — GUID: alp1671230502039
Ixiasoft
3.3.1.1. Compilation Example 1: Compile File foo.sv into a Logical Library
- Create the library directory by running the vlib Tcl command:
vlib /tools/libraries/my_lib
The command creates the directory /tools/libraries/my_lib and adds a Questa* Intel® FPGA Edition proprietary file to the directory indicating that it is a library directory.
- Map logical library my_lib to the library directory /tools/libraries/my_lib by running the vmap Tcl command:
vmap my_lib /tools/libraries/my_lib
This command copies the modelsim.ini file from the Questa* Intel® FPGA Edition installation to a local directory (if a local modelsim.ini does not already exist), and adds the library mapping to modelsim.ini. View the library mapping by opening the modelsim.ini file and searching for my_lib. The mapping is a single line, such as the following:
my_lib = /tools/libraries/my_lib
- Compile foo.sv to logical library my_lib by running the vlog Tcl command:
vlog -sv foo.sv -work my_lib
The -sv option specifies that the file type is SystemVerilog. After you run this command successfully, the /tools/libraries/my_lib directory contains the module definition of my_foo.
To run above steps 1 through 3, you first create and add the following lines to a run.do file:
vlib /tools/libraries/my_lib vmap my_lib /tools/libraries/my_lib vlog -sv foo.sv -work my_lib quit
The Tcl command quit exits the Tcl shell so that the vsim command can complete. Next, you can run one of the commands to invoke Questa* Intel® FPGA Edition, as Commands to Invoke Questa Intel FPGA Edition describes.
- Alternatively, you can also type each Tcl command individually in the interactive Tcl shell that you launch by running vsim -c (or just vsim to invoke the GUI and the interactive Tcl shell).
- Some Tcl commands, such as vlog, vcom, vlib, and vmap are also available as Linux and Windows commands.
- For help on all vlog options, run vlog-help all. To get help on a specific option such as -suppress, run vlog -help -suppress.