-
Notifications
You must be signed in to change notification settings - Fork 411
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
enable ecall support in small config #100
Conversation
|
Hmm, the ecall isn't the only feature required by the zephyr port, will likely need : |
We tested it on Of course you are right that when VexRiscvc Zephyr port gets extended in the future, there might be a need to enable additional features in the cpu. |
@mateusz-holenko Can you send me the link of the litex-vexriscv SoC ? Just to exactly understand how things were customized for litex. |
@Dolu1990 LiteX+VexRiscv SoC definition in Zephyr: https://github.com/zephyrproject-rtos/zephyr/tree/master/soc/riscv/litex-vexriscv. It's very basic, based mostly on the defaults.
|
After analyzing the code of LiteX+VeRiscv port of Zephyr again I realized I was mistaken.
There is also a We are now reproducing the test on HW to see why is it working with only |
I can confirm that Zephyr binaries work fine on Zephyr congifures Looking at the generated verilog it seems that the code for |
In SpinalHDL, the description seem right (https://github.com/SpinalHDL/VexRiscv/blob/master/src/main/scala/vexriscv/plugin/CsrPlugin.scala#L541) Anyway, thanks for the info :) |
80fe05d
to
ae9b2c9
Compare
@Dolu1990 Did you have time to check why Anyway, your suggestion that we should configure MTVEC and WFI are valid, so we updated the commit. Does it look fine now? |
I see that Travis has failed with: Error during sbt execution: No Scala version specified or detected Could it be related to our changes? |
@mateusz-holenko Ahh mybad, sorry i forgot about it, stack overflow, just ping me when if it appen again ^^ So, i just generated a small config (GenSmallest => mtvecAccess = CsrAccess.NONE,)
So i susspect you had maybe some luck one way or another. Can you send me your verilog ? About the travis failure, sometime that happen, and i don't think that's related to your changes, but just crap on their VM side. I relauched them :) |
Since the verilog files have around 5k lines I posted them on pastebin: https://pastebin.com/KuE46fpB https://pastebin.com/DjxzhYHf. Both of them have a fragment, that I believe is responsible for setting
I think that MTVEC writeability is a separate issue that does not have to block this PR. Do you think that the current configuration is mergable? |
Ahhhhhhhhhhhhhhhh Make sense now :) ? |
Yeah, it definiately does! So there are apparently two ways we can proceed:
Which one you think is better? |
@Dolu1990 What do we do with this PR? |
@mateusz-holenko Sorry for the delay. I would prefer keeping things on the VexRiscv as barmetal as possible and avoid specifics requirements of OS to leak in, as different OS have different requirements, having to enable by default the common denominator of those could lead in quit some overhead. So the way to go would be to add those configurations in https://github.com/m-labs/VexRiscv-verilog to meet demands. Sound good ? |
Sounds fine. We will move this change to https://github.com/m-labs/VexRiscv-verilog. |
This commit enables
ecall
instruction insmall
variant enabling it to run Zephyr RTOS.FPGA utilization verified on
tinyfpga_bx.lite
target in Litex: 4227 vs. 4273 LC.Without
ecall
support:With
ecall
support: