Skip to content

Add big endian support - #3057

Merged
JeanRochCoulon merged 10 commits into
openhwgroup:masterfrom
CodethinkLabs:nazar/lsu_be
Jan 29, 2026
Merged

Add big endian support#3057
JeanRochCoulon merged 10 commits into
openhwgroup:masterfrom
CodethinkLabs:nazar/lsu_be

Conversation

@nazar-codethink

@nazar-codethink nazar-codethink commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

Add ability to work in big endian mode.

This adds big endian support for Load/Store unit, MMU, and atomic operations. For atomic operations we had to change axi_riscv_atomics submodule, the changes are in this branch https://github.com/CodethinkLabs/axi_riscv_atomics/commits/be_amo/

With these changes we can boot big endian Linux.

What do you think?

Comment thread core/include/riscv_pkg.sv Outdated
Comment thread core/load_store_unit.sv Outdated
Comment thread core/load_unit.sv Outdated
Comment thread core/load_unit.sv Outdated
Comment thread core/store_unit.sv Outdated
Comment thread core/store_unit.sv Outdated
Comment thread core/store_unit.sv Outdated
Comment thread core/store_unit.sv Outdated
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

Comment thread core/load_unit.sv Outdated
Comment thread core/load_unit.sv Outdated
Comment thread core/store_unit.sv Outdated
Comment thread core/store_unit.sv Outdated
Comment thread core/store_unit.sv Outdated
@nazar-codethink
nazar-codethink force-pushed the nazar/lsu_be branch 2 times, most recently from fe7fe86 to 73b43f2 Compare July 15, 2025 15:33
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

4 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@nazar-codethink nazar-codethink changed the title Add big endian support for Load/Store unit Add big endian support Jul 22, 2025
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cache_subsystem/wt_axi_adapter.sv Outdated
Comment thread core/cva6_mmu/cva6_mmu.sv Outdated
Comment thread core/cva6_mmu/cva6_mmu.sv Outdated
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@nazar-codethink
nazar-codethink marked this pull request as ready for review July 22, 2025 12:58
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

Comment thread core/cache_subsystem/wt_dcache.sv Outdated
Comment thread core/cache_subsystem/wt_dcache_missunit.sv Outdated
Comment thread core/cache_subsystem/wt_dcache_missunit.sv Outdated
Comment thread core/cache_subsystem/wt_dcache_missunit.sv Outdated
Comment thread core/cache_subsystem/wt_dcache_missunit.sv Outdated
Comment thread core/cache_subsystem/wt_dcache_missunit.sv Outdated
Comment thread core/cache_subsystem/wt_dcache_missunit.sv Outdated
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@nazar-codethink
nazar-codethink force-pushed the nazar/lsu_be branch 2 times, most recently from 71f4809 to 11eb038 Compare July 24, 2025 13:39
@JeanRochCoulon

Copy link
Copy Markdown
Contributor

Or ask maintainers to merge your modification into master...

@nazar-codethink

Copy link
Copy Markdown
Contributor Author

Or ask maintainers to merge your modification into master...

If we merge the modifications into master, they'll be untested. (As I've tested only CVA6 version, which is ~6 years behind).

As an alternative, could you maybe fork the axi-riscv-atomics repo and create a branch there?

@JeanRochCoulon

Copy link
Copy Markdown
Contributor

In that case, I have a solution: @zchamski could you synchronize with @nazar-codethink to vendorize the axi-riscv-atomics inside CVA6 ? In that way @nazar-codethink could update some files from the vendorized project. Cheers

@zchamski

zchamski commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Hi @nazar-codethink, I'm in the process of creating a PR with a vendorized version of PULP's axi_riscv_atomics repo. The PR will be relative to cva6 master and the vendorized axi_riscv_atomics tree will become part of the CVA6 repository.

Once that PR is granted, the BE mod from https://github.com/CodethinkLabs/axi_riscv_atomics/commits/be_amo/ can be applied locally on the CVA6 tree without affecting the upstream PULP repo.

@nazar-codethink

Copy link
Copy Markdown
Contributor Author

Ok, sounds good! 👍

JeanRochCoulon pushed a commit that referenced this pull request Jan 13, 2026
This PR prepares the ground for the addition of CVA6 big-endian support (PR #3057) by adding the content of PULP axi_riscv_atomics repo as a vendorized sub-tree of CVA6 under vendor/pulp-platform.

This sub-tree replaces the submodule originally instantiated under corev_apu/src.
@zchamski

Copy link
Copy Markdown
Contributor

Hi @nazar-codethink, the PR that vendorizes axi_riscv_atomics (#3183) has been merged into the master branch. Please rebase #3057 on the new master and apply your axi_riscv_atomics changes on the vendorized tree (vendor/pulp-platform/axi_riscv_atomics).

@nazar-codethink

Copy link
Copy Markdown
Contributor Author

I rebased and added the axi_riscv_atomics patch there

@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@JeanRochCoulon

JeanRochCoulon commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

We need to merge your PR !
I ran the CI, the hello-pk job is failed. Is it the case on your end ?
Can you rebase

LawrenceHunter and others added 10 commits January 26, 2026 12:16
Co-authored-by: Nazar Kazakov <nazar.kazakov@codethink.co.uk>
Forward the MBE flag from the CSR_REGFILE to the load and store units.
Co-authored-by: Joseph Baker <joseph.baker@codethink.co.uk>
Co-authored-by: Joseph Baker <joseph.baker@codethink.co.uk>
@nazar-codethink

Copy link
Copy Markdown
Contributor Author

I'll try to compile and run Linux there

@nazar-codethink

Copy link
Copy Markdown
Contributor Author

I successfully booted 32-bit Linux as before, so not sure what can fail CI

@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@JeanRochCoulon

Copy link
Copy Markdown
Contributor

Great @nazar-codethink. Thanks for this good contribution. I merge right now.

@JeanRochCoulon
JeanRochCoulon merged commit e7d7ea6 into openhwgroup:master Jan 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants