sim
sim( ) => t / nil
Description
If this simulation is not being run in batch mode, as determined by the simBatchFlag variable being set to nil, the simInitSimulator function is called. The simInitSimulator function is called when SE first starts executing during its initialization phase. The function must be called again if run interactively because the user might have manually set simulator-specific variables such as silosSimViewList, which must replace the value of simViewList for it to affect netlisting. Calling simInitSimulator again ensures correct setting of global variables by simulator-specific variables.
Next, the simActions variable is set to the following if it has not already been set:
'( simCheckVariables()
simInitRunDir()
netlist()
simin()
runsim()
)
This is the default list of functions, to be executed in order, to run a complete simulation. If these functions do not provide the proper sequence of steps to be performed for a particular simulator, the variable can be set in the simulator-specific file stored in the local/si/caplib directory with the same name as the simulator with the .ile suffix. The variable can be set inside the file outside of any function or in the function of the same name as the simulator.
Next, each function specified in the simActions list is called in order. As soon as one of these functions returns a value other than t, the simulation is stopped, the string stored in the simFailedMessage variable is printed, and nil is returned. If all of the functions return t, the string stored in the simCompleteMessage variable is printed and t is returned. If the simCompleteMessage variable or simFailedMessage is nil, no message is printed.
The function is defined in /etc/skill/si/caplib/simulate.ile. You can modify this function.
Arguments
Value Returned
Examples
sim()
Related Topics
Return to top