SIMULATOR

This addendum contains the following sections:

Introduction
Executable Name
Supported Features
Cycle Counter
Profiling
Simulator Configuration File
Restrictions

1 Introduction

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

2 Executable Name

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

  xfwtri CrossView Pro Debugger for the TriCore, supporting IEEE-695 absolute object files.

  xfwtri11 CrossView Pro Debugger for the TriCore, supporting ELF/DWARF object files.

  tsim.dll TriCore Simulator DLL (Windows)

  tsim.so TriCore Simulator shared library (UNIX)

  tsim2.dll TriCore2 Simulator DLL (Windows)

  tsim2.so TriCore2 Simulator shared library (UNIX)

3 Supported Features

Except for the restrictions mentioned in section 5 , the simulator version of the debugger cleanly supports all the standard features of CrossView Pro, including single stepping, breakpoints, C expression evaluation, profiling 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 TriCore Instruction Set are supported. The simulator is an architectural model. As such, cycle counts are approximate.

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

3.1 Cycle Counter

In addition to the standard features of CrossView Pro, the simulator version executes the TriCore instruction set and can perform cycle counting. For this purpose the simulator has a cycle counter, which can be monitored. The first one is the regular 'cycle counter', this counter can be monitored in the register window where it is shown as 'CCNT' and it can also be accessed through the register $ccnt.

3.2 Profiling

Profiling allows you to perform timing analysis on your software. The simulator supports both function profiling and code range 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.

CrossView Pro uses the TriCore synchonization instructions DYNC and ISYNC each time execution is halted to guarantee the ordering of various events within the machine. For accurate cycle counting turn off this feature.

To turn off synchronization on halt

From EDE:

1. From the Project menu, select CrossView Pro Options...

The TriCore CrossView Pro Debugger Options dialog appears.

2. Select the Miscellaneous tab.

3. Disable the Synchronize on Halt check box.

4. Click OK.

On the command line use the following option:

4 Simulator Configuration File

The simulator configuration file "tsim.cfg" (or tsim2.cfg for the TC2) describes the available simulator configuration. 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 ('!') at the start of a line and end at the end of the line.

An information line has the following synopsis:

[! comment] [field : field-value]

field one of the keywords described below

field-value the value assigned to the field

comment optional comment

The known fields are:

title the full name of the configuration. This name will be displayed in the Target configuration field of the Target | Settings dialog.

debug_instrument_module
the name of the DLL used for debugging.

radm the name of the DLL used for RTOS aware debugging (optional).

Fields not required for the simulator configuration can be omitted.

Example of the tsim.cfg file:

5 Restrictions

Facilities for background mode, tracing and coverage are absent in the simulator version of CrossView Pro. As a consequence, the CrossView Pro commands CB, st, u, ugdb and wt for background mode, are not available. Because this is a simulator, the >& command to record target communication and the o command for transparency mode are not available. The simulator version of the debugger does not support command line function calling. Also Coverage is not supported. As a consequence, the CrossView Pro commands ce, cd, covinfo, nC, nU, pC, and pU are not available.

Menu and dialog items related to the mentioned commands are disabled (grayed out).


Copyright © 2002 Altium BV