dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 226

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Address Generation Unit
In addition, the pointer register does not need to be incremented. Instructions that post-decrement the
buffer pointer also work correctly. Executing the instruction
is $0800 will correctly set R0 to $0804.
6.8.7
The following steps detail the process of setting up and using the 37-location circular buffer that is shown
in Figure 6-8 on page 6-22.
6-32
1. Determine the value for the M01 register.
2. Find the nearest power of two that is greater than or equal to the circular buffer size. In this
3. From k, derive the characteristics of the lower boundary of the circular buffer. Since the k
4. Locate the circular buffer in memory.
— Select the size of the desired buffer; it can be no larger than 16,384 locations. If modulo
— If modulo arithmetic is to be enabled for both the R0 and R1 address registers, be sure to set the
example, the value would be 2
number of least significant bits of the address of the lower boundary must all be zeros, then
the buffer base address must be some multiple of 2
is some multiple of 2
— The location of the circular buffer in memory is determined by the upper (24 – k) bits of the
— The exact area of memory in which a circular buffer is prepared is specified by picking a value
Setting Up a Modulo Buffer
MOVEU.W
MOVEU.W
NOP
NOP
MOVE.W
MOVE.W
MOVE.W
MOVE.W
arithmetic is to be enabled only for the R0 address register, the result is the following:
M01 = # locations – 1 = 37 – 1 = 36 = $0024
high-order bit of M01. In this case:
M01 = # locations – 1 + $8000 = 37 – 1 + 32768 = 32804 = $8024
address pointer register that is used in a modulo arithmetic operation. For example, if there is
an open area of memory from locations 111 to 189 ($006F to $00BD), then the addresses of the
lower and upper boundaries of the circular buffer will fit in this open area for J = 2:
Lower boundary = (J × 64) = (2 × 64) = 128 = $0080
Upper boundary = (J × 64) + 36 = (2 × 64) + 36 = 164 = $00A4
for the address pointer register, R0 or R1, whose value is inclusively between the desired lower
and upper boundaries of the circular buffer. Thus, selecting a value of 139 ($008B) for R0
would locate the circular buffer between locations 128 and 164 ($0080 to $00A4) in memory
since the upper 18 (from a total of 24 – k) bits of the address indicate that the lower boundary
is 128 ($0080).
Example 6-12. Accessing the Circular Buffer with Post-Update by Three
#$0800,R0
#3,N
X:(R0)+N,X0
X:(R0)+N,X0
X:(R0)+N,X0
X:(R0)+N,X0
6
= 64.
DSP56800E Core Reference Manual
k
≥ 37, which gives a value of k = 6.
; Initialize the pointer to $0800
; Initialize “bump value” to 3
; First time accesses location $0800
; and bumps the pointer to location $0803
; Second accesses at location $0803
; and wraps the pointer around to $0801
; Third accesses at location $0801
; and bumps the pointer to location $0804
; Fourth accesses at ...
k
. In this case, k = 6, so the base address
MOVE.W X:(R0)-,X0
Freescale Semiconductor
when the value of R0

Related parts for dsp56800e