BugHunter Pro and the VeriLogger Simulators

5.4 Simx Commonly used Command Line Options

5.4 Simx Commonly used Command Line Options

Previous topic Next topic  

5.4 Simx Commonly used Command Line Options

Previous topic Next topic  

The VeriLogger command line simulator supports several simulation options that can be used to control and debug simulations. Most (but not all) simulation options may be added in any order and anywhere on the command line. To the simulator, the following statements are identical:

simx -s cpu.v memory.v io.v

simx cpu.v memory.v io.v -s 

simx cpu.v memory.v -s io.v

Note that simx can be replaced with vlogcmd in the commands above to run SynaptiCAD's interpreted simulator instead of the compiled code simulator.

Listed below are some commonly used simulation options supported by VeriLogger:

-s

The Stop option, -s, compiles the source code then enters the interactive console shell before the execution begins.

simx -s cpu.v memory.v io.v

-v <LibraryFilename>

Deprecated: Specify the name of a library filename using the -v option. If this option is used, VeriLogger will try to match any undefined modules to modules inside this library file. This option is deprecated in simx, since it's generally more efficient to compile library files into a compiled library instead.

-y <LibraryDirectory>

Specify a directory path to search for source code library files. Multiple source code library paths can be specified using multiple -y options. If this option is used, the simulator will attempt to match any undefined modules with files that have one of the file extensions set with the +libext option. The simulator does not look inside a file unless the undefined module name exactly matches the filename. The simulator will not look at any files unless file extensions have been set using the +libext option. The following examples show how to specify a directory path, a directory path with spaces, and how to use the +libext option (UNIX users should use a backslash):

simx model.v -y\mylibs +libext+.v

simx model.v -y"\My Libraries" +libext+.v

+define+macroname

Define a macro name with a blank value for use in conditional compilation. For example:

 +define+mymacro

+define+macroname[=macrovalue]

Define a macro name as a string. For example: +define+mymacro=1

Note: Simx automatically predefines a macro called __syncad. This macro can be used by user code to conditionally compile simx-specific source code. For example, to conditionally compile code that creates a btim dump file:

`ifdef __syncad

initial begin

  $btim_dumpfile("mysim.btim")

  $btim_AddDumpSignal("top");

  end

`endif

+tcl+filename

Read TCL simulator control commands from a file.

--work <worklib>  

Specifies the destination library name (3rd party documentation sometimes refers to this as the "working library"). If this option is not specified, the compiler will store compilation results to a default destination library called work. If no directory mapping is specified for work in the scd.lib file that normally defines library to directory mappings, a sub-directory called scd_work will be created in the current directory and work will be mapped to this new directory. See 2.10 Compiled Libraries for more details.