-
Notifications
You must be signed in to change notification settings - Fork 308
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
how to read v register if vslide1down instruction not present #1069
Comments
I find the way that specifications are published very confusing. If I go here: It says:
But if I download that PDF then it says:
Which contradicts the earlier comment that the docs linked are "the current, ratified and published releases". I'm trying to see what version of the RISC-V V vector extension the "vector slide" instructions belong to but I can't seem to ascertain that. Edit: I logged and issue here: |
Yes - but that doesn't clarify what version of the V extension spec that it's part of and if OpenOCD has some implicit dependency on a specific version of the extension spec. |
@fanghuaqi regardless of the version of the spec. Current implementation assumes that vslide1down is present. If this instruction is not support by your target - you won't be able to read vector registers. Patches or issues are welcome. |
What is the nature of the RISC-V target that you're using that does not support |
Hi @aap-sc , is there any other way to implement read vector register in openocd |
Is this of any relevance here perhaps?
If not then it might be worth reviewing other PRs related to vector register accesses - i.e. some or all of the following: |
@fanghuaqi there may be many ways. The recommended way for external debugger is to use vslide1down. If vslide1down is not supported one could try to write the values to memory using vector stores. This will require user to configure "working area", though this will somewhat complicate the implementation. Unless the official specification allows for the targets without vslide1down instruction I will strongly object against merging such implementation since it will be hard to maintain. Still, you can always implement the required support in your fork, or point out if such implementation is indeed allowed by the spec. |
Hi @aap-sc , thanks for your explaination, I will see how to implement it using the way you suggest. |
But that's my confusion here - what official specification (and version)? I presume you mean a ratified version of the V vector extension? But what version? Isn't 1.0 the only ratified version so far? Does it include |
https://github.com/riscv/riscv-v-spec/releases/download/v1.0/riscv-v-spec-1.0.pdf (1.0, not ratified, FROZEN, public review)
There is no ratified version currently. HOWEVER, the versions presented above are FROZEN. This means that no major changes are expected before the formal ratification.
I've provided the links above. While these are marked as "draft" - these are frozen. Vector Slidedown/Slideup Instructions seems to be mandatory in these specifications. |
As I said - it's confusing... |
O_o. Yeah... Quite unexpected. |
Yes - and also strange that the vector extension ostensibly ratified in 2021 was only officially announced this year: |
@TommyMurphyTM1234 , however. If we look here: https://riscv.org/technical/specifications/ , there is this document "Volume 1, Unprivileged Specification version 20240411 " which seems to be ratified. Vector isa is present there. |
That page says that it's ratified but it still contains draft info. and here: |
@TommyMurphyTM1234 yeah. riscv/riscv-isa-manual#1400 - this good thing we have this issue. I hope that the situation will be clarified soon. |
@fanghuaqi could you please clarify if your question is answered? If you have plans to submit MR we can leave this issue open (it would not hurt to rename then), otherwise I suggest to close the issue. |
Yes, you can close it, we implement read csr not using vslidedown instruction, but require working memory. Thanks |
Hi, I am wondering if a risc-v vector don't have vslide1down instruction, how to read the vector register
riscv-openocd/src/target/riscv/riscv-013.c
Lines 2522 to 2546 in ae7ffa4
Is there any other way to read vector register in openocd?
Thanks
The text was updated successfully, but these errors were encountered: