From: lkcl Date: Fri, 19 Feb 2021 19:49:52 +0000 (+0000) Subject: (no commit message) X-Git-Tag: convert-csv-opcode-to-binary~147 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f00fcd39afce512f1cfdc15162fb70db6f2b48cf;p=libreriscv.git --- diff --git a/openpower/sv/vector_ops.mdwn b/openpower/sv/vector_ops.mdwn index 05d6fa680..6d0f7ffbe 100644 --- a/openpower/sv/vector_ops.mdwn +++ b/openpower/sv/vector_ops.mdwn @@ -266,18 +266,21 @@ used not just for carry lookahead, also a special type of predication mask opera `((P|G)+G)^P` * +``` P = (A | B) & Ci G = (A & B) +``` Stackoverflow algorithm `((P|G)+G)^P` works on the cumulated bits of P and G from associated vector units (P and G are integers here). The result of the algorithm is the new carry-in which already includes ripple, one bit of carry per element. +``` At each id, compute C[id] = A[id]+B[id]+0 Get G[id] = C[id] > radix -1 Get P[id] = C[id] == radix-1 Join all P[id] together, likewise G[id] Compute newC = ((P|G)+G)^P << 1 result[id] = (C[id] + newC[id]) % radix - +``` two versions: scalar int version and CR based version.