[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Endian Mapping
Endian swapping is primarily a byte address mapping method. In Little
Endian systems data bytes are mapped into the address space as follows:
Addr 0 => Data7..0, Addr 1 => Data15..8, Addr 2 => Data24..16,
Addr 3 => Data31..24.
In Big Endian systems the address allocation is reversed:
Addr 0 => Data31..24, Addr 1 => Data23..16, Addr 2 => Data15..8
Addr 3 => Data7..0.
To map a 32-bit little endian bus to a 32-bit big endian bus you have to
connect whole byte lanes with each other, not a pin reversal like you have
D7 => D31 .. D0 => D24
D15 => D23 .. D8 => D16
D23 => D15 .. D16 => D8
D31 => D7 .. D24 => D0
If you hardwire the busses you have to be careful not to transfer address
(i.e. you can not do this for a multiplexed address/data bus, such as the
for data transfers of less than 32-bits you have to be make sure that you
put data on
the correct byte lanes, as required by the target device.
Hope this helps.
Director - Electronic Engineering
Atlantek Microsystems Pty Ltd
Innovation House, Technology Park,
Mawson Lakes, SA, 5095, AUSTRALIA
Amit Shah wrote:
> Hi all,
> One of our customers is using a Power PC system. What he is trying to do
> is trying to use our PCI device on that system.
> And to do so, he is connecting addr 0 of our PCI chip (little endian) to
> addr 31 of his Power PC (Big endian) system and
> so on for all data[31:0] and cbe[3:0] lines.
> Does this type of approach work ?
> Does this really solve big endian to little endian mapping ?
> Amit Shah