Datasheet
ARMulator Basics
2-36 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI0058D
2.10.6 Stack tracker
The stack tracker examines the contents of the stack pointer (r13) after each instruction.
It keeps a record of the lowest value and from this it can work out the maximum size of
the stack. ARMulator runs more slowly with stack tracking enabled.
The
StackUse
model continually monitors the stack pointer and reports the amount of
stack used in $statistics. It must be configured with the location of the stack.
The stack tracker is disabled by default. To enable the stack tracker, edit your copy of
default.ami
:
1. Find the line:
{ StackUse=No_StackUse
2. Change it to:
{ StackUse=Default_StackUse
Before initialization the stack pointer can contain values outside the stack limits. You
must configure the stack limits so that the stack tracker can ignore these
pre-initialization values. This configuration is in
peripherals.ami
:
{ Default_StackUse=StackUse
StackBase=0x80000000
StackLimit=0x70000000
}
StackBase
is the address of the top of the stack.
StackLimit
is a lower limit for the stack.
Changing these values does not reposition the stack in memory. To reposition the stack,
you must reconfigure the debug monitor model.
2.10.7 Tube
The tube is a memory-mapped register. If you write a printable character to it, the
character appears on the console. It allows you to check that writes are taking place to
a specified location in memory.
You can change the address at which the Tube is mapped. This is controlled by an entry
in
peripherals.ami
:
{Default_Tube=Tube
Range:Base=0x0d800020
}
This is the default address.