Is VSM4K.VI an element-wise masked operation?
No. It is an element-group crypto instruction and the official syntax has no vm.
Vector SM4 key expansion: uimm[2:0] selects a round group and generates the next four round keys.
Syntax: vsm4k.vi vd, vs2, uimm; v0–v31 are vector registers; uimm is a five-bit unsigned immediate, 0–31. Fixed vm=1; no v0.t masking.
32-bit OP-VE: funct6=100001[31:26], vm=1[25], vs2[24:20], uimm[19:15], OPMVV=010[14:12], vd[11:7], opcode=1110111[6:0].
Zvksed depends on Zve32x with SEW=32 only. vs2 supplies four round keys; uimm[2:0] selects the CK group and uimm[4:3] is ignored. S-box substitution and rotations by 13/23 generate the next four keys; vd is output only. Braces run from highest to lowest element index.
EGS=4, EGW=128. vl/vstart not divisible by EGS or unsupported SEW are reserved; LMUL*VLEN<EGW raises illegal-instruction even at vl=0. No extra vd/vs2 overlap prohibition; equal sources read the same original values. Groups follow LMUL alignment; .vs scalar groups use EMUL=ceil(EGW/VLEN).
Enable vector state with legal supported vtype. Process only active groups with vstart/EGS≤i<vl/EGS; prestart is undisturbed and tails follow vta. vstart≥vl (including vl=0) changes no destination elements. Success resets vstart; nonzero vstart assumes implementation support. Execution latency must be data-independent.
Generate four SM4 round keys from vs2 into vd. uimm[2:0] selects the group; uimm[4:3] is ignored. SEW=32, EGW=128, EGS=4.
This bounded model shows official ISA-visible data flow for one element group; it does not model a cryptographic protocol or microarchitecture.
Fixed vm=1, OP-VE, OPMVV; EGS=4, EGW=128.
Lists below run from low to high element index; only the active group is shown and tu preserves tails. vs2[rk0..rk3]=[0,1,2,3].
OP-VE -> funct6 100001 -> vsm4k.vi
VSM4K.VI is an SM4 vector crypto instruction executed over element groups, not an ordinary independent per-element integer operation.
Syntax: vsm4k.vi vd, vs2, uimm; v0–v31 are vector registers; uimm is a five-bit unsigned immediate, 0–31. Fixed vm=1; no v0.t masking.
32-bit OP-VE: funct6=100001[31:26], vm=1[25], vs2[24:20], uimm[19:15], OPMVV=010[14:12], vd[11:7], opcode=1110111[6:0].
Zvksed depends on Zve32x with SEW=32 only. vs2 supplies four round keys; uimm[2:0] selects the CK group and uimm[4:3] is ignored. S-box substitution and rotations by 13/23 generate the next four keys; vd is output only. Braces run from highest to lowest element index.
EGS=4, EGW=128. vl/vstart not divisible by EGS or unsupported SEW are reserved; LMUL*VLEN<EGW raises illegal-instruction even at vl=0. No extra vd/vs2 overlap prohibition; equal sources read the same original values. Groups follow LMUL alignment; .vs scalar groups use EMUL=ceil(EGW/VLEN).
Enable vector state with legal supported vtype. Process only active groups with vstart/EGS≤i<vl/EGS; prestart is undisturbed and tails follow vta. vstart≥vl (including vl=0) changes no destination elements. Success resets vstart; nonzero vstart assumes implementation support. Execution latency must be data-independent.
Enable the listed extension and vector state, with legal vtype, SEW=32, VLEN=256, LMUL=1, vl=4, vstart=0 and tu. Initialize the input groups named in the syntax. The example uses uimm=0. Follow the element-group data flow; the animation lists initial values and results. Success resets vstart=0.
Enable the listed extension and vector state, with legal vtype, SEW=32, VLEN=256, LMUL=1, vl=4, vstart=0 and tu. Initialize the input groups named in the syntax. The example uses uimm=0. Follow the element-group data flow; the animation lists initial values and results. Success resets vstart=0.
No. It is an element-group crypto instruction and the official syntax has no vm.
SEW must be 32 and LMUL*VLEN must cover a 128-bit element group.