Local Bus Interface
Master Mode
Copyright 1997-2000, V3 Semiconductor Inc.
EPC User
’
s Manual Revision 1.05
79
8.2.2.1
Local Bus Endian Mode
The endian mode of the local bus is set with the ENDIAN bit in the LB_CFG register. This bit
controls how data is sequenced in 8 and 16 bit regions on the local bus when the EPC is a
local bus master. It does
NOT
effect the access to internal registers or access to 32 bit local
bus regions. It also has not direct relationship to swapping.
8.2.3
Data Swapping
Data swapping options are available for each of the PCI-to-local and local-to-PCI address
translation units. In the local-to-PCI direction, swapping is controlled by the LB_BASEx
registers. In the other direction PCI_MAPx is used. Each DMA channel also has individual
control over this option. These options are used to translate between big endian local bus
processors and little endian PCI space. Unfortunately, there is no way to provide a
universal endian converter because processors that cache data can burst data of differing
size. However, if 8/16 bit loads/stores are always done as 8/16 bit operations, then the
"Auto Swap
" mode can be used. It works by examining the size of the transfer based on
how many byte lanes are enabled. When BE[3:0] =
“
1100
”
or
“
0011
”
then a 16 bit swap is
done. When BE[3:0] =
“
1110
”
,
“
1101
”
,
“
1011
”
or
“
0111
”
then an 8-bit swap is done. Any other
combination results in non-swapped data.
Table 12: Translation of 32 Bit PCI Data into an 8 Bit Local Bus Region
Little Endian (ENDIAN=0)
Big Endian (ENDIAN=1)
Access
A1:0
Data (Via D7:0)
A1:0
Data (Via D31:24)
1st
00
D7:0
11
D31:24
2nd
01
D15:8
10
D23:16
3rd
10
D23:16
01
D15:8
4th
11
D31:24
00
D7:0
Table 13: Translation of 32 Bit PCI Data into an 16 Bit Local Bus Region
Little Endian (ENDIAN=0)
Big Endian (ENDIAN=1)
Access
A1
Data (Via D7:0)
A1:0
Data (Via D31:24)
1st
0
D15:0
1
D31:16
2nd
1
D31:16
0
D15:0
Table 14: Swap Mux Options
Description
SWAP
D[31:24]
D[23:26]
D[15:8]
D[7:0]
no swap, 32 bit
00
Q[31:24]
Q[23:16]
Q[15:8]
Q[7:0]
16 bit
01
Q[15:8]
Q[7:0]
Q[31:24]
Q[23:16]
8 bit
10
Q[7:0]
Q[15:8]
Q[23:16]
Q[31:24]
Auto Swap
11
Auto Swap (not available for DMA transfers)