The Tcl restart command replaces the currently simulating snapshot with another snapshot of a same design. The simulator then uses the analog control options associated with the new snapshot to continue the simulation.
The specified snapshot must be a snapshot created by the save command.
The software interprets the snapshot name the same way as the snapshot name on the xmsim command line, with the addition that, if you want, you can give only the view name preceded by a colon to load a snapshot that is a view of the currently loaded cell. For example:
|
|
Restarts [ If the view name is omitted, there must be only one snapshot of the given cell, otherwise the snapshot name is ambiguous. In this case, an error message is issued, and a list of available snapshots is printed. |
|
|
Restarts [ |
|
|
Restarts [ |
When you restart with a saved snapshot in the same simulation session:
- SHM databases remain open and all probes remain set.
-
Breakpoints set in the current session at the time that you execute the restart remain set. Breakpoints are not saved in snapshots.
After a restart, periodic breakpoints trigger at the same times they would trigger without a save and restart. This is true even when the save and restart takes place at a time in between the periodic breakpoints.
- Probes set in the current session at the time you execute the restart remain set. Probes are not saved in snapshots.
- Forces and deposits in effect at the time you issue a
savecommand are still in effect when you restart.
If you exit the simulation and then start the simulator with a saved snapshot, databases are closed. Any probes and breakpoints are deleted. If you want to restore the full Tcl debug environment when you restart, make sure that you save the environment with the save -environment command. This command creates a Tcl script that captures the current breakpoints, databases, probes, aliases, and predefined Tcl variable values. You can then use the Tcl source command after restarting or the -input option when you start the simulator to execute the script. For example,
xmsim top
(open a database, set probes, set breakpoints, deposits, forces, etc.)
xcelium> run 100 ns
xcelium> save worklib.top:ckpt1
xcelium> save -environment ckpt1.tcl
xcelium> exit
xmsim -tcl worklib.top:ckpt1
xcelium> source ckpt1.tcl
restart Command Syntax
restart <snapshot_name>
[-path <snapshot_dir]
[-show]
restart Command Options
This section describes the options that you can use with the Tcl restart command.
|
Restarts the simulation with the snapshot saved at the specified location. This option lets you restart with a snapshot that was saved to a specific location with a
This |
|
Lists the names of all snapshots that can currently be used as the argument to the restart command. |
restart Command Limitations
The following restrictions apply when using the restart command.
- You cannot restart a snapshot that is topologically different from the currently loaded snapshot. The simulator determines if snapshots are topologically different by comparing the analog control options saved in the restarted snapshot with the analog control options being used in the current session. Topological differences arise when the
useprobesparameter of the immediate setoptionsstatement is set toyesand there is a change in the value of any of the following:
options save
options currents
options subcktprobelvlTopological differences can also arise if you attempt to restart a design that is different from the design that is running in the current session.When you do need to load a topologically different snapshot, exitxmsimand then start it with the new snapshot.
- To ensure accuracy, the analog simulation control options used to simulate a restarted snapshot must be the same as the options in use when the snapshot is saved.
- You cannot use the
restartcommand after the current simulation session has finished.
- If your design is a mixed-signal design, you cannot simulate snapshots saved before the most recent elaboration of the design.
restart Command Examples
In the following example, a save command is issued to save the simulation state as a view of the currently loaded cell, top. This snapshot can then be loaded using either of the next two restart commands.
xcelium> save top:ckpt1 xcelium> restart top:ckpt1 xcelium> restart :ckpt1
In the following example, a save command is issued to save the simulation state as a view of the currently loaded cell, top. A second save command is issued to save the Tcl debug environment. If you exit the simulator, you can restart with the saved snapshot and then restore the debug settings by sourcing the script created with the save -environment command.
xcelium> save top:ckpt1 xcelium> save -environment top_ckpt1.env xcelium> exit xcelium -tcl :ckpt1 xcelium> source top_ckpt1.env
The following command reloads the snapshot of the given cell, top. Because the view name is not specified, the snapshot name is ambiguous if there is more than one view, and an error message is issued.
xcelium> restart top
The following command lists all of the snapshots you can currently load with the restart command.
xcelium> restart -show
otherlib.board:module
worklib.board:ckpt1
worklib.board:ckpt2
