-
Notifications
You must be signed in to change notification settings - Fork 175
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
Refactor vstart assignments to use set_vstart function #688
base: master
Are you sure you want to change the base?
Conversation
Refactor vstart assignments to use set_vstart function
15dfbd1
to
8a488c5
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.
Nice work. I think there are a couple of things to change though:
set_vstart()
needs to calldirty_v_context()
.function clause write_CSR(0x008, value)
should useset_vstart()
.- I'm not sure about this but the CSR writing function truncates the written value to
get_vlen_pow()
bits. That isn't done by the places that callset_vstart(to_bits(16...)
. Should it? Or do we know that that truncation would never make a difference?
Is this okay? @Timmmm, it seems like the length of |
I don't think this is quite right either (but it is closer). I took the drastic action of actually reading the spec. These are the relevant bits:
Also:
So I think that's why the old code does It does not look like the existing implementation traps when So I think you want to change the |
Co-authored-by: Tim Hutt <tdhutt@gmail.com> Signed-off-by: guan jian <148229859+rez5427@users.noreply.github.com>
Is this okay? @Timmmm |
Apart from that minor comment suggestion this LGTM. I'm still not 100% convinced by the original |
Co-authored-by: Tim Hutt <tdhutt@gmail.com> Signed-off-by: guan jian <148229859+rez5427@users.noreply.github.com>
#623