This section focuses on some practical information related to the use of Simics command line interface (CLI). Particularly, the following information is presented:
help
command We assume that a user knows how to start Simics and how to get access to Simics CLI.
This section doesn’t cover all commands available through Simics CLI. But, just to give an idea how powerful Simics CLI is, here are some actions which can be done via Simics CLI:
This section describes command line completion provided by Simics command line interface (CLI).
To simplify the use of Simics CLI, Simics CLI implements command line completion, also known as tab completion. Simics command line can complete commands, arguments, file names, and some other entities. Let’s see how command line completion works for the run-command-file
Simics command:
Simics command line completion functionality will complete the command name producing the following:
simics> run-command-file _
where _ denotes the position of a text cursor.
To get further with command line completion, press the tab key twice. Simics command line completion system will print the list of parameters and flags which can be passed to the run-command-file
command:
simics> run-command-file <TAB><TAB>
-local -main-branch file =
Please note that we had to press the tab key twice. It is because the command completion system could not unambiguously complete the command after the tab key was pressed once. After the tab key is pressed again, the command completion system shows all possible completions.
Let’s proceed with our example and enter into the command line letter “f” followed by pressing the tab key:
simics> run-command-file f<TAB>
After the tab key was pressed, the result may look like this:
simics> run-command-file file = _
We would like to run Simics command file targets/qsp-x86/firststeps.simics
. Simics command line completion can help with this. Please enter additionally “t” into the command line:
simics> run-command-file file = t_
Now press tab. The command line completion system will produce something like this:
simics> run-command-file file = targets\_
It may be a good time to play with command line completion by pressing the tab key and entering single letters until you have the full command entered:
simics> run-command-file file = targets\qsp-x86\firststeps.simics
On Linux, the command line completion system will use “/” as a directory separator. There, the result will look like this:
simics> run-command-file file = targets/qsp-x86/firststeps.simics
Pressing the enter key now will run the command creating a new target machine.
Simics documentation can be accessed via the help
Simics CLI command. The help
command provides access to the documentation for:
To try the command, enter the following command to see the documentation for the run-command-file command:
simics> help run-command-file
To get the documentation for any Simics command just run the help
command specifying the command you are interested in:
simics> help <command-of-interest>
More information about Simics help
command can be obtained by reading the documentation for the help command itself:
simics> help help
The help-search
command allows to search the documentation for a particular string. Here is a sample usage of the help-search
command:
simics> help-search python
More information about Simics command line interface can be found in Simics User’s Guide, section “The Command Line Interface”.