dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 66

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Types and Addressing Modes
3.4.5.1
In order to access the different sizes of data that are supported by the DSP56800E, the instruction set
supports two types of addresses: byte and word. Word addresses can be used to access byte (8-bit), word
(16-bit), or long-word (32-bit) values in memory. Byte addresses are used only for accessing bytes.
In general, the DSP56800E data memory map can be thought of as 2
word pointers are used, the address selects for use one of the bytes of the word, the complete word, or two
words when a long-word access is performed. Byte pointers select both the word in the memory map to
access and the desired byte within the word. Figure 3-8 shows the two types of pointers.
Bits 23–1 of a byte address select the word in the memory map that is to be accessed. The LSB selects the
byte within that word. If the LSB is zero, the lower byte within the word is selected; if the LSB is one, the
upper byte is selected.
Note that, because there are only 23 word-select bits in a byte pointer, byte variables can only be located in
the lower 2
3.4.5.2
Byte variables can be allocated anywhere in the lower half of the 24-bit data memory space, since the
24-bit address used for accessing bytes can only access the lower 2
Although byte variables can be located at any address, the DSP56800E assembler only allows byte labels
on word (even) address boundaries. When a label is used to name a byte variable location, the assembler
will force the address of the variable to be even. When a byte is allocated statically or globally using a
label, it will use up 16 bits and will be located in the least significant 8 bits.
Example 3-6 on page 3-17 shows the
data memory. The variables thus created are referenced by the word address labels
X:BYTVAR2
3-16
23
. For each variable, the byte is located in the least significant 8 bits of the word.
Byte and Word Addresses
Byte Variable Alignment
locations in the data memory map.
23
23
Figure 3-8. Structure of Byte and Word Addresses
Word pointers can access bytes, words, or long words.
DSP56800E Core Reference Manual
Word Address
ds
16 15
16 15
Byte pointers can access bytes only.
assembler directive being used to allocate 1 word of uninitialized
Word Pointer
Byte Pointer
Word Address
Upper or Lower Byte Select
8
8
7
7
23
24
words in data memory.
contiguous 16-bit words. When
Freescale Semiconductor
1
X:BYTVAR1
1
0
0
and

Related parts for dsp56800e