antonblanchard / microwatt

A tiny Open POWER ISA softcore written in VHDL 2008
Other
664 stars 102 forks source link

OpenPOWER spec covers both big-endian and little-endian #431

Open yskelg opened 3 months ago

yskelg commented 3 months ago

I propose adding support for big endian systems to the microwatt project. This would significantly expand the reach of the project and allow more users to benefit from its features.

Currently, the microwatt project only supports Linux on microwatt guide me using little endian systems with gcc-powerpc64le-linux-gnu on README.md.

OpenPOWER spec covers both big-endian and little-endian. https://openpowerfoundation.org/specifications/64bitelfabi/

Justification

Possible approaches:

I would be happy to contribute to the project by providing code or documentation to support this feature.

Thank you for considering this request.

paulusmack commented 3 months ago

Microwatt already has full support for both big-endian and little-endian execution modes, selected by bit 63 (the least significant bit) of the MSR, as defined in the Power ISA. This support is exercised in the 'modes' test. You could look at the source code in tests/modes if you want to see examples of how to switch between little-endian and big-endian modes.

Do you have any specific software in mind that you would like to run that needs to run in big-endian mode?

yskelg commented 3 months ago

Thank you so much Paul,

Oh, I was following the README.md on the Arty A7 board and doing the lab when I mistakenly thought it only supported little-endian Linux.

I haven’t tested the big-endian Linux kernel and applications on my FPGA board yet.

Thanks for letting me know. I'm planning to use big-endian Linux according to the OpenPOWER architecture specs.

The goal is to test which performs better in network throughput, little-endian or big-endian.

I added a strikethrough on the issue where I made a mistake, just in case anyone else gets confused and thinks it's not supported. If everything works fine on big-endian linux, I'll update the #430 document as well.

I appreciate it. I'll do some research and testing based on what @paulusmack guide me. 👍