Appendix C. Using the M68000 Family Simulator

The simulator command line has the form:

$ m68k-coff-run switches file

C.1. Command Line Switches

The simulator includes command line switches that are common to all targets, and switches that are specific to the target microprocessor.

-a " -option -option ... "

Introduces further target-specific options as follows:

-cpu CPU

The CPU type is given in the program file and the simulator will use this as the CPU type. However, you can change the CPU type to CPU. Values are as follows:

  • MC68000 - Change to the Motorola MC68000

  • MC68008 - Change to the Motorola MC68008

  • MC68010 - Change to the Motorola MC68010

  • MC68020 - Change to the Motorola MC68020

  • MC68040 - Change to the Motorola MC68040

  • CPU32 - Change to the Motorola CPU32

  • MC68881 - Change to the Motorola MC68881 Floating-Point Co-Processor

-fpu

Simulate the Floating-Point Co-Processor, equivalent to "-cpu MC68881".

-freq F

Set the clock frequency to F MHz. The default is 25MHz.

-b, --branch-summary

Print a branch summary that given the percentage of conditional branches that went both ways. You can use this option to identify blocks of code that have not been covered by a test case.

-B, --branch-report

Print a detailed conditional branch report with source line numbers for each conditional branch instruction that did not go both ways. You can use this option to identify blocks of code that have not been covered by a test case.

-c, --coverage-summary

Print an execution coverage report that gives the percentage of executable words that were fetched for execution. You can use this option to identify blocks of code that are unreachable from the program entry point.

-C, --coverage-report

Print a detailed report giving the source line numbers of executable words that were not fetched for execution. You can use this option to identify blocks of code that are unreachable from the program entry point.

-d D, --delay D

Delays the start of tracing by D microseconds. Use this option to skip unwanted lines of trace output.

-h, --help

Print a list of the simulator's options.

-i I, --pending I

Trigger interrupt trace when interrupt I is raised (and becomes pending).

-I I, --interrupt I

Trigger interrupt trace when interrupt I is becomes unmasked and causes the CPU to enter the handler.

-l T, --limit T

Set a time limit on simulation of T microseconds.

-m, --trace-memory

Trace memory reads and writes using 70 columns.

-M, --trace-memory-wide

Trace memory reads and writes using a wide format.

-p, --perf

Print a performance summary for the simulation run

-r, --ram-tags-report

Print a report that gives a summary of how each memory block was used. The blocks are large.

-R, --RAM-tags-report

Print a report that gives a summary of how each memory block was used. The blocks are small.

-s, --stats

Print execution statistics such as the total number of clock cycles and the number of instructions executed.

-t, --trace

Trace instructions using 70 columns.

-T, --trace-wide

Trace instructions using wide format and include the floating registers if any have a non-zero value.

-u U, --resolution U

Set the task trace resolution to U microseconds.

-v, --verbose

Verbose Mode. In normal mode the simulator only generates information in the case of an error. In verbose mode, useful information is generated as the simulation proceeds.

-V, --version

Print the simulator's version number and exit.

-w, --wide

Print traces and reports in wide or lengthy format.

-z, --tasking-report

Print a tasking report. This records interrupt levels and the number of the current Ada task over a range of time and prints a report when execution is complete. Recording can be triggered on interrupt, or after a delay or it can be continuous. Recording slows the simulator. Uses less than 80 columns.

-Z, --tasking-report-wide

Print a tasking report. This records interrupt levels and the number of the current Ada task over a range of time and prints a report when execution is complete. Recording can be triggered on interrupt, or after a delay or it can be continuous. Recording slows the simulator. Uses wide format.