EEW and non-indexed loads/stores

Roger Ferrer Ibanez

Hi all,

I understand the EEW, as explicitly encoded in the load/store instructions applies to the vector of indices for the indexed loads and stores. For instance we can load a vector "SEW=8,LMUL=1" using a vector of indices of "SEW=64,LMUL=8" by making sure vtype has "SEW=8,LMUL=1" and using v{l,s}xei64.

I'd like to confirm I'm understanding correctly the EEW for unit-stride and strided loads and stores.

Say that vtype is such that SEW=16,LMUL=1 and we execute a v{l,s}{,s}e32.v. Now the EEW of the data and address operands is EEW=32 (as encoded in the instruction) so EMUL=(EEW/SEW)*LMUL=(32/16)*1=2. So in this case we're loading/storing a vector SEW=32,LMUL=2.

Is my interpretation correct?

If it is, I assume this is useful in sequences such as the following one

# SEW=16,LMUL=1
vle16.v v1, (t0)    # Load a vector of sew=16,lmul=1
vle32.v v2, (t1)    # Load a vector of sew=32,lmul=2, cool, no need to change vtype
vwadd.wv v4, v2, v1 # v4_v5(32)[:] ← v2_v3(32)[:] + sign-extend(v1(16)[:])
vse32.v v4, (t1)    # Store a vector of sew=32,lmul=2, no need to change vtype either

Thank you,

Roger Ferrer Ibáñez - roger.ferrer@...
Barcelona Supercomputing Center - Centro Nacional de Supercomputación

Join { to automatically receive all group messages.