5 * pseudocode in [[isa/simplev]] page
7 `svstep` performs explicit stepping of the Vector for-loop,
8 and it can also be used to enquire about the current state
9 of the REMAP indices and SVSTATE.
13 *(Allocation of opcode TBD pending OPF ISA WG approval)*,
14 using EXT22 temporarily and fitting into the
17 Form: SVL-Form (see [[isatables/fields.text]])
19 | 0.5|6.10|11.15|16..22| 23...25 | 26.30 |31| name |
20 | -- | -- | --- | ---- |----------- | ----- |--| ------- |
21 |OPCD| RT | / | SVi | / / vf | 11011 |Rc| svstep |
25 svstep RT,SVi,vf (Rc=0)
26 svstep. RT,SVi,vf (Rc=1)
31 to enquire about the REMAP Schedule. When `vf=1` then stepping occurs. When `vf=0` the enquiry is performed
32 without altering internal
33 state. If `SVi=0, Rc=0, vf=0` this instruction is a `nop`.
34 The following modes are identical to those in [[sv/setvl]], returning
37 * When `SVi` is 1-4 the REMAP Schedule for a given SVSHAPE may be
38 returned in `RT`. SVi=1 selects SVSHAPE0 current state,
39 through to SVi=4 selects SVSHAPE3.
40 * When `SVi` is 5, `SVSTATE.srcstep` is returned.
41 * When `SVi` is 6, `SVSTATE.dststep` is returned.
43 As this is a Single-Predicated (1P) instruction, predication may be applied
44 to skip (or zero) elements.
46 * Vertical-First Mode will return the requested index
47 (and move to the next state if `vf=1`)
48 * Horizontal-First Mode can be used to return all indices,
49 i.e. walks through all possible states.
51 To obtain the full set of possible computed element
52 indices use `svstep RT.v,SVI,1` which will store all computed element
53 indices, starting from RT. If Rc=1 then a co-result Vector of CR Fields
54 will also be returned, comprising the "loop end-points" of each of the inner
55 loops when either Matrix Mode or DCT/FFT is set. In other words,
56 for example, when the `xdim` inner loop reaches the end and on the next
57 iteration it will begin again at zero, the CR Field `EQ` will be set.
58 With a maximum of three loops within both Matrix and DCT/FFT Modes,
59 the CR Field's EQ bit will be set at the end of the first inner loop,
60 the LE bit for the second, the GT bit for the outermost loop and the
61 SO bit set on the very last element, when all loops reach their maximum
64 *Programmer's note (1): VL in some situations, particularly larger Matrices,
66 meaning that `sv.svshape` returning a considerable number of values. Under
67 such circumstances `sv.svshape/ew=8` is recommended.*
69 *Programmer's note (2): having conveniently obtained a pre-computed
70 Schedule with `sv.svstep`,
71 it may then be used as the input to Indexed REMAP Mode
72 to achieve the exact same Schedule. It is evident however that
73 before use some of the Indices may be arbitrarily altered as desired.
74 `sv.svstep` helps the programmer avoid having to manually recreate
76 types of common Loop patterns, and in its simplest form, without REMAP
78 is equivalent to the `iota` instruction found in other Vector ISAs*