6 Hardware Inspection 8 Tutorials
Getting Started  / 

7 Documentation and Help

7.1 Documentation

To access the documentation run the documentation.bat (documentation on Linux) script in your project. The script will index all the documents for the packages associated with your project, and then it will open the documentation in your web browser.

7.2 The Help System

The CLI provides a few commands that assist in exploring large simulated systems, and for exploring the CLI.

Such a command is help. Use it to receive help about almost anything in the simulator that has a name, in particular the commands you have seen in this document, and which you will see in the rest of the Intel Simics documentation.

Another important command is help-search, also known as apropos. It can be used to search the reference documentation for a particular text string.

Both help and apropos limit their search to documentation about everything that is currently loaded in the simulator. This means it is usually best to run them after you have loaded the target system you want to explore.

A simulation in built up by objects. Objects can provide namespaced commands, that is, commands on the format <object-name>.<command-name>. Different kinds of objects provides different namespaced commands. The namespaced command is either registered on an interface or on a class.

Sometimes you know of an interesting namespaced command you want to use, for example the input command, but you don't know which objects provide the command. To find those objects, first use the apropos command to find which kinds of objects that provide the command:

simics> apropos input
The text 'input' appears in the documentation
for the following items:

Command        <bp-manager.con-string>.wait-then-write
Command        <graphcon>.grab-setup
Command        <graphcon>.input
Command        <graphcon>.input-file
Command        <os_awareness>.find
Command        <recorder>.playback-start
Command        <recorder>.recorder-start
Command        <recorder>.recorder-stop
Command        <textcon>.input
...

As an alternative to apropos, which searches all documentation for loaded modules, we can limit the result to only commands by using list-commands:

simics> list-commands substr = input
┌─────────────────────┬───────────────────────────┐
│       Command       │     Short Description     │
├─────────────────────┼───────────────────────────┤
│<graphcon>.input     │send string to a console   │
│<graphcon>.input-file│input a file into a console│
│<textcon>.input      │send input to a console    │
│<textcon>.input-file │input a file into a console│
└─────────────────────┴───────────────────────────┘

The input command is provided by graphcon and textcon. Let's focus on textcon. First we determine if textcon is a interface or a class.

simics> list-interfaces substr = textcon
No match for substr 'textcon'  
simics> list-classes substr = textcon
The following classes are available:
┌───────┬─────────────────┐
│ Class │Short description│
├───────┼─────────────────┤
│textcon│text console     │
└───────┴─────────────────┘

The textcon clearly references a class. Now we can use the list-objects command to find all objects of the textcon class.

simics> list-objects class = textcon
┌────────────────────┬─────────┐
│       Object       │  Class  │
├────────────────────┼─────────┤
│board.serconsole.con│<textcon>│
└────────────────────┴─────────┘

Evidently, the only textcon object in the target system is board.serconsole.con.

From the result of apropos and list-objects we now know that there is a command board.serconsole.con.input:

simics> help board.serconsole.con.input
Command <textcon>.input

   Synopsis
      <textcon>.input "string" [-e]

   Description
      Send string to the text console.
...

The list-objects command, and many other commands can handle the namespace hierarchy of objects. For example, if we know that we were looking for a textcon class hierarchically under board, we would use the namespace argument.

simics> list-objects namespace = board class = textcon
┌────────────────────┬─────────┐
│       Object       │  Class  │
├────────────────────┼─────────┤
│board.serconsole.con│<textcon>│
└────────────────────┴─────────┘

These simple commands go a long way when you want to explore the Intel Simics simulator.

6 Hardware Inspection 8 Tutorials