Скачиваний:
27
Добавлен:
17.04.2013
Размер:
190.65 Кб
Скачать

12 Programming Model

The ADSP-21xx registers are shown in Figure 12.1. Not all of these registers are available on every processor. The registers are grouped by function: data address generators (DAGs), program sequencer, computational units (ALU, MAC and shifter), bus exchange (PX), memory interface, timer, SPORTs, host interface and DMA interfaces.

12.1.1Data Address Generators

DAG1 and DAG2 each have twelve 14-bit registers: four index (I) registers for storing pointers, four modify (M) registers for updating pointers and four length (L) registers for implementing circular buffers. DAG1 addresses data memory only and has the capability of bit-reversing its outputs. DAG2 addresses both program and data memory and can provide addresses for indirect branching (jumps and calls) as well as for accessing data.

For example:

AX0=DM(I0,M0);

is an indirect data memory read from the location pointed to by I0. Once the read is complete, I0 is updated by M0.

PM(I4,M5)=MR1;

is an indirect program memory data write to the address pointed to by I4 with a post modify by M5. The instruction

JUMP (I4);

is an example of an indirect jump.

12.1.1.1 Always Initialize L Registers

The ADSP-21xx processors allow two addressing modes for data memory accesses: direct and register indirect. Indirect addressing is accomplished by loading an address into an I (index) register and specifying one of the available M (modify) registers.

The L registers are provided to facilitate wraparound addressing of circular data buffers. A circular buffer is only implemented when an L register is set to a non-zero value. For linear (i.e. non-circular) indirect addressing, the L register corresponding to the I register used must be set to zero. Do not assume that the L registers are automatically initialized or may be ignored; the I, M, and L registers contain random values following processor reset. Your program must initialize the L registers corresponding to any I registers it uses.

12 – 2

Programming Model 12

Processor Core

 

 

 

 

 

 

 

 

DATA ADDRESS GENERATORS

 

 

 

 

 

 

 

DAG1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DAG2

 

 

 

 

 

 

 

 

 

 

 

 

(DM addressing only)

 

 

 

(DM and PM addressing)

Bit-reverse capability

 

 

 

 

 

 

 

 

 

Indirect branch capability

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I0

 

 

 

L0

 

 

 

 

M0

 

 

 

 

 

 

 

I4

 

 

L4

 

 

 

M4

 

 

 

 

 

 

 

 

 

 

L1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I1

 

 

 

 

 

 

 

M1

 

 

 

 

 

 

 

I5

 

 

L5

 

 

 

M5

 

 

 

 

I2

 

 

 

L2

 

 

 

 

M2

 

 

 

 

 

 

 

I6

 

 

L6

 

 

 

M6

 

 

 

 

 

 

 

 

 

 

L3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I3

 

 

 

 

 

 

 

M3

 

 

 

 

 

 

 

I7

 

 

L7

 

 

 

M7

 

14

14

 

 

 

 

14

 

 

 

 

 

 

14

 

 

 

 

14

 

 

 

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PROGRAM SEQUENCER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

18

 

 

 

 

 

 

5

 

 

 

 

 

 

 

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LOOP

 

 

 

ICNTL

 

 

 

 

PC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

STACK

 

 

 

 

 

 

 

 

 

 

 

 

 

STACK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4 X 18

 

 

 

 

 

 

 

 

 

 

 

 

 

16 X 14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IFC*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OWRCNTR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSTAT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CNTR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

COUNT

 

 

 

IMASK*

MSTAT*

 

 

ASTAT

 

 

 

 

 

 

 

 

 

 

 

STACK

 

 

 

 

 

 

 

STATUS STACK*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4 X 14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

* Width and depth vary with processor

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ALU

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MAC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AX0

 

 

AX1

 

 

 

 

AY0

 

 

AY1

 

 

 

 

 

MX0

 

MX1

 

 

MY0

 

MY1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

16

 

 

16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AR

 

 

 

 

AF

 

 

 

 

 

 

 

 

 

MR2

 

 

MR1

 

MR0

 

 

 

 

MF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SHIFTER

 

 

 

 

 

 

 

 

 

 

BUS EXCHANGE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

 

 

 

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SI

 

 

 

SE

 

 

 

SB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SR1

 

 

SR0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TIMER

0x3FFD TPERIOD

0x3FFC TCOUNT

0x3FFB TSCALE

SPORT 0

RX0

 

TX0

 

 

 

Multichannel enables

0x3FFA

RX 31-16

 

 

0x3FF9

RX 15-0

 

 

0x3FF8

TX 31-16

 

 

0x3FF7

TX 15-0

 

 

SPORT0 Control

0x3FF6 Control

0x3FF5 SCLKDIV

0x3FF4 RFSDIV

0x3FF3 Autobuffer

SPORT 1

RX1 TX1

SPORT1 Control

0x3FF2 Control

0x3FF1 SCLKDIV

0x3FF0 RFSDIV

0x3FEF Autobuffer

MEMORY INTERFACE

0x3FFF

System Control

Register

 

 

 

0x3FFE

Wait States

 

 

 

(ADSP-2181)

3

3

DMOVLAY PMOVLAY

ANALOG INTERFACE

(ADSP-21msp5x)

 

 

 

0x3FEF

Autobuffer

 

 

 

 

0x3FEE

Control

 

 

 

 

0x3FED

ADC Receive

 

 

 

 

0x3FEC

DAC Transmit

 

 

 

 

 

 

 

 

HOST INTERFACE PORT

 

 

IDMA PORT

 

 

 

 

 

BDMA PORT

 

 

(ADSP-2171, ADSP-2111, ADSP-21msp5x)

 

 

PROGRAMMABLE FLAGS

 

 

 

 

 

 

 

 

 

 

(ADSP-2181)

 

 

0x3FE8

 

 

 

 

Data Registers

 

 

 

 

 

HMASK

 

0x3FE5

 

 

 

 

 

IDMA Registers

 

BDMA Registers

 

 

 

 

 

HDR5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status Registers

0x3FE4

 

HDR4

 

 

0x3FE0

IDMA Control

 

0x3FE4

BWCOUNT

 

 

 

 

 

Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0x3FE3

BDMA Control

 

0x3FE7

 

HSR7

 

0x3FE3

 

HDR3

 

 

 

Programmable

 

 

 

 

 

 

 

 

 

 

 

 

0x3FE6

 

HSR6

 

 

 

 

 

 

 

0x3FE2

BEAD

 

 

 

 

 

 

 

 

 

 

 

 

0x3FE2

 

HDR2

 

 

 

Flag Registers

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0x3FE1

BIAD

 

 

 

 

 

0x3FE1

 

HDR1

 

 

0x3FE6

PFTYPE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0x3FE0

 

HDR0

 

 

0x3FE5

PFDATA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 12.1 ADSP-21xx Registers

12 – 3

 

Shading denotes secondary (alternate) registers. Registers are 16 bits wide (unless otherwise marked).

Соседние файлы в папке Документация по ЦСП Analog Devices