From: lkcl Date: Fri, 17 Sep 2021 21:14:16 +0000 (+0100) Subject: (no commit message) X-Git-Tag: DRAFT_SVP64_0_1~81 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd580a6c22c3e81b7e9a887cfd12a281fc32a20d;p=libreriscv.git --- diff --git a/openpower/sv/svp64/appendix.mdwn b/openpower/sv/svp64/appendix.mdwn index 068466df3..ff3810849 100644 --- a/openpower/sv/svp64/appendix.mdwn +++ b/openpower/sv/svp64/appendix.mdwn @@ -190,7 +190,7 @@ order. In essence it becomes the programmer's responsibility to leverage the pre-determined schedules to desired effect. -## Scalar result reduce mode +## Scalar result reduction and iteration Scalar Reduction per se does not exist, instead is implemented in SVP64 as a simple and natural relaxation of the usual restriction on the Vector @@ -209,8 +209,8 @@ and it is up to the programmer to make best use of the provided. In this mode, which is suited to operations involving carry or overflow, -one register must be identified by the programmer as being the "accumulator". -Scalar reduction is thus categorised by: +one register must be assigned, by convention by the programmer to be the +"accumulator". Scalar reduction is thus categorised by: * One of the sources is a Vector * the destination is a scalar @@ -218,7 +218,7 @@ Scalar reduction is thus categorised by: also the scalar destination (which may be informally termed the "accumulator") * That the source register type is the same as the destination register - type identified as the "accumulator". scalar reduction on `cmp`, + type identified as the "accumulator". Scalar reduction on `cmp`, `setb` or `isel` makes no sense for example because of the mixture between CRs and GPRs. @@ -245,7 +245,8 @@ elements is the vector starting at r10. for i in range(VL): iregs[RA] += iregs[RB+i] # RT==RA -However, *unless* the operation is marked as "mapreduce", SV ordinarily +However, *unless* the operation is marked as "mapreduce" (`sv.add/mr`) +SV ordinarily **terminates** at the first scalar operation. Only by marking the operation as "mapreduce" will it continue to issue multiple sub-looped (element) instructions in `Program Order`.