From: lkcl Date: Mon, 6 Jun 2022 23:07:21 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~1930 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb938dfd0ced2f5dbe0f771bf6a352e145924aac;p=libreriscv.git --- diff --git a/openpower/sv/remap.mdwn b/openpower/sv/remap.mdwn index ee3174be0..47b715765 100644 --- a/openpower/sv/remap.mdwn +++ b/openpower/sv/remap.mdwn @@ -225,21 +225,43 @@ SPR as well. Form: SVI-Form SV "Indexed" Form (see [[isatables/fields.text]]) - svindex RS,mask,SVd,ew,yz,mr + svindex RS,mask,SVd,ew,yz,mr,sk | 0.5|6.10 |11.15 |16.20 | 21..25 | 26..31| name | | -- | -- | --- | ---- | ----------- | ------| -------- | -|OPCD| RS | mask | SVd | ew/yx/mr/vf | XO | svindex | +|OPCD| RS | mask | SVd | ew/yx/mm/sk | XO | svindex | Fields: * **SVd** - SV REMAP x/y dim -* **mask** - sets remap mi0-2/mo0-1 and SVSHAPEs if mr set +* **mask** - sets remap mi0-2/mo0-1 and SVSHAPEs, controlled by mm * **ew** - sets element width override * **RS** - GPR RS<<2 to be used for Indexing * **yx** - 2D reordering to be used if yx=1 +* **mm** - mask mode. determines how mask is interpreted. +* **sk** - Dimension skipping enabled * **XO** - standard 6-bit XO field +When `mm=0`: + +* bit 0 corresponds to mi0, bit 1 to mi1, bit 2 to mi2, + bit 3 to mo0 and bit 4 to mi1 +* all SVSHAPEs and the REMAP SPR are first reset (initialised to zero) +* for each bit set in the 5-bit mask, in order, the first + as-yet-unset SVSHAPE will be updated + with the other operands in the instruction, and the REMAP + SPR set. +* If all 5 bits of mask are set then both mi0 and mo1 use SVSHSAPE0. + +Example 1: if mask=0b00110 then SVSHAPE0 and SVSHAPE1 are set up, +and the REMAP SPR set so that mi1 uses SVSHAPE0 and mi2 +uses mi2. + +Example 2: if mask=0b10001 then again SVSHAPE0 and SVSHAPE1 +are set up, but the REMAP SPR is set so that mi0 uses SVSHAPE0 +and mo1 uses SVSHAPE1. + + # REMAP Matrix pseudocode The algorithm below shows how REMAP works more clearly, and may be