SIMULATOR

This addendum contains the following sections:

Introduction
Executable Name
Supported Features
Cycle and Instruction Counters
Simulation Speed
Coverage
Restrictions
Simulator Configuration File

1 Introduction

This addendum contains information specific to the simulator version of CrossView Pro for the DSP56xxx .

2 Executable Name

The following CrossView Pro executable is delivered with the package (for PC with .exe extension):

    xfw56x CrossView Pro Debugger Simulator.

3 Supported Features

Except for the restrictions mentioned in the next section, the simulator version of the debugger cleanly supports all the standard features of CrossView Pro, including single stepping, code breakpoints, data 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.

Because this is a simulator version, you do not have to setup a serial communication at startup, as with an emulator.

3.1 Cycle and Instruction Counters

In addition to the standard features of CrossView Pro, the simulator version executes the DSP56xxx instruction set and can perform cycle counting and instruction counting. For this purpose the simulator has a cycle counter and an instruction counter. These counters can be monitored in the register window where they are shown as 'CCNT' and 'ICNT', respectively, and they can also be accessed through the registers $ccnt and $icnt.

3.2 Simulation Speed

To switch the accuracy of the DSP563xx and DSP566xx simulators and achieve a much higher simulation speed you can use the pseudo-register fast_mode. By default it is set to 0, but it can be changed in the register window or on the debugger command line:

The values of this register represent:

Changing the value of this register must be done before starting to execute (simulate) code. Simulation results are incorrect when it is changed during simulation. Once set to a value other than zero it cannot be reset anymore. Of course, closing the simulator program and rerunning it will reset the register again. In the instruction accurate mode the simulator will lose cycle accuracy only in very uncommon cases, like with program instructions that are partly in internal memory and partly in external memory. For most common jobs a setting of 2 is all that is needed, and the around tenfold speed improvement is certainly worth the small decrease in accuracy.

3.3 Coverage

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.

4 Restrictions

Facilities for background mode are absent in the simulator version of CrossView Pro. As a consequence, the CrossView Pro commands CB, st, u, ubgw 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.

5 Simulator Configuration File

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. Lines that start with the special notation '!>' are script lines that are executed by CrossView Pro.

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 fields listed in the configuration file 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. You can specify multiple CPU type separated by white space. This also determines the name of the register file regcpu.dat in the etc directory.
debug_instrument_module The name of the Debug Instrument (using GDI) used for debugging.
target_dependent_module The name of the target specific module needed for your DSP56xxx derivative.
radm The name of the Debug Instrument (using KDI) used for RTOS aware debugging. (optional).

Notes:


Copyright © 2002 Altium BV