5.3.4.1 Register Trace Setup

Different Registers (SFRs) and Global Variables information can be displayed in this window. The change in value of a selected Register or global variable is recorded against the simulation cycle when the change occurred. If more than one variable is selected, at least one variable should change for that change to be recorded against that simulation cycle.

Note: Register trace supports only native size variables, i.e., an 8-bit device can only watch 8-bit variables, etc.

To add an SFR:

  1. Click the column header “Click here to add/remove trace variables”.
    Figure 5-4. Add or Remove Trace Variables
  2. Select SFRs Only from the Drop Down.
    Figure 5-5. Adding SFRs
  3. To add SFRs, select the SFR in the Available Registers list and click the right arrow to move it to the Selected Registers column. Do this for each SFR you want to add.
  4. Click OK to see the final set of SFRs listed as columns in the window.

To add a global variable:

  1. Global Variables would be identified only during a Debug Session.
  2. Enter a Debug Session and Pause.
  3. Click the column header “Click here to add/remove trace variables”.
  4. Select Global Only from the Drop Down.
  5. Add the required Global Variables.
    Figure 5-6. Adding Global Variables
  6. Click OK to see the final set of variables listed as columns in the window.
    Figure 5-7. Result of Adding SFRs and Global Variables

To remove register variables:

To remove SFRs or global variables, select the variable you want to remove in the Selected Registers column and click the left arrow to move it to the Available Registers column.

To set the number of records:

Click the Register Trace Settings icon

to open the settings dialog (see figure below). Type the maximum number of records that need to be recorded. Only the recent most records of the selected maximum will be displayed.

Figure 5-8. Register Trace Settings Dialog

To save the record data to a file:

Click the Save Register Trace Data to a CSV File icon

and save the register trace information to a comma separated file to a selected location.

To Clear All Data:

Click the Discard Trace History icon

to discard the information that is recorded so far.

To Change the Numeric Format of Displayed Data:

Click the Select Numeric Format icon

to change the display format of the recorded data (see figure below).

Figure 5-9. Register Trace Format