IBM
Contents Index Previous Next



Issuing Monitor Commands


Whenever the interactive monitor system becomes active, commands are accepted from the user. When running the simulator in stand-alone mode, commands can only be entered textually from a command prompt. When running the simulator in graphical mode, commands may be issued both textually and through the use of menus and buttons.

Activating the Monitor

The simulator's monitor system becomes active when the simulator is started, when the execution has reached a stop condition or a breakpoint, when the system is completely idle, when a semantic error occurs, or when the execution is manually stopped.

These conditions are listed in greater detail in Activating the Monitor.

The Textual Interface

The commands to the monitor system consist of a command name and possibly one or more parameters to the command, separated by spaces or carriage return. The following general rules apply:

Getting Command Help

To get a simple list of all possible command names, enter a `?' at the command prompt. A command can then be entered after the list.

To get a list of all commands, grouped into different categories, use the command Help without parameters.

To get a list of all possible commands starting with a certain string, enter the string and hit <Return>. Unless the string was a complete command, all command names starting with the entered string are listed. The following example shows how to list all output commands:

Command : out
Command was ambiguous, it might be an abbreviation 
of:
Output-To Output-Via Output-None Output-Internal 

To get short help on a specific command, use the Help command and specify the command in question as a parameter, e.g.

Command : help help

Help <Optional command name>

Issuing the help command will print all the 
available commands. If help is entered with a 
command name, this command will be explained.

Entering Parameters

To get a list of possible parameter values, enter a `?' on the command line or when prompted for a missing parameter.

To specify a default value for a parameter, enter a `-' on the command line or when prompted for a missing parameter.

If a default value exists for a parameter, you may also hit <Return> when prompted for the parameter to accept the default value. However, if no default value exists, this will list the possible values and prompt for the parameter again.

Hint:

Before you are acquainted with the monitor commands and their parameters, it is generally a good idea to only enter the command names, without parameters. When prompted for parameters, use `?' to list possible values, and `-' to accept default values.

The Graphical Interface

The graphical Simulator UI is illustrated in the figure below:

Figure 467 : The Simulator UI

All input and output texts to and from the simulator monitor is displayed in the text area to the right.

Entering Commands Textually

To enter monitor commands textually:

  1. Place and click the mouse pointer inside the Command: input field at the bottom right, below the text area.
  2. Enter the command on the input line. The same syntax is used as when running in stand-alone mode; see The Textual Interface. However, prompting for missing parameters are done by issuing dialogs, where the parameter value can be entered or selected from a list of possible values. See Selecting Parameters.

Monitor commands entered textually are saved in a history list. To re-execute a command in the history list:

  1. Place the mouse pointer inside the input field.
  2. Use the arrow keys <Up> and <Down> to display the commands that have been entered earlier.
  3. Hit <Return> on the command line to re-execute the displayed command. You may edit the command before executing it.

Issuing Commands Using Buttons

The preferred way to issue monitor commands is by using the command buttons in the left area of the Simulator UI, or by using menu choices in the menu bar. Each button or menu choice correspond to a certain monitor command. The buttons are grouped into modules, corresponding to different categories and uses of the commands. The groups are similar to those listed when using the Help command in the textual interface.

To "preview" the command associated with a button or menu choice, without executing it:

  1. Place the mouse pointer on the button or menu choice and press the mouse button. The name of the monitor command is displayed in the Status Bar at the very bottom of the Simulator UI.
  2. Move the mouse pointer outside the button or menu and release the mouse button.

To execute a command, simply click on a button.

Selecting Parameters

Parameters to monitor commands are prompted for in dialogs (unless they have been specified on the command input line). If a parameter has a set of possible values, the list of values is presented from which you may select a value:

Figure 468 : A typical parameter dialog

In this dialog, the values can be sorted alphabetically by clicking the Sort button. After having entered an initial string, you can also press <Space> to select the first value starting with this string, or press `?' to select the first value containing this string. Additional <Space> or `?' characters will select the next value, etc. When there are no more matches, a real space or `?' character will be added after the string you initially entered.

File parameters are prompted for in File Selection Dialogs. Other parameters, like integers, are prompted for in a simple text input dialog.

Selecting Signal Parameters

If a command parameter is an output signal and you select a signal which in turn have parameters, the signal parameters are asked for in a separate dialog. In this dialog, all parameters are listed with their default ("null") values:

Figure 469 : Editing signal parameters

To edit a signal parameter, you select the parameter and then edit the value displayed in the input field. If the parameter is of an enumerated type, the possible values can also be selected from the option menu just above the input field. By clicking Default value, the "null" value will be inserted in the input field. A changed parameter value is not updated in the parameter list until a parameter is selected in the list.

Click OK to accept all parameter values, and Cancel to abort the monitor command. The validity of the parameter values is not tested until you click the OK button.

Undo/Redo Commands

To undo a previous command, click the Undo quick button in the tool bar, or select Undo in the popup menu that is available in the text area. Then you get a dialog with all commands you have given so far. All commands are shown, even the ones entered using buttons or menu choices.

Figure 470 : Undoing a command

Initially all commands except the last is selected. If you click OK the simulation is restarted and all the selected commands will be re-executed. By clicking on the commands in the dialog you can decide which commands you want to be re-executed in the restarted simulation.

Note:

The Undo function cannot handle to undo commands for setting or removing graphical breakpoints.

To redo a command in the current simulation, select Command in the popup menu in the text area. Then you also get a dialog with all commands you have given so far, in the same way as for Undo.

Figure 471 : Redoing a command

After selecting one of the commands and clicking OK the command is executed. You can also change the command on the command line before clicking OK.


http://www.ibm.com/rational
Contents Index Previous Next