Analog Devices adsp-2100 Manual page 289

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

12 Programming Model
The subroutine begins by loading the counter register (CNTR). The new
sample is read from SPORT0's receive data register, RX0, into the SI
register; the choice of SI is of no particular significance. Then, the data is
written into the data buffer. Because of the automatic circular buffer
addressing, the new data overwrites the oldest sample. The N-most recent
samples are always in the buffer.
The fourth instruction of the routine, MR=0, MY0=PM(I4,M4),
MX0=DM(I0,M0), zeroes the multiplier result register (MR) and fetches
the first two operands. This instruction accesses both program and data
memory but still executes in a single cycle because of the processor's
architecture.
The convolution label identifies the loop itself, consisting of only two
instructions, one setting up the loop (DO UNTIL) and one "inside" the
loop. The MAC instruction multiplies and accumulates the previous set of
operands while fetching the next ones from each memory. This instruction
also accesses both memories.
The final value is transferred back to SPORT0, to the transmit data register
TX0, to be sent to the communicating device.
12 – 12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents