Sometimes you need to replace arguments to command line options with other values when you are using different simulators. For example, you may want need to pass a different library file that has been compiled for the target simulator. To do this, you can either modify the default configuration file, or create a new configuration file and use the --config new_config_filename option in the SYNCAD_SIMSWAPPER_ARGS environment variable.
Either edit the Default Configuration File or Create a new one:
The Default Configuration File is located:
•On Windows in: C:\SynaptiCAD\bin\Win32\simswapper.ini |
•On UNIX in: /usr/local/synapticad-<version>/bin/i686/simswapper.ini |
To create a new configuration file:
•Run the following command to create a new configuration file: simswapper --create-ini new_config_filename.ini
|
•Once you have modified this file with the desired substitutions, you can tell SimSwapper to use the modified file by passing the --config option by setting this environment variable: set SYNCAD_SIMSWAPPER_ARGS=--config new_config_filename.ini |
How to edit the configuration file:
The Configuration file is organized in sections by simulator option name. All the options are normally commented out. The first three lines in a section are comments that describe the option name, which simulator it works for, and a usage example.
;; Option: pli
;; Valid for: mti
;; -pli pli_filename
; [pli_filename]
; originalValue = translatedValue
To edit the configuration file:
•Find the section that matches the option that you need to specify a new value for. •Remove the semicolon comment character from the last two lines of the section. •Replace the originalValue and the translatedValue arguments with the values that you would like written out. You can add multiple originalValue = translatedValue lines (one per line) in each section. •Save the file and run your simulation script as normal. |
Example of Editing the Configuration File:
In this example you would like SimSwapper to translate the following command from mti to ncsim:
vsim -pli "libfoo1_mti.so" top_module
By default, SimSwapper will generate a command such as:
ncsim -loadpli1 libfoo1_mti.so top_module
However, the pli command-line option will frequently require a different pli library that has been compiled for the target simulator. So, if you have a separate PLI library for ncsim, you can have SimSwapper replace the argument to "-pli". To do this, modify the pli section in the configuration file with the names of the arguments that you want swapped in. For example:
[pli_filename]
libfoo1_mti.so=libfoo1_nc.so
libfoo2_mti.so=libfoo2_nc.so
The argument name (pli_filename in this case) is not the same as the name of the option (-pli): the argument name is specified internally by SimSwapper.