Modulo Modifier - Motorola DSP56000 Manual

24-bit digital signal processor
Hide thumbs Also See for DSP56000:
Table of Contents

Advertisement

ADDRESSING
difference between these two data representations. Addresses are normally considered
unsigned, and data is normally considered signed.
4.4.2.2

Modulo Modifier

When the value in the modifier register falls into one of two ranges (Mn=$0001 to $7FFF
or Mn= $8001 to $BFFF with the reserved gaps noted in the table), address modification
is performed using modulo arithmetic (see Table 4-2).
Modulo arithmetic normally causes the address register value to remain within an address
range of size M, whose lower boundary is determined by Rn. The upper boundary is de-
termined by the modulus, or M. The modulus value, in turn, is determined by Mn, the value
in the modifier register (see Figure 4-11).
There are certain cases where modulo arithmetic addressing conditions may cause the
address register to jump linearly to the same relative address in a different buffer. Other
cases firmly restrict the address register to the same buffer, causing the address register
to wrap around within the buffer. The range in which the value contained in the modifier
register falls determines how the processor will handle modulo addressing.
4.4.2.2.1
Mn=$0001 to $7FFF
In this range, the modulus (M) equals the value in the modifier register (Mn) plus 1. The
memory buffer's lower boundary (base address) value, determined by Rn, must have ze-
k
k
ros in the k LSBs, where 2
M, and therefore must be a multiple of 2
. The upper
boundary is the lower boundary plus the modulo size minus one (base address plus M–
k
1). Since M
2
, once M is chosen, a sequential series of memory blocks (each of length
k
k
2
) is created where these circular buffers can be located. If M<2
, there will be a space
k
between sequential circular buffers of (2
)–M.
For example, to create a circular buffer of 21 stages, M is 21, and the lower address
k
boundary must have its five LSBs equal to zero (2
21, thus k
5). The Mn register is
loaded with the value 20. The lower boundary may be chosen as 0, 32, 64, 96, 128, 160,
etc. The upper boundary of the buffer is then the lower boundary plus 21. There will be an
unused space of 11 memory locations between the upper address and next usable lower
address. The address pointer is not required to start at the lower address boundary or to
end on the upper address boundary; it can initially point anywhere within the defined mod-
ulo address range. Neither the lower nor the upper boundary of the modulo region is
stored; only the size of the modulo region is stored in Mn. The boundaries are determined
by the contents of Rn. Assuming the (Rn)+ indirect addressing mode, if the address reg-
ister pointer increments past the upper boundary of the buffer (base address plus M–1),
it will wrap around through the base address (lower boundary). Alternatively, assuming
the (Rn)- indirect addressing mode, if the address decrements past the lower boundary
MOTOROLA
ADDRESS GENERATION UNIT
4 - 17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56k

Table of Contents