User`s manual

Rabbit 4000 Designer’s Handbook rabbit.com 25
5.2 Memory Segments
From the point of view of a Dynamic C programmer, there are a number of different uses of memory. Each
memory use occupies a different segment in the logical 16-bit address space. The four segments are shown
in Figure 5-1.
Figure 5-1 Memory Map of 16-bit Logical Address Space
The figure above shows that the segments of the 16-bit logical address space map to the physical address
space. The extended register set and additional 32 bit registers provided by the Rabbit 4000 make it easy to
access the physical memory directly, bypassing the logical to physical mapping and allowing linear access
of up to 16 MB. The size of the physical address space is determined by the quadrant size.
The quadrant size is determined by the MMU Expanded Code Register (MECR). This register contains the
Bank Select Address setting. The Bank Select Address represents the two most significant bits of the phys-
ical address that will be used to select amony the different quadrants. By default, the MECR selects A19
and A18, thus leaving 18 bits for the address, which results in a quadrant size of 256 KB. Table 5-1 shows
the possible MECR values and the resulting quadrant sizes.
Logical Address Space
0x0000
Xmem Segment
0xFFFF
0xE000
Physical Address Space
0x000000
0x1FFFFF
0x2FFFFF
0x3FFFFF
0x0FFFFF
0x060000
Base Segment
Data Segment
Stack Segment
0xD000
Quadrant 0
Quadrant 1
Quadrant 2
Quadrant 3
0x6000
MMU Register Value
MECR = 0x40
Root Code
Stack
Root Data, etc.
Xmem Window