27 

 

13.2   Command-Line Interface

As an alternative to simply outputting the verbose debug output from Covered, the score command comes equipped with its own interactive debugging mechanism called the CLI (Command-Line Interface). This interface is a command-line driven utility that starts at the beginning of the resimulation. Its purpose is to allow the user to step through simulation execution and view the contents of signals, time, scopes, code and internal thread queues for the purposes of debugging and/or understanding Covered. This utility works much in the same way as simulator CLIs and the GDB debugging utility.

13.2.1   Building Covered for the CLI

Because interactive command-line debugging has a small performance penalty when compiled in and is closely associated with the verbose debug output option, Covered requires the user to specify an option to the configuation/build process to enable this feature. To enable the CLI, simply specify the --enable-debug option to the configure script. This will cause Covered to compile in CLI capabilities and enable the user of the -cli score command option.

13.2.2   Using the CLI

To allow the score command to use the CLI for interactive resimulation, simply specify the -cli [filename] option to the score command. If filename is specified to this option, the contents of this file will be parsed and executed once the score command has reached the resimulation process. The contents of this file are a series of CLI commands (one command per line) in ASCII format and can be automatically produced with the "savehist" CLI command (see below). This feature allows a user to quickly save off the CLI commands made during one score run and reuse them in a subsequent score run without having to remember and manually input the same commands.

Once the -cli option is invoked, Covered will run the score command until it gets to the beginning of the resimulation process. At this time, if the optional filename is specified, it will parse the contents of this file and execute the CLI commands found there until all commands are executed. If filename was not specified, a prompt will be displayed and the resimulation execution will halt until the user has specified otherwise via command-line options. After entering a command-line option, simply press return to invoke that command. In the event that the command was a step, next or continue option, resimulation will resume until it reaches the next stop point.

13.2.3   CLI commands

The following is a list of all of the CLI options available to the user.

 

CLI Command-line Options
Option Description
step [num] Advances to the next statement if num is not specified; otherwise, advances num statements before returning to the CLI prompt.
next [num] Advances to the next timestep if num is not specified; otherwise, advances num timesteps before returning to the CLI prompt.
goto num Advances to the given timestep (or the next timestep after the given value if the timestep is not executed) specified by num.
run Runs the simulation to completion.
continue Continues running the simulation to completion.
thread active Displays the current state of the internal active simulation queue. This queue consists of process threads that will be executed in the current timestep.
thread delayed Displays the current state of the internal delayed simulation queue. This queue consists of process threads that will be executed at a later time as dictated by a delay statement.
thread waiting Displays the current state of the internal waiting simulation queue. This queue consists of process threads that are not active or delayed but may be activated by a value change in one of the signals in its expression tree.
thread all Displays the current state of all process threads in the simulator.
current Displays the current scope, block, filename and line number of the statement that is about to be executed in the active queue.
time Displays the current simulation time.
signal name Displays the current value of the given net/variable.
expr num Displays the given expression and its current value where num is the ID of the expression to output.
debug [on | off] Turns verbose debug output from the simulator on or off. If 'on' or 'off' is not specified, displays the current debug mode.
list [num] Lists the contents of the file where the current statement is to be executed. If num is specified, outputs the given number of lines; otherwise, outputs 10 lines.
savehist filename Saves the current history to the specified file.
history [(num | all)] Displays the last 10 lines of command-line history. If 'all' is specified, the entire history contents will be displayed. If num is specified, the last num commands will be displayed.
!num Executes the command at the num position in history.
!! Executes the last valid command.
help Displays the available command-line options.
quit Ends simulation immediately.


1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9 |  10 |  11 |  12 |  13 |  14 |  15 |  16 |  17 |  18 |  19 |  20 |  21 |  22 |  23 |  24 |  25 |  26 |  27 |  28 |  29 |  30 ]
License: GPL
This Manual was originally created with ManStyle.