Local data memory – Texas Instruments TMS320C2XX User Manual
Page 69
Local Data Memory
4-7
Memory and I/O Spaces
4.3
Local Data Memory
The local data-memory space addresses up to 64K 16-bit words. Every ’C2xx
device has three on-chip DARAM blocks: B0, B1, and B2. Block B0 has 256
words that are configurable as either data locations or program locations.
Blocks B1 (256 words) and B2 (32 words) have a total of 288 words that are
available for data memory only. Some ’C2xx devices, in addition to the three
DARAM blocks, have an on-chip SARAM block that can be used for program
and/or data memory. Section 4.8 tells how to configure these memory blocks.
Data memory can be addressed with either of two addressing modes: direct-
addressing mode or indirect-addressing mode. Addressing modes are de-
scribed in detail in Chapter 6.
When direct addressing is used, data memory is addressed in blocks of 128
words called data pages. Figure 4–2 shows how these blocks are addressed.
The entire 64K of data memory consists of 512 data pages labeled 0 through
511. The current data page is determined by the value in the 9-bit data page
pointer (DP) in status register ST0. Each of the 128 words on the current page
is referenced by a 7-bit offset, which is taken from the instruction that is using
direct addressing. Therefore, when an instruction uses direct addressing, you
must specify both the data page (with a preceding instruction) and the offset
(in the instruction that accesses data memory).
Figure 4–2. Pages of Data Memory
’C2xx Data Memory
Page 0: 0000h–007Fh
Page 1: 0080h–00FFh
Page 2: 0100h–017Fh
Page 511: FF80h–FFFFh
.
000 0000
Offset
DP value
0000 0000 0
111 1111
0000 0000 0
0000 0000 1
0000 0000 1
1111 1111 1
1111 1111 1
000 0000
111 1111
000 0000
111 1111
0000 0001 0
000 0000
111 1111
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0000 0001 0
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.