Вы находитесь на странице: 1из 16

Addressing modes

Determines how one access memory


Addressing refers to means to specify location of
operands for instructions
- types of addressing are called addressing modes
- operands may be input operands for the operation as
well as
results of the operation
Addressing modes supported by the TMS320C67x
include
register-indirect,
indexed register-indirect,
and modulo addressing (circular addressing).
Immediate data is also supported.
The TMS320C67x does not support modulo addressing
for 64-bit data.

Immediate
The operand is part of
the instruction
Register
The operand is specified
in a register
Direct
The address of the
operand is part of the
instruction (added to
imply memory page)
Indirect
The address of the
operand is stored in a
register

ADD .L1 -13,A1,A6

(implied)

ADD .L1 A7,A6,A7

not supported

LDW .L1 *A5++[8],A1

Register-Indirect Addressing

Operand is located in memory address stored in a


register
Special group of registers can be used to store
addresses
(address registers)
Most important addressing mode in DSPs
Efficient from instruction set point of view
Few bits are needed to indicate address of operand
32 registers(A0-A15,B0-B15) are used as pointers

Indirect addressing uses in conjunction with one of


*
the 32 registers

1. *R

location

register R contains address of a memory

where a data value is stored


2. *R++ (d) - register R contains memory address

- after the memory address is used, R is

R+1 if d=1
d-1

postincremented such that new address is


- double minus (- -) update the address by

++ R(d) - address is preincremented or offset by d


- current address is R+d or R-d
4. *
+ R(d) - address is preincremented by d, such that
the current
address is R+d

- however R pre increments without


modification

- unlike previous case, R is not updated or


modified
3.

Delay Line implemented with


shifting of sample

Delay Line pointer manipulation


using Circular Addressing

Circular addressing
Circular addressing is used to create a circular buffer
Buffer is created in hardware and is very useful for
applications like digital filtering
This addressing mode in conjunction with circular buffer
updates samples by shifting data without creating
overhead as in direct shifting
When pointer reaches bottom location, and when
incremented the pointer is automatically wrapped around
to the top location.
Two independent buffers are available using BK0 and BK1
within the AMR register
Registers A4-A7 and B4-B7 in conjunction with .D unit can
be used as pointers
MVC (move constant) is the only instruction to access AMR
and other control registers

Circular Buffer
At the beginning of each
sample period,
a new sample will be read
into the circular
buffer,overwriting the oldest
sample.
The newest sample x(n) will
be stored at the memory
location pointed at by
auxiliary register AR(i).

The need of processing the digital signals in real time,


evolves the concept of Circular Buffering.
Circular buffers are used to store the most recent
values of a continually updated signal.
Circular buffering allows processors to access a block
of data sequentially and then automatically wrap
around to the beginning address exactly the pattern
used to access coefficients in FIR filter.
Circular buffering also very helpful in implementing
first-in, first-out buffers, commonly used for I/O and for
FIR delay lines.
Most DSP Implement Circular addressing in hardware
in order to conserve memory and minimizing software
overhead.

Addressing Mode Register


(AMR)
For each of the eight registers (A4A7, B4B7) that can
perform linear or circular addressing, the addressing
mode register (AMR) specifies the addressing mode.
A 2-bit field for each register selects the address
modification mode: linear (the default) or circular
mode.
With circular addressing, the field also specifies which
BK (block size) field to use for a circular buffer.
In addition, the buffer must be aligned on a byte
boundary equal to the block size.

AMR mode and description


Mode
description
00
for linear addressing
01
for circular addressing using BK0

For circular addressing using BK1

reserved

Block size = 2N+1 bytes

Вам также может понравиться