User`s manual
Rabbit 4000 Designer’s Handbook rabbit.com 29
5.3 Separate I&D Space
Separate instruction and data space is a hardware memory management scheme that uses address line
inversion to double the amount of logical address space in the base and data segments. In other words, this
doubles the amount of root code and root data available for an application program.
Without separate I&D space, recall that in a typical memory map of the 16-bit address space, the base seg-
ment holds a mixture of code and constants and is mapped to flash; the data segment holds C variables and
is mapped to RAM. With separate I&D space, code and data no longer have to divide this space because
they share logical addresses by inverting address lines depending on whether the CPU is fetching instruc-
tions or data.
The drawing in Figure 5-2 shows the logical address space when separate I&D space is both enabled and
disabled. Typical SEGSIZE values are shown. The boundary at 0x3000 (and 0x6000) is determined by the
macro ROOT_SIZE_4K in the BIOS. The value of this macro is the number of 4 kilobyte pages used for
the base segment. The boundary may be changed, but care must be taken. To change the boundary, define
ROOT_SIZE_4K to the desired number of 4K pages on the “Defines” tab in Options | Project Options.
Figure 5-2 16-Bit Logical Address Space
NOTE: This diagram illustrates how separate I&D space works; the actual values used in the
BIOS may differ from those shown here.
XMEM Segment
Stack Segment
Data Segment
Base Segment
Data Segment
Instruction Space
Data Segment
Data Space
0xCFFF
0xCFFF
0x0000
0x0000 0x0000
0xD000
(Root Code)
(Root Data)
Base Segment
(Root Code)
Base Segment
(Constants)
0x6000
0x3000
0x3000
0xFFFF
Separate I&D Space: Disabled
SEGSIZE = D6
Separate I&D Space: Enabled
SEGSIZE = D3
Common Space
Stack
XMEM
0xFFFF
0xD000