4.7 Command-line Keyboard Shortcuts 5.1 Script Support in CLI
Simics User's Guide  /  II Feature Overview  / 

5 Simics Scripting Environment

The Command Line Interface in Simics provides scripting capabilities that can be used to write parameterized configurations and scripts that control or inspect simulated sessions. For even more advanced scripting, the Python language can be used.

This chapter describes how to write simple scripts in the Simics command line interface (CLI), using control flow commands, variables and script branches. It also explains how the configuration system can be accessed from scripts, and how Python can be used for more advanced script programming.

All commands can be executed either by typing them at the prompt in the Simics console, or by writing them to a file, e.g., example.simics, and executing the command run-command-file example.simics, or for Python examples:
run-python-file example.py.

Note: Scripts should normally not start the simulation. If a script starts the simulation, that is a synchronous (blocking) call. Control is not returned to CLI until the simulation is stopped. If the script does not stop itself, the simulation may be stopped by using the GUI controls or by entering Ctrl-C in CLI.
4.7 Command-line Keyboard Shortcuts 5.1 Script Support in CLI