- •Preface
- •About this document
- •Intended audience
- •Organization
- •Typographical conventions
- •Timing diagram conventions
- •Further reading
- •ARM publications
- •Feedback
- •Feedback on this document
- •Feedback on the ARM PrimeCell Audio CODEC Interface (PL040)
- •Introduction
- •1.1 About the ARM PrimeCell Audio CODEC Interface (PL040)
- •1.1.1 Features of the PrimeCell ACI
- •1.1.2 An example CODEC interface
- •1.2 AMBA compatibility
- •Functional Overview
- •2.1 ARM PrimeCell Audio CODEC Interface (PL040) overview
- •2.2 PrimeCell ACI functional description
- •2.2.1 AMBA APB interface and register block
- •2.2.2 Frequency divider
- •2.2.3 Transmit FIFO
- •2.2.4 Receive FIFO
- •2.2.5 Transmit logic
- •2.2.6 Receive logic
- •2.2.7 Interrupt generation logic
- •2.2.8 Synchronizing registers and logic
- •2.2.9 Test registers and logic
- •2.3 PrimeCell ACI operation
- •2.3.1 Interface reset
- •2.3.2 Clock signals
- •2.3.3 PrimeCell ACI operation
- •2.3.4 System loopback testing
- •Programmer’s Model
- •3.1 About the programmer’s model
- •3.2 Summary of PrimeCell ACI registers
- •3.3 Register descriptions
- •3.3.1 ACIDR: [8] (+ 0x00)
- •3.3.2 ACICR: [5] (+ 0x04)
- •3.3.3 ACISR: [8] (+0x08)
- •3.3.4 ACICDR_L: [8] (+ 0x0c)
- •3.3.5 ACICDR_H: [2] (+ 0x10)
- •3.4 Interrupts
- •3.4.1 Interrupt generation logic
- •Programmer’s Model for Test
- •4.1 PrimeCell ACI test harness overview
- •4.2 Scan testing
- •4.3 Test registers
- •4.3.2 ACITCR [5] (+0x80)
- •4.3.3 ACITMR [3] (+0x84)
- •4.3.4 ACITISR [1] (+0x88)
- •4.3.5 ACITOCR [4] (+0x8c)
- •4.3.6 ACITCDR_L [8] (+0x90)
- •4.3.7 ACITCDR_H [2] (+0x94)
- •A.1 AMBA APB signals
- •A.2 On-chip signals
- •A.3 Signals to pads
Programmer’s Model
3.3Register descriptions
The following registers are described in this section:
•ACIDR: [8] (+ 0x00)
•ACICR: [5] (+ 0x04) on page 3-5
•ACISR: [8] (+0x08) on page 3-6
•ACICDR_L: [8] (+ 0x0c) on page 3-6
•ACICDR_H: [2] (+ 0x10) on page 3-7.
For each of the following register descriptions, the format of the title is:
Register name: [bit width] (Offset from Base).
3.3.1ACIDR: [8] (+ 0x00)
ACIDR is the data register and is a read/write register that is 8 bits wide. This register is undefined at reset since the FIFO registers are not reset. This is to simplify the use of compiled memory cells in place of the FIFO register files, for optional block customization. Table 3-2 shows the bit assignments for the ACIDR.
|
|
|
Table 3-2 ACIDR register |
|
|
|
|
Bits |
Name |
Type |
Function |
|
|
|
|
7:0 |
DATA |
Read/write |
Read data value from receive FIFO. |
|
|
|
Write data value to transmit FIFO. |
|
|
|
|
3-4 |
© Copyright ARM Limited 1999. All rights reserved. |
ARM DDI 0146C |
Programmer’s Model
3.3.2ACICR: [5] (+ 0x04)
ACICR is the control register and is a read/write register that controls various functions within the PrimeCell ACI. Unused bits in this location should be written as zero (have no effect) and are read as undefined. Table 3-3 shows the bit assignments for the ACICR.
|
|
|
Table 3-3 ACICR register |
|
|
|
|
Bits |
Name |
Type |
Function |
|
|
|
|
7:5 |
- |
- |
Reserved, read unpredictable, should be written as |
|
|
|
0. |
|
|
|
|
4 |
Loopback mode |
Read/ |
If this is set to 1, loopback test mode is enabled. |
|
(LOOP) |
write |
Defaults to 0 when reset by BnRES. |
|
|
|
Ensure this bit is always 0 for normal operation. |
|
|
|
|
3 |
Transmit Interrupt |
Read/ |
If this bit is set to 1, the transmit interrupt is |
|
Enable (TIE) |
write |
enabled. |
|
|
|
Defaults to 0 when reset by BnRES. |
|
|
|
|
2 |
Receive Interrupt |
Read/ |
If this bit is set to 1, the receive interrupt is |
|
Enable (RIE) |
write |
enabled. |
|
|
|
Defaults to 0 when reset by BnRES. |
|
|
|
|
1 |
Transmit Enable |
Read/ |
If this bit is set to 1, the transmit logic is enabled. |
|
(TXEN) |
write |
When cleared to 0 the transmit system is disabled. |
|
|
|
Defaults to 0 when reset by BnRES. |
|
|
|
|
0 |
Receive Enable |
Read/ |
If this bit is set to 1, the receive logic is enabled. |
|
(RXEN) |
write |
When cleared to 0 the receive system is disabled. |
|
|
|
Defaults to 0 when reset by BnRES. |
|
|
|
|
ARM DDI 0146C |
© Copyright ARM Limited 1999. All rights reserved. |
3-5 |
Programmer’s Model
3.3.3ACISR: [8] (+0x08)
ACISR is the status register and is a read only register that gives information about the transmit/receive status of the block. All the register bits are cleared to 0 when reset. Table 3-4 shows the bit assignments for the ACISR.
Table 3-4 ACISR register
Bits |
Name |
Type |
Function |
|
|
|
|
7 |
TXBUSY |
Read |
Transmit Busy, active HIGH. |
|
|
|
If set to 1, the PrimeCell ACI is busy transmitting data. |
|
|
|
This bit is cleared to 0 when the transmitter is disabled |
|
|
|
(TXEN = 0) and the transmit FIFO and shift register have |
|
|
|
both become empty. |
|
|
|
|
6 |
RXBUSY |
Read |
Receive Busy, active HIGH. |
|
|
|
If set to 1, the PrimeCell ACI is busy receiving data. |
|
|
|
This bit is cleared to 0 when the receiver is disabled |
|
|
|
(RXEN = 0) and the final data byte has been written to the |
|
|
|
receive FIFO. |
|
|
|
|
5 |
TIS |
Read |
Transmit interrupt status, active HIGH. |
|
|
|
This bit is set to 1 if the ACITXINTR transmit interrupt |
|
|
|
request is asserted HIGH. |
|
|
|
|
4 |
RIS |
Read |
Receive interrupt status, active HIGH. |
|
|
|
This bit is set to 1 if the ACIRXINTR receive interrupt |
|
|
|
request is asserted HIGH. |
|
|
|
|
3 |
TXFE |
Read |
Transmit FIFO empty flag, active HIGH. |
|
|
|
This bit is asserted HIGH if the transmit FIFO is empty. |
|
|
|
|
2 |
RXFF |
Read |
Receive FIFO full flag, active HIGH. |
|
|
|
This bit is asserted HIGH if the receive FIFO is full. |
|
|
|
|
1 |
TXFF |
Read |
Transmit FIFO full flag, active HIGH. |
|
|
|
This bit is asserted HIGH if the transmit FIFO is full. |
|
|
|
|
0 |
RXFE |
Read |
Receive FIFO empty flag, active HIGH. |
|
|
|
This bit is asserted HIGH if the receive FIFO is empty. |
|
|
|
|
3.3.4ACICDR_L: [8] (+ 0x0c)
ACICDR_L is the clock divider register, LOW byte. This is a read/write register that is loaded with the divisor LOW byte value to be used in the frequency clock divider, producing the clock ACIBITCLK at the required bit rate. The register LOW byte must
3-6 |
© Copyright ARM Limited 1999. All rights reserved. |
ARM DDI 0146C |
Programmer’s Model
be written before the HIGH byte. The clock divide value is only updated by writes to the HIGH byte register ACICDR_H. Table 3-5 shows the bit assignments for the ACICDR_L.
|
|
|
Table 3-5 ACICDR_L register |
|
|
|
|
Bits |
Name |
Type |
Function |
|
|
|
|
7:0 |
Clock Divisor LOW |
Read/write |
8-bit LOW byte divisor value used to |
|
byte (CDLDVAL_L) |
|
generate ACIBITCLK. |
|
|
|
Defaults to 0 on reset by BnRES. |
|
|
|
|
3.3.5ACICDR_H: [2] (+ 0x10)
ACICDR_H is the clock divider register, HIGH byte. This is a read/write register that is loaded with the divisor HIGH byte value to be used in the frequency clock divider, producing the clock ACIBITCLK at the required bit rate. The register LOW byte must be written before the HIGH byte. The clock divide value is only updated by writes to the HIGH byte register ACICDR_H. Table 3-6 shows the bit assignments for the ACICDR_H.
|
|
|
Table 3-6 ACICDR_H register |
|
|
|
|
Bits |
Name |
Type |
Function |
|
|
|
|
1:0 |
Clock Divisor HIGH |
Read/write |
2-bit HIGH byte divisor value used to |
|
byte (CDLDVAL_H) |
|
generate ACIBITCLK. |
|
|
|
Defaults to 0 on reset by BnRES. |
|
|
|
|
CDLDVAL_H and CDLDVAL_L are concatenated to obtain the value CDLVAL, which is loaded into the clock divider counter. The clock divider counter is used to divide the ACICLK clock to produce the bit clock ACIBITCLK.
ACIBITCLK frequency = (ACICLK frequency)/N. (where N = 1 + CDLDVAL)
A value of zero for CDLDVAL is invalid and it will inhibit clock generation and disable both receive and transmit modes. A value of 1 for CDLDVAL will divide the ACICLK clock frequency by two, a value of 2 will divide the clock by three, a value of 3 divides by four and so on. This extends up to a value of 1023, which provides a divide by 1024.
The ACIBITCLK duty cycle (HIGH:LOW) for a divide by an even number (N even, CDLDVAL odd) is always 1:1.
For an odd divide (N odd, CDLDVAL even) the duty cycle is (N-1)/2:(N+1)/2 where (N = CDLDVAL + 1), producing a worst case 1:2 duty cycle for divide-by-three (CDLDVAL = 2).
ARM DDI 0146C |
© Copyright ARM Limited 1999. All rights reserved. |
3-7 |