-
Notifications
You must be signed in to change notification settings - Fork 167
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
Questions about extending to 128bits floating point arithmetic #160
Comments
I wonder what the official status of RV128 is and the Q extension. Is any company working actively on implementing RV128? It there somebody in charge of the Q extension right now? |
I do not believe that the Q extension is necessarily tied to RV128.
RV128 is *not* ratified. However, according to my notes, Q was ratified
in 2019
and needs to be supported in the Golden Model.
I have not looked at the spec yet.
Bill Mc.
…On Mon, Apr 11, 2022 at 8:59 AM Liu ***@***.***> wrote:
I think it doesn't depend on RV128. On the spec, it says "The
quad-precision binary floating-point instruction-set extension is named
“Q”; it depends on the double-precision floating- point extension D."
But I think this spec is very brief, I am not very sure.
—
Reply to this email directly, view it on GitHub
<#160 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXROLOAU77Y3HPRDLFUSWRLVEQV3TANCNFSM5TBT2PMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Bill McSpadden
Formal Verification Engineer
RISC-V International
mobile: 503-807-9309
|
@billmcspadden-riscv Do you know where I can find the official Q-extension document that was ratified? |
It is part of the Unpriv Spec, chapter 13.
Bill Mc.
On Mon, Apr 11, 2022 at 10:19 AM Martin Berger ***@***.***>
wrote:
… I do not believe that the Q extension is necessarily tied to RV128. RV128
is *not* ratified. However, according to my notes, Q was ratified in 2019
and needs to be supported in the Golden Model. I have not looked at the
spec yet. Bill Mc.
… <#m_-8119934376918552356_>
On Mon, Apr 11, 2022 at 8:59 AM Liu *@*.*> wrote: I think it doesn't
depend on RV128. On the spec, it says "The quad-precision binary
floating-point instruction-set extension is named “Q”; it depends on the
double-precision floating- point extension D." But I think this spec is
very brief, I am not very sure. — Reply to this email directly, view it on
GitHub <#160 (comment)
<#160 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXROLOAU77Y3HPRDLFUSWRLVEQV3TANCNFSM5TBT2PMQ
<https://github.com/notifications/unsubscribe-auth/AXROLOAU77Y3HPRDLFUSWRLVEQV3TANCNFSM5TBT2PMQ>
. You are receiving this because you are subscribed to this thread.Message
ID: @.*>
-- Bill McSpadden Formal Verification Engineer RISC-V International
mobile: 503-807-9309
@billmcspadden-riscv <https://github.com/billmcspadden-riscv> Do you know
where I can find the official Q-extension document that was ratified?
—
Reply to this email directly, view it on GitHub
<#160 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXROLOBHJMHBLW4HYKZCJJTVEQ7INANCNFSM5TBT2PMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Bill McSpadden
Formal Verification Engineer
RISC-V International
mobile: 503-807-9309
|
In what sense? mem_read is polymorphic, and max_mem_access is 16. We use 16-byte/128-bit loads and stores (ish) downstream in sail-cheri-riscv just fine. All you're missing is a QUAD in word_width for decoding purposes.
It can get messy. If you want a 128-bit integer, use a sail_int (mpz_t) rather than a mach_int (int64_t). You shouldn't need a struct.
This isn't the place for questions or feedback on the ISA manual. But you probably want the "RV32/64G Instruction Set Listings" chapter which, despite its name, includes things other than G (namely Q and Zfh in the version I have). |
Thank you for your guide! I will look at cheri extension to see if I can solve it. |
I would not suggest that; it's all complicated by having to support tagged memory. The only relevant bit is that it passes 16 to mem_read and similar functions in some cases. |
As @billmcspadden-riscv said, RV128 is not ratified (or even anywhere close to frozen), but Q was ratified a few years ago. @LiuTaowen-Tony see page 135 of https://github.com/riscv/riscv-isa-manual/releases/download/Ratified-IMAFDQC/riscv-spec-20191213.pdf for the instruction encodings. |
I think it is only |
Just add to word_width, it's not a lot of code, and anything else is a gross hack. |
@jrtc27 Yeah, changing word_width worked. It is just that I did this to |
There's a PR for this now, so I think we can close this: |
Hi, I am new to this project, and I want to contribute to this project by implementing Q extension.
I found several difficulties.
load and store
For storing and loading 128bits data, alignment checking and virtual address translation can only support up to 64bits. Changing these to 128 bits would affect other extensions. I tried to use 2 separate memory reads to load the data. But I think there will be some problem when there is an invalid read.
return value from C softfloat lib
For the C softfloat lib, in the existing code, to return a value from a C function, it uses a 64-bits-vector. I worked around this : I defined two separate extern functions to do the calculation: One returns the upper 64 bits, and the other returns the lower 64bits. I am not sure how to transfer structs between sail and C, and I want to ask where to find documentations about this.
The text was updated successfully, but these errors were encountered: