Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

vstart and precise abort for chaining case #924

Open
jeremyccl opened this issue Oct 17, 2023 · 3 comments
Open

vstart and precise abort for chaining case #924

jeremyccl opened this issue Oct 17, 2023 · 3 comments

Comments

@jeremyccl
Copy link

hi,
I have some questions about vstart and precise exception.
a chaining case in an in-order implementation, vector load (lmul=4) follows by vector add (lmul=4)
if i would like to chain these two instructions together,

  (empty) | vload m4 | vload m3 | vload m2 | vload m1

vadd m4 | vadd m3 | vadd m2 | vadd m1

what should the vstart value be on the cycle of vload m4 and vadd m3?
should be the oldest instruction's current element? (but vstart should be reset after vload retired)
or should I implement multiple vstart csr for different vector instruction (but no compatible to RVV?)

what if vload m3 generate exception? in section 17.1 (no instructions newer than the trapping vector instruction have altered architectural state)
Does this mean no vector chaining when there is a vector instruction which could generate exception in the middle of execution?

@aswaterman
Copy link
Member

For precise vector exceptions, chaining must not be architecturally visible. It doesn't mean that you can't chain; it just means that you need to detect the possible exceptions before beginning chaining.

@jeremyccl
Copy link
Author

Hi Andrew

Thanks for answering, new instructions need to wait for older instruction trap clean than execution.

How about Question 1, when multiple vector instructions executing parallel (or chain), how to maintain vstart?
Any recommendation?

@aswaterman
Copy link
Member

The answers to these questions go together. The vstart value corresponds to the instruction that took the trap. (All younger instructions must appear not to have begun execution.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants