Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RV64 support + baremetal binaries #73

Open
jerryz123 opened this issue Sep 25, 2024 · 2 comments
Open

RV64 support + baremetal binaries #73

jerryz123 opened this issue Sep 25, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested sim toolchain:gcc toolchain:llvm

Comments

@jerryz123
Copy link

Chipyard now supports simulating two different vector units:

We'd like to use this project to evaluate these vector units, and perhaps, use the vector units to assist in kernel development.
I think there's two key capabilities that would make this much easier.

  • Support RV64 targets, it seems like currently it only supports rv32 (I might be wrong here)
  • Support compilation for bare-metal targets. We generally like to avoid running code with pk

I'm happy to help make these changes happen, if the developers of this project agree.

@PhilippvK
Copy link
Member

Hi,

the library itself is not limited to XLEN=64. What needs some work is the CMake config and the Scripts in the repository.

There are already some WIP branches which implement support for 64bit targets in some degree

  • ara-support: Might be a bit outdated
  • rv64bench: Hardcoded everything to use 64 instead of 32 bits. Also includes changes to scripts used in CI/Benchmarking.

I am currently working on toolchain refactorings to support RV64/RV32 on the same branch in a generic fashion. This will make the two mentioned branches obsolete.

Regarding the baremetal targets it should be feasible, but for spike I have no experience regarding how the target would report benchmark results or test failures (I expect we would need to use tohost? Are there other baremetal targets you have in mind?

We also have a project going on to bring muRISCV-NN to real RVV 1.0 hardware such as the CanMV K230 using an RTOS or Linux.

I hope this answers you questions!

@PhilippvK PhilippvK self-assigned this Sep 26, 2024
@jerryz123
Copy link
Author

Thanks Phillipp, I look forwards to support for selectable RV64/RV32.

Regarding baremetal targets, the main differences would be

  • relying on tohost/fromhost (HTIF) for printf. A HTIF implementation of a minimal set of syscalls is provided in libgloss-htif (https://github.com/ucb-bar/libgloss-htif). With the right linker flags, it should be straightforwards to statically link libgloss
  • avoiding I/O. Baremetal binaries cannot perform file I/O, so any test data must be baked into the binary. I'm not sure how much of a problem this will be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested sim toolchain:gcc toolchain:llvm
Projects
None yet
Development

No branches or pull requests

2 participants