VID.V
Vector Element Index
VID.V vd, vm
Writes the element index (0, 1, 2...) to the destination.
Encoding
Binary Layout
010100
31:26
vm
25
0000010001010
24:12
vd
11:7
1010111
6:0
Operands
-
vd
Destination vector register
Example
VID.V v1, v0.t
Related
More in V
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Writes the element index (0, 1, 2, …, vl-1) to each active element of vd.
Operation
foreach(i < vl): vd[i] = i;