
Philips Semiconductors
PNX15xx Series
Volume 1 of 1
Chapter 29: Endian Mode
PNX15XX_SER_3
Koninklijke Philips Electronics N.V. 2006. All rights reserved.
Product data sheet
Rev. 3 — 17 March 2006
29-9
5.
Example: Audio In—Programmer’s View
The PNX15xx Series Audio In module receives mono or stereo, 8 or 16-bit/sample
audio data and lls memory with an 8 or 16-bit data structure. The data structure is
put in memory according to both endian mode laws.
A programmer’s view of the Audio In function is sketched in
Figure 5. The
programmer sees the address of each item (according to the DMA rule), and expects
that 16-bit values are correctly stored in memory according to the CPU law. The DMA
logic of the Audio In module therefore needs to write data in memory (byte) locations
precisely, per
Table 4. Note the programmer also sees the Control and Status
registers of the Audio In module per
Figure 6. These registers are always seen with
the same bit-layout in the CPU register, regardless of endian mode.
Figure 5:
Audio In Memory Data Structure (Programmer’s View)
addr
leftn
addr+1
leftn+1
addr+2
leftn+2
addr+3
leftn+3
addr+4
leftn+4
addr+5
leftn+5
addr+6
leftn+6
addr+7
leftn+7
8-bit
mono
addr
leftn
addr+1
rightn
addr+2
leftn+1
addr+3
rightn+1
addr+4
leftn+2
addr+5
rightn+2
addr+6
leftn+3
addr+7
rightn+3
8-bit
stereo
16-bit
mono
leftn
addr
leftn+1
addr+2
leftn+2
addr+4
leftn+3
addr+6
16-bit
stereo
leftn
addr
rightn
addr+2
leftn+1
addr+4
rightn+1
addr+6
Table 4: Precise Mapping Audio In Sample Time and Bits to Memory Bytes
Operating Mode
m[addr]
m[addr+1]
m[addr+2]
m[addr+3]
8-bit mono—little-endian or big-endian
leftn[7:0]
leftn+1[7:0]
leftn+2[7:0]
leftn+3[7:0]
8-bit stereo—little-endian or big-endian
leftn[7:0]
rightn[7:0]
leftn+1[7:0]
rightn+1[7:0]
16-bit mono—little-endian
leftn[7:0]
leftn[15:8]
leftn+1[7:0]
leftn+1[15:8]
16-bit mono—big-endian
leftn[15:8]
leftn[7:0]
leftn+1[15:8]
leftn+1[7:0]
16-bit stereo—little-endian
leftn[7:0]
leftn[15:8]
rightn[7:0]
rightn[15:8]
16-bit stereo—big-endian
leftn[15:8]
leftn[7:0]
rightn[15:8]
rightn[7:0]