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

What happens if VLMAX ends up less than 1? #902

Open
benjaminou4412 opened this issue Jul 11, 2023 · 2 comments
Open

What happens if VLMAX ends up less than 1? #902

benjaminou4412 opened this issue Jul 11, 2023 · 2 comments

Comments

@benjaminou4412
Copy link

For example (with VLEN=64), a vset{i}vl{i} instruction could set LMUL=1/8, SEW=32, so that an element can't "fit" in the now 8-bit register group (VLMAX=1/4). Or we could have a more sensible setting of LMUL=1/8, SEW=8, but then attempt to execute a vle16 instruction.

As far as I could find in the spec, the only thing close to explicitly addressing this case is section 6.3, which states vset{i}vl{i} instructions should set vl such that it's less than or equal to VLMAX - so for fractional VLMAX, this necessarily implies vl=0, since vl is an integer. The destination register would then be handled like any other tail elements according to vta. I also found this thread stating VLMAX<1 is "reserved", but I'm not sure what that means for us trying to implement something - should we have vset{i}vl{i} set vill, then?

@WojciechMula
Copy link

The spec says: "An attempt to set an unsupported SEW and LMUL configuration sets the vill bit in vtype". Section 3.4.2. Vector Register Grouping

@benjaminou4412
Copy link
Author

We weren't sure whether "supported SEW and LMUL configuration" refers to SEW/LMUL values that are out of bounds, or specific combinations of SEW and LMUL that result in VLMAX<1. The latter would lead to significantly more complicated implementation logic, as every possible combination of SEW and LMUL would have to be checked for illegality.

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