vmv.x.s

Vector move scalar to integer register

This instruction is defined by:

Encoding

svg

Synopsis

Copies the first element of the source vector register vs2 to the destination integer register xd, sign-extending to XLEN bits if SEW < XLEN.

This is a scalar read instruction that always reads element 0 of vs2, regardless of vstart. The vstart CSR is reset to 0 after execution.

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

Bits<5> vs2 = $encoding[24:20];
Bits<5> xd = $encoding[11:7];

Execution

  • Pruned, XLEN == 64

  • Original

VectorState state = vector_state();
X[xd] = $signed(V[vs2][state.sew - 1:0]);
CSR[vstart].VALUE = 0;
VectorState state = vector_state();
X[xd] = $signed(V[vs2][state.sew - 1:0]);
CSR[vstart].VALUE = 0;