-
Notifications
You must be signed in to change notification settings - Fork 105
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
The vector unit seems disabled #3
Comments
Yes, openC906 didn't include the V extension because it wasn't officially final yet. In the future, we will open-source it the time is ripe. |
Hello @CaffreyCC, thanks a lot for the information! |
@mp-17 I have an Sipeed Lichee RV D1 board with a C906 and was able to use the vector unit. However it only support RVV v0.7, so you can not use more recent toolchains to work with the vector instructions. |
Thanks a lot, @PhilippvK. I have the Nezha board, and the V extension seems disabled by default. I cannot modify the machine/supervisor CSRs to enable it either since the board runs Linux and my applications are kept in U mode. |
@mp-17 I also had similar issues running Linux. I had to build baremetal programs to make use of the vector extension. I am not sure if this would somehow be possible from an OS. Reference: https://github.com/bigmagic123/d1-nezha-baremeta/tree/main/src/2.vector_example |
This is really useful, I will try it. Thank you. |
So, just to understand: you booted the board in a baremetal environment taking the material from this repo, right? |
@mp-17 Not exactly. I put together code from multiple sources also including the relevant parts for uboot/xfel/mksunxi. However I am unfortunately unable to publish the project in its current stage. Sorry for that. |
No problems, thank you very much for the help! |
It seems that critical signals relative to the vector unit are hardcoded to zero.
Some examples:
VS
bits inmstatus
https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/gen_rtl/cp0/rtl/aq_cp0_trap_csr.v#L505
https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/gen_rtl/idu/rtl/aq_idu_id_decd.v#L1011
https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/gen_rtl/idu/rtl/aq_idu_id_decd.v#L934
https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/gen_rtl/idu/rtl/aq_idu_id_decd.v#L3740
I tried to run some vector code, but it always triggers exceptions on the vector instructions (if I fix some of the hardcoded values, the exception is generated by some other disabled signals). This makes me think that the code was generated with incorrect settings, or that this version of the processor simply does not support the V extension. Can this be the case? If yes, are there any plans to open-source it?
Thanks a lot,
Matteo
The text was updated successfully, but these errors were encountered: