C.2. Simulator Options

The simulator supports several options including the trace option (-t) and the statistics option (-s). Use the option --help for more information.

The first set of options are given to the run command along with the name of the execurtable file.

Options:
  -a "ARGS", --args "ARGS"    Pass ARGS to simulator
  -B,   --branch-report       Print branch coverage report
  -b,   --branch-summary      Print branch coverage summary
  -C,   --coverage-report     Print coverage report
  -c,   --coverage-summary    Print coverage summary
  -d T, --delay T             Delay trace for T uSec
  -f MOD, --file FILE         Report coverage for this source file only
  -h,   --help                Print this message
  -i I, --pending I           Trigger trace on pending interrupt I
  -I I, --interrupt I         Trigger trace on interrupt level I
  -l T, --limit T             Time limit T uSec
  -m,   --trace-memory        Trace data memory cycles
  -M,   --trace-memory-wide   Trace data and instruction memory cycles
  -p,   --perf                Print performance summary
  -P PC, --pc PC              Trigger trace on pc = PC (use 0x for hex)
  -r,   --ram-tags-report     Print RAM tags report with large blocks
  -R,   --RAM-tags-report     Print RAM tags report with small blocks
  -s,   --stats               Print execution statistics
  -t,   --trace               Trace instructions using 70 columns
  -T,   --trace-wide          Trace instructions using wide format
  -u U, --resolution U        Set task trace resolution to U uSec
  -v,   --verbose             Print additional information
  -V,   --version             Print version number
  -w,   --wide                Widen a trace or report
  -y,   --nosys               Don't pass system calls to host
  -z,   --tasking-report      Print task switching report
  -Z,   --tasking-report-wide Print task switching report wide format

This second set of options are passed to the simulator within the run command, and to do this you need to use the run command's option -a as follows:

Simulator options are:
  -edac             Also simulate the EDAC
  -trace-edac       Trace any unusual EDAC operations
  -mer D            Set memory error rate to F SEUs per day
  -fill             Fill memory with test pattern
  -cba              Introduce random Rev CBA faults
  -eram-size S      Simulate S K Bytes of extended RAM
  -mcnfr MCNFR      Initial value for MCNFR (default 0x00010000)
  -freq F           Set the clock frequency to F MHz (default 20 MHz)
  -fpu              Run with floating point unit (default)
  -no-fpu           Run without floating point unit
  -no-gdb           Make trap 1 available to applications
  -no-tn0           Don't stop on 'tn 0'
  -sof              Stop on fault (default)
  -no-sof           Don't stop on fault, call handler
  -sorbw            Stop on read-before-write
  -no-sorbw         Don't stop on read-before-write, (default)
  -uarta DEV        Connect UARTA to DEV (default stdin/stdout)
  -uartb DEV        Connect UARTB to DEV
  -uben             Swap roles of UARTs A and B
  -ift              Set the input IFT
  -no-ift           Clear the input IFT (default)
  -prom8            Set the input PROM8 (8-bit PROM) (default)
  -no-prom8         Clear the input PROM8 (40-bit PROM with EDAC)
  -romwrt           Set the input ROMWRT (enable PROM write)
  -no-romwrt        Clear the input ROMWRT (no PROM write) (default)
Trace format is:
     142.000 nzvc 15 spe 7 02000F34 sethi  %hi(0x2100000), %g1
           |    |  | ||| | |        |
           |    |  | ||| | |        - Disassembled instruction
           |    |  | ||| | - Program Counter (PC)
           |    |  | ||| - Current Window Pointer (CWP)
           |    |  | ||- Enable Traps (ET)
           |    |  | |- Previous Supervisor (PS)
           |    |  | - Supervisor mode (S)
           |    |  - Processor Interrupt Level (PIL)
           |    - IU Condition codes (ICC)
           - CPU time in microseconds

Report problems to <support@xgc.com>

The trace option prints each instruction as it is executed, along with the execution time in microseconds, and the instruction address. If the debug option was used when the source files were compiled, then source code line numbers will be printed too.