-
-
Notifications
You must be signed in to change notification settings - Fork 770
Initial support for SweRV EH1 and SweRVolf #2481
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
Conversation
A very initial review, just trying to run this locally:
|
the size tool fails whenever a new board is added, because it fails when trying to build the board on current master. It won't block merging though |
16bd137
to
2542b01
Compare
I have updated the Strange, I'm not sure why it's not working. I see prints within about 20 seconds |
Do you have a new enough version of Verilator? |
you tell me!
In any case, it's probably an issue with my setup, just flagging it. Since obviously you won't be able to reproduce (it's working for you), we can maybe sync online to try and resolve. |
That looks right. That's strange. I'm on Slack to help debug if you want (or Matrix :) ) |
839860a
to
3fbf13b
Compare
The SweRV Cores will be used in a variety of Western Digital products in the near future. All three cores have been open sourced in CHIPS Alliance github. CHIPS Alliance is an organization that develops open source hardware and open source software design tools. It is a barrier free, collaborative environment which lowers the cost of RTL development. This commit adds initial support for the SweRV chips, with the EH1 PIC. Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
3fbf13b
to
f9e6136
Compare
@hudson-ayers Fixed your requests |
I can confirm that I see prints on my machine (Ubuntu 20.04, only thing I changed was running Can you add the new platform checklist to the PR description? It seems that this PR does not support GPIO, which maybe is fine given it is meant to be used primarily as a simulation platform anyway, but wanted to flag that for discussion. |
Works for me as well in a Ubuntu container:
So this is definitely a toolchain thing, hrm.... |
And frustratingly, I'm able to run the example The only difference I can identify between my working Ubuntu version and non-working NixOS version is that on Ubuntu I wasn't using Python's Tested now with several versions of verilator (default on NixOS is more recent than on Ubuntu), including exactly the one on Ubuntu. I have no clue what might be different. Maybe another NixOS user (@lschuermann?) or a Mac user (for some more toolchain diversity) can try and get this working? |
I also used |
f9e6136
to
36e3b48
Compare
I updated the description with the checklist. As for the Nix problem I'm not really sure what to do. Maybe file an issue with FuseSoC? |
36e3b48
to
ae864a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. Great to see another FPGA / Verilated board in Tock! I think this is reasonably similar to what LiteX can do, so we can probably use all CI infrastructure with both of them! :)
Outlined some minor change requests. Edit: ugh, looks like the GitHub UI bugged out again and lost my review comments.
SweRVolf is a FuseSoC-based SoC for the SweRV RISC-V core. This is the first commit of the SweRVolf FuseSoC based board. Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
44cb421
to
477d971
Compare
+++ b/arch/rv32i/src/lib.rs | ||
@@ -88,7 +88,7 @@ pub extern "C" fn _start() { | ||
/// This moves the data segment from flash to RAM and zeros out the BSS section. | ||
pub unsafe fn init_memory() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just commenting so that we're aware #2461 is in last-call and this documentation might be outdated very soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have much to add here. I'm able to build and run the simulator in a Ubuntu docker container, but not natively in NixOS (I can build the board but the simulator just hangs)---a bummer, since it means realistically I won't test it and also Nix is our best documentation (the Makefiles are also good for general tools, but not board specific ones) of which specific versions of different tools in the chain actually work. I am, conversely able to run pre-compiled bare metal example binaries from the fusesoc repo, so it's not as though the toolchain is entirely broken on my end.
I'm fine with merging this. It's about the state of Open titan in terms of runnability (some people seem to be able to) and if I hadn't happened to try it out, we would have likely merged it without waiting for my comment.
bors r+ |
Pull Request Overview
This PR adds support for running Tock on the SweRVolf EH1 Verilator simulator.
This is useful as we can run a RISC-V Tock model fully in software by just using the make scripts. My plan is to use this in CI eventually as well (as long as it isn't too slow).
SweRV EH1
From: https://www.westerndigital.com/company/innovations/risc-v
SweRVolf
SweRVolf is a FuseSoC-based SoC for the SweRV RISC-V core.
New Platform Checklist
Console
, includingdebug!()
and userspaceprintf()
.Testing Strategy
Running on the SweRVolf EH1 simulation.
TODO or Help Wanted
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.