2.4. Simulator Options

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

$ m1750-coff-run --help
Usage: m1750-coff-run [options] [file...] 
Options:
  -a "ARGS", --args "ARGS"    Pass ARGS to simulator
  -b,   --branch              Print branch coverage report
  -v,   --verbose             Print additional information
  -V,   --version             Print version number
  -t,   --trace               Trace instructions
  -d T, --delay T             Delay trace for T uSec
  -s,   --stats               Print execution statistics
  -c,   --coverage            Print coverage report
  -h,   --help                Print this message
Simulator options are:
  -freq F           Set clock frequency to F MHz (default 10 MHz)
  -bt               Back trace on fail
  -cpu ma31750      Simulate GPS MA31750 (default)
  -cpu mas281       Simulate GPS MAS281
  -cpu pace         Simulate Pace 1750
  -cpu f9450        Simulate Fairchild F9450
  -cpu gvsc         Simulate Honeywell GVSC 
Report problems to <support@xgc.com>

You can trace the execution of your program using the trace option. The output is a line of trace information for each instruction executed. The trace information gives the execution time so far (in microseconds), and program counter and the disassembled instruction. Source file names and lines numbers are printed where the source was compiled with the debug option. Linker labels are printed too.

$ m1750-coff-run -t hello
/opt/xgc/m1750-coff/src/libc/crt0.c:79
 <start>
       0.000 00000080 lim    r15,63487
       0.400 00000084 xorr   r14,r14
/opt/xgc/m1750-coff/src/libc/crt0.c:84
 <.LM4>
       0.600 00000086 lim    r1,32768
/opt/xgc/m1750-coff/src/libc/crt0.c:87
 <.LM5>
       1.000 0000008A lisn   r2,1
       1.200 0000008C lim    r0,32768
       1.600 00000090 sr     r0,r1
       1.800 00000092 cr     r0,r2
       2.000 00000094 bez    7
/opt/xgc/m1750-coff/src/libc/crt0.c:88
...