riscv-crypto icon indicating copy to clipboard operation
riscv-crypto copied to clipboard

Question on vl=vtype.vsew/128

Open topperc opened this issue 3 years ago • 1 comments

Multiple instruction definitions use the sentence In order to properly specify the number of elements, vl needs to be set to vl = vtype.vsew/128. Isn't vtype.vsew always a value less than 128? So this division would result in a value less than 1. Is this equation correct?

topperc avatar Aug 18 '22 18:08 topperc

I was also surprised by this phrasing. We have other description with an element group count eg (e.g. https://github.com/riscv/riscv-crypto/blob/master/doc/vector/insns/vaesef.adoc) which seems clearer

eg = (vl/EGS)

vl must be a multiple of EGS, so vl must be set to eg * EGS = eg * EGW / EEW

nibrunie avatar Aug 19 '22 20:08 nibrunie

The equation is not correct. Unfortunately, the equation was mid-edit when it was blindly copied and pasted elsewhere. This document is still a work in progress and some of the definitions are closer to the final form than others. I am replacing this incorrect equation with some better and more consistent wording - which will probably be tweaked as the spec is further refined.

kdockser avatar Sep 07 '22 21:09 kdockser

Cleaned up. New text is better but will likely be further refined.

kdockser avatar Sep 07 '22 23:09 kdockser