Intel® Simics® Simulator for Intel® FPGAs: User Guide

ID 784383
Date 12/04/2023

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.3.5. Intel® Simics® Simulator CLI Command Completion and Command History

Intel® Simics® simulator CLI supports some friendly features at the time of trying to write a command on this.

The first of these features is the command autocompletion which works through the <TAB> key. If you start typing the initial letters of a command, you can use the <TAB> key to allow the CLI to try to autocomplete this command. If there is only one command that starts with the initial typed keys, then the CLI completes the rest of the command.


In the Intel® Simics® simulator CLI, you can start typing ver and press the <TAB> key to allow CLI to autocomplete the version command:
# Intel Simics simulator CLI 
simics> ver
# Press <TAB> key and see that CLI autocompletes the command
simics> version

Another helpful feature is the ability to show commands that start with some initial letters entered into the CLI. You can achieve this by pressing the TAB key twice.


In the Intel® Simics® simulator CLI, start typing si. Type once the TAB key and notice that nothing happens. Next, type TAB for a second time to see the options available and continue typing a few additional letters of the desired command, in this case sim.log-level. You can continue typing additional letters and pressing again the <TAB><TAB> keys as this reduces the list of commands options available. You can repeat this as many times you need until you get to the wanted command. For example:
# Intel Simics simulator CLI 
simics> si                       # Press TAB twice
si      signed16  signed64  sim.                  simulation-reversing
signed  signed32  signed8   simulation-replaying  simulation-running
simics> sim                      # Press TAB twice
sim->  sim.cli.  sim.rexec.   sim.transactions.     simulation-reversing
sim.   sim.gui.  sim.tlmtry.  simulation-replaying  simulation-running
simics> sim.                     # Press TAB twice
sim.cli.       sim.log-level  sim.status   sim.transactions.
sim.gui.  sim.log-group  sim.rexec.     sim.tlmtry.  
simics> sim.log-                 # Press TAB twice
sim.log-group  sim.log-level
simics> sim.log-level

You can also access the command line history in the Intel® Simics® simulator CLI with the <up-arrow> and <down-arrow> keys. The command line history shows recent commands typed in the CLI. You can search the command history with a Ctrl+R keys combination. When searching, the CLI shows the reverse-search message. Enter the part of the command you are looking for and it shows the command that matches at the right. If this is not the correct command, you can continue looking for other commands that match using the same sequence of (Ctrl+R) keys combination.

When you find the correct command, run it by pressing Enter. If you do not find the correct command, or you want to exit from the command search, press Ctrl+A keys to return to the Intel® Simics® CLI prompt. The following example shows an example of how this feature can be used. Here, the sim sequence of characters is used to finally find the sim.log-level command.
# Intel Simics simulator CLI 

(reverse-search) 'sim': sim.log-level