Hi,
All types of RAM you described are physicaly seperated (they are accessed
through different busses). The CPU uses the '0x02', '0x03' (etc.) to
determine which chip you want to access. The lower bits will then be used as
an offset within the RAM/VRAM/ROM/I.O. registers you selected.
Other areas include: System ROM (0x00), Palette RAM (0x05), VRAM (0x06),
Sprite VRAM (0x07), Game ROM/Flash memory (0x08, 0x0A, 0x0C) and Game RAM
(0x0E).
The 32kB of RAM you mentioned (connected to a 32-bit bus) is the fastest
(both for random and sequential access, 1 wait-state). Use it to store 32
bit variables which are frequently used and 32 bit routines (ARM code).
The 256 kB of RAM (connected to a 16-bit bus) is slower than that; both
random and sequential access cost 2 wait-states (per 16 bit chunk). Use it
to store 16 bit variables or 32 bit variables which are not accessed that
often. If required you can also store executable code here (you'll need it
for multiboot for instance), but make sure it's Thumb code (16 bit per
instruction).
For comparison: ROM also uses a 16-bit bus and needs 3 waitstates for random
access. 1 waitstate for sequential access (this can be configured, though).
Note that there's a prefetch buffer available which can speed up the ROM
accesses.
To illustrate the difference:
reading 64 bits of ROM = 3+1+1+1 = 6 waitstates.
reading 64 bits of 32kB RAM = 1+1 = 2 waitstates.
reading 64 bits of 256kB RAM = 2+2+2+2 = 8 waitstates
Greetings,
Jan-Lieuwe
> I was looking at the memory map of the GBA (as in page two of
>
http://www.ziegler.desaign.de/GBA/gameboy_advance_for_nongaming_applications.pdf\
)
> and I guess I don't understand the convention. For instance:
>
> External 0x02000000 256 KB 16 bits
>
> Internal 0x03000000 32 KB 32 bits
>
> IO Ram 0x04000000 1 KB 32 bits
>
> Why does there seem to be equal distances between unequal sizes of
> memory? Are the addresses just arbitrary labels? Or do they refer to
> actual locations in the physical memory?