User`s manual

Dynamic C Users Manual digi.com 125
9. MEMORY MANAGEMENT
Processor instructions can specify 16-bit addresses, giving a logical address space of 64K (65,536 bytes).
Dynamic C supports a physical address space of 1 MB on all Rabbit-based boards. Dynamic C has been
verified to work with Rabbit-based boards with 4.5 MB of memory.
An on-chip memory management unit (MMU) translates 16-bit addresses to 20-bit memory addresses for
Rabbit 2000- and 3000-based boards. Four MMU registers (SEGSIZE, STACKSEG, DATASEG and XPC)
divide and maintain the logical sections and map each section onto physical memory.
Any memory beyond the 16-bit address capability of the processor, whether flash or RAM, is called xmem
and requires memory management techniques for access.
9.1 Memory Map
A typical Dynamic C memory mapping of logical and physical address space is shown in the figure below.
The actual layout may be different depending on the Rabbit processor used, the board type and which
compilation options are selected. For example, enabling separate I&D space will affect the memory map.
Figure 9.1 Dynamic C Memory Mapping with a Rabbit 2000- or 3000-Based Board
Figure 9.1 illustrates how the logical address space is divided and where code resides in physical memory.
Both the static RAM and the flash memory are 128K in the diagram. Physical memory starts at address
0x00000 and flash memory is usually mapped to the same address. SRAM typically begins at address
0x80000.
0xCC00
0xCE00
0xD000
0xCF00
Logical Address Space
0x0000
Xmem Segment
0xFFFF
0xE000
Physical Address Space
0x00000
0x80000
0xA8000
0xA9000
0xB1000
0xBE000
0xFFFFF
Root Code
Xmem Code
Flash
Memory
RAM
Watch Code
External Interrupt
Vectors
Internal Interrupt
Vectors
(from Xmem Segment)
Additional xmem,
unused by Root
UNUSED
Base Segment
(Root Code)
Data Segment
(Root Data)
Stack Segment
0xCC00
0xD000
Root Data
Interrupt Vectors,
Watch Code
Stack