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.