From 6b540d890aead26cbf9a8c4937b4fb9b841ae110 Mon Sep 17 00:00:00 2001 From: lkcl Date: Tue, 22 Dec 2020 04:01:14 +0000 Subject: [PATCH] --- openpower/sv/svp_rewrite/svp64.mdwn | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/openpower/sv/svp_rewrite/svp64.mdwn b/openpower/sv/svp_rewrite/svp64.mdwn index ebe7076e6..d5466f9e1 100644 --- a/openpower/sv/svp_rewrite/svp64.mdwn +++ b/openpower/sv/svp_rewrite/svp64.mdwn @@ -555,25 +555,21 @@ sequentially ordered subset of elements to be inserted; the destination predicat ## Rounding, clamp and saturate -One of the issues with vector ops is that in integer DSP ops for example -in Audio the operation must clamp or saturate rather than overflow or -ignore the upper bits and become a modulo operation. This for Audio -is extremely important, also to provide an indicator as to whether -saturation occurred. see [[av_opcodes]]. +see [[av_opcodes]]. To help ensure that audio quality is not compromised by overflow, "saturation" is provided, as well as a way to detect when saturation -occurred (Rc=1). When Rc=1 there will be a *vector* of CRs, one CR per +occurred if desired (Rc=1). When Rc=1 there will be a *vector* of CRs, one CR per element in the result (Note: this is different from VSX which has a single CR per block). When N=0 the result is saturated to within the maximum range of an unsigned value. For integer ops this will be 0 to 2^elwidth-1. Similar logic applies to FP operations, with the result being saturated to -maximum rather than returning INF. +maximum rather than returning INF, and the minimum to +0.0 When N=1 the same occurs except that the result is saturated to the min -or max of a signed result. +or max of a signed result, and for FP to the min and max value rather than returning +/- INF. When Rc=1, the CR "overflow" bit is set on the CR associated with the element, to indicate whether saturation occurred. Note that due to @@ -624,7 +620,7 @@ Note that the operation takes place at the maximum bitwidth (max of src and dest scalar result is placed in the first available unmasked element. TODO: Rc=1 on Scalar Logical Operations? is this possible? was space -reserved in Logical Ops? +creserved in Logical Ops? Pseudocode for the case where RA==RB: -- 2.30.2