Skip to main content

questasim

questasim(IP_LIB **kwargs)

Create a target for invoking Questasim (compilation, elaboration, and simulation) on IP_LIB.

It will create a target run_<IP_LIB>_questasim that will compile, elaborate, and simulate the IP_LIB design.

Parameters

NameTypeDescription
IP_LIBstringThe target IP library, it needs to have SOURCES property set with a list of SystemVerilog or VHDL files.

Keyword Arguments

NameTypeDescription
NO_RUN_TARGETboolDo not create a run target.
QUIETboolSuppress informative messages from vlog/vcom during compilation.
GUIboolRun simulation in GUI mode.
GUI_VISUALIZERboolRun simulation in GUI, with Visualizer.
32BITboolUse 32 bit compilation and simulation.
LIBRARYstringreplace the default library name (worklib) to be used for elaboration and simulation.
TOP_MODULEstringTop module name to be used for elaboration and simulation.
OUTDIRstringOutput directory for the Questasim compilation and simulation.
RUN_TARGET_NAMEstringReplace the default name of the run target.
VHDL_COMPILE_ARGSlist[string]Extra arguments to be passed to the VHDL compilation step.
SV_COMPILE_ARGSlist[string]Extra arguments to be passed to the SystemVerilog / Verilog compilation step.
RUN_ARGSlist[string]Extra arguments to be passed to the simulation step.
ELABORATE_ARGSlist[string]Extra arguments to be passed to the elaboration (vopt) step.
FILE_SETSlist[string]Specify list of File sets to retrieve the sources from
DO_FILESlist[string]Specify list of do files to run with the run command

questasim_gen_sc_wrapper(IP_LIB **kwargs)

This function create a target to generate a SystemC wrapper for the IP library, with Questasim scgenmod, if SystemVerilog or Verilog files are in the IP library.

Parameters

NameTypeDescription
IP_LIBstringThe target IP library, it needs to have SOURCES property set with a list of SystemVerilog or Verilog files.

Keyword Arguments

NameTypeDescription
32BITboolUse 32 bit compilation and simulation.
QUIETboolDisable output for informative messages
OUTDIRstringOutput directory for the Questa compilation and simulation.
LIBRARYstringreplace the default library name (worklib) to be used for elaboration and simulation.
TOP_MODULEstringTop module name to be used for elaboration and simulation.
SV_COMPILE_ARGSstringExtra arguments to be passed to the SystemVerilog / Verilog compilation step.
VHDL_COMPILE_ARGSstringExtra arguments to be passed to the VHDL compilation step.
FILE_SETSlist[string]Specify list of File sets to retrieve the sources from

questasim_compile_sc_lib(SC_LIB **kwargs)

This function create a target to compile SystemC boundary library with sccom

Parameters

NameTypeDescription
SC_LIBstringCMake target representing the SystemC library; must have SOURCES set to a list of cxx_sources (SystemC C++ files).

Keyword Arguments

NameTypeDescription
32BITboolUse 32 bit compilation and simulation.
OUTDIRstringOutput directory for the Questa compilation and simulation.
LIBRARYstringreplace the default library name (worklib) to be used for elaboration and simulation.
TOP_MODULEstringTop module name to be used for elaboration and simulation.

questasim_configure_cxx(**kwargs)

.. note:: This is a macro, and so does not introduce a new scope.

This macro is used to configure the C and CXX compiler to the one used by the tool.

It can also be used to add some libraries, such as SystemC, DPI-C and VHPI in this case, for example if you want to use dpi, you should use this macro like this :

questasim_configure_cxx(LIBRARIES DPI-C)

Keyword Arguments

NameTypeDescription
LIBRARIESlist[string]Libraries that needs to be added.

questasim_add_cxx_libs(**kwargs)

This function is called by the questasim_configure_cxx macro, you shouldn't use it directly.

It will add the needed information to IP_LIB and add some flags for the compilation and linking.

Keyword Arguments

NameTypeDescription
32BITboolUse 32 bitness.
LIBRARIESlist[string]libraries that needs to be added, possible choice are SystemC, DPI-C and/or VHPI

modelsim()

.. note:: This is a macro, and so does not introduce a new scope.

This macro is here in case the old modelsim SoCMake function has been called, due to a change in the function name, made to fit with the changes made in the past years with Modelsim/Questa.

It will print a deprecation message and redirect the arguments used to the questasim SoCMake function.