SMSC LAN91C111 32/16/8-Bit Three-In-One Fast Ethernet Controller

Figure 6.2 16-bit Byte Lane Configuration

As you can see the lower byte lane (Byte Lane 0) on the LAN91C111 becomes the upper byte lane on the processor. The second byte lane (Byte Lane 1) becomes the lower byte of the upper word on a 32bit interface. The third byte lane (Byte Lane 2) becomes the upper byte of the lower word on a 32bit interface and the upper byte on a 16bit interface. The third byte lane (Byte Lane 3) becomes the lower byte of low word on a 32bit interface and the low byte of the low word on a 16bit interface.

6.5Software Considerations for Big Endian

Converting data between the two systems is sometimes referred to as the NUXI problem. Imagine the word UNIX stored in two 2-byte words. In Big Endian systems, it would be stored as UNIX. In a Little- Endian system, it would be stored as NUXI. As previously described, this is only an issue on 16/32bit architectures and is not a problem if using an 8bit endian style microcontroller.

The way data is read and written to the Ethernet port does not require software to do byte swapping BUT for configuration of the internal data registers the software will be required to byte swap information to accommodate the physical connection. When you initialize the LAN91C111 from a endian architecture machine you will need to take into consideration the differences in endianness when writing your initialization routines and the way that the host processor is connected to the LAN91C111 device. This is where the software comes into play. Through software you can accommodate the differences in endianness.

SMSC AN 9.6

39

Revision 1.0 (08-14-08)

APPLICATION NOTE