This addendum contains the following sections:
Introduction
Executable Name
Supported Features
State Counters
Coverage
Profiling
Peripheral Support
Restrictions
Simulator Configuration File
This addendum contains information specific to the simulator version of CrossView Pro for the 8051.
The following CrossView Pro executable is delivered with the package (for PC with .exe extension):
xfw51 CrossView Pro Debugger Simulator.
Except for the restrictions mentioned in section 4 , the simulator version of the debugger cleanly supports all the standard features of CrossView Pro, including single stepping, breakpoints, trace support, C expression evaluation and record/playback capability. With respect to setting breakpoints the simulator version of the debugger is capable of supporting all breakpoint types, including separate data-read and data-write breakpoints. Each of these breakpoints can be placed on any of the memory addresses.
All instructions of the standard 8051 are supported. The granularity for timing measurements is one instruction state.
Because this is a simulator version, you do not have to setup communication at startup, as with an emulator.
In addition to the standard features of CrossView Pro, the simulator version executes the 8051 instruction set and can perform state counting. For this purpose the simulator has one state counter. This counter can be monitored in the register window where it is shown as 'SCNT' and it can also be accessed through the register $scnt.
The definition of a state is:
Therefore, a one byte instruction (like INC A) needs 6 states (= 12 clock cycles).
Additionally, you can use the SBRK (state break) register in combination with the SCNT register to set a breakpoint on the number of processor states consumed by your application. The state break register is a CrossView Pro internal data structure that can be accessed as if it is an ordinary register. If the number of processor states used is greater than the value stored in the SBRK register a "state counter breakpoint" is generated and execution is suspended. When SBRK is set to 0xffffffff state counter breakpoints are suppressed.
The simulator traces all memory access performed during program execution. This feature can be switched on or off. If you are not interested in coverage information you should turn off this feature because gathering coverage data will slow down the execution speed of the simulator. The simulator differentiates between data read, data write and instruction fetch. CrossView Pro shows the gathered coverage data through various windows and dialogs. See also section Coverage in Chapter 11, Special Features.
Profiling allows you to perform timing analysis on your software. The simulator supports both code range profiling and function profiling (also called cumulative profiling).
Profiling can be switched on or off. If you are not interested in profiling information you should turn off this feature because gathering profiling information will slow down the execution speed of the simulator. CrossView Pro shows the gathered profiling information through various windows and dialogs. See also section Profiling in Chapter 11, Special Features.
The simulator supports simulation of the following peripherals:
For an up-to-date list of supported
peripherals, see our WWW site:
http://www.tasking.com/support/8051/peripherals.html
Facilities for background mode are absent in the simulator version of CrossView Pro. As a consequence, the CrossView Pro commands CB, st, u, and wt for background mode, are not available. Because this is a simulator version, the >& command to record target communication and the o command for transparency mode are not available. Also, the simulator version of the debugger does not support command line function calling.
The simulator configuration files "sim*.cfg" describe the available simulator configurations. A configuration file is a text file and can be edited with any text editor. CrossView Pro searches for the simulator configuration file in the current directory and in the etc directory.
On startup CrossView Pro selects the configuration indicated by the Target | Settings dialog or with the -tcfg command line option and reads the simulator configuration file in memory. This configuration can be selected using the filename or the full name (title field) of the configuration.
Empty lines, lines consisting of only white space are allowed. Comments start at an exclamation-sign ('!') and end at the end of the line.
An information line has the following synopsis:
field one of the keywords described below
field-value the value assigned to the field
comment optional comment
The known fields are:
Field | Description |
title | The full name of the configuration. This name will be displayed in the Target configuration field of the Target | Settings dialog. |
cpu_type | The name of the CPU to be simulated. |
debug_instrument_module | The name of the Debug Instrument (using GDI) used for debugging: 'sim51' for the instruction set simulator. |
Fields not required for the simulator configuration can be omitted.