Over the years I have been consulted on big endian and mixed endian systems. Since this topic is fairly important and often confusing I decided to put this topic into a document so that others can benefit from this as well. At a high level this document will discusses the following topics:
Avalon-MM specification for bit and byte ordering (little endian)
Nios II bit and byte ordering as well as the internal arithmetic ordering (little endian)
PowerPC bit and byte ordering as well as the internal arithmetic ordering (big endian)
ARM bit and byte ordering as well as the internal arithmetic ordering (big endian - BE32 and BE8)
Mixed endian systems
Arithemtic ordering corrections in software
Although Qsys is referenced throughout this document, all of this information applies to SOPC Builder systems as well. Please feel free to carry this topic on by adding to either the document or this webpage. I have also attached a byte swapper custom instruction which you can connect to Nios II and use it to accelerate 16, 32, and 64-bit byte reversals. Remember that you need to use the appropriate macro for the variable you are swapping around otherwise you'll corrupt the value stored in it.
Community support is provided during standard business hours (Monday to Friday 7AM - 5PM PST). Other contact methods are available here.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.