dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 216

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Address Generation Unit
When modulo arithmetic is performed on the buffer pointer register, only the low-order k bits are
modified; the upper 24 – k bits are held constant, fixing the address range of the buffer. The algorithm used
to update the pointer register (R0 in this case) is as follows:
Note that this algorithm can result in some memory addresses being inaccessible using modulo addressing.
If the size of the buffer is not an even power of two, there is a range of addresses between M and 2
and 63 in the preceding example) that are not addressable. Section 6.8.9.3, “Memory Locations Not
Accessible Using Modulo Arithmetic,” discusses this issue in greater detail.
6.8.3
As noted in Section 6.8.2, “Understanding Modulo Arithmetic,” modulo arithmetic is enabled through
programming the address modifier register, M01. This single register enables modulo arithmetic for both
the R0 and R1 registers. However, in order for modulo arithmetic to be enabled for the R1 register, it must
be enabled for the R0 register as well. When both pointers use modulo arithmetic, the sizes of both buffers
are the same. The pointers can refer to the same or different buffers as desired.
6.8.3.1
Modulo arithmetic affects not only the arithmetic used in calculating effective addresses for move
instructions, but it also affects the AGU arithmetic instructions. Table 6-6 shows how the M01 register is
correctly programmed for instructions that perform byte or word memory accesses as well as for the AGU
arithmetic instructions.
For byte memory accesses:
6-22
R0[23:k] = R0[23:k]
R0[k–1:0] = (R0[k–1:0] + offset) MOD (M01 + 1)
Modulo arithmetic is performed on byte addresses.
M01 = (size of the buffer in bytes) – 1.
Configuring Modulo Arithmetic
Configuring for Byte and Word Accesses
Upper Boundary: $00A4
Lower Boundary: $0080
$00B0
$009F
Figure 6-8. 37-Location Circular Buffer
DSP56800E Core Reference Manual
(Unavailable
Addresses)
Memory
Circular
Buffer
Lower Bound + Size – 1 = Upper Bound
Initial R0 Pointer Value
Lower Bound Relative to R0
Freescale Semiconductor
k
– 1 (37

Related parts for dsp56800e