(no commit message)
authorlkcl <lkcl@web>
Mon, 28 Dec 2020 15:37:09 +0000 (15:37 +0000)
committerIkiWiki <ikiwiki.info>
Mon, 28 Dec 2020 15:37:09 +0000 (15:37 +0000)
openpower/sv/vector_ops.mdwn

index e3603e8b4cc1f23d278f03f3a710c4c5cc1de176..6210310b172fa3e40d5facc7aa69881e3999f2b9 100644 (file)
@@ -254,9 +254,21 @@ Pseudo-code:
 
 # Carry-lookahead
 
+used not just for carry lookahead, also a special type of predication mask operation.
+
 * <https://www.geeksforgeeks.org/carry-look-ahead-adder/>
 * <https://media.geeksforgeeks.org/wp-content/uploads/digital_Logic6.png>
 * <https://electronics.stackexchange.com/questions/20085/whats-the-difference-with-carry-look-ahead-generator-block-carry-look-ahead-ge>
 * <https://i.stack.imgur.com/QSLKY.png>
 * <https://stackoverflow.com/questions/27971757/big-integer-addition-code>
   `((P|G)+G)^P`
+
+two versions: scalar int version and CR based version.
+
+scalar int version acts as a scalar carry-propagate, reading XER.CA as input, P and G as regs, and taking a radix argument.  the end bits go into XER.CA and CR0.ge
+
+vector version takes CR0.so as carry in, stores in CR0.so and CR.ge end bits.
+
+if zero (no propagation) then CR0.eq is zero
+
+CR based version, TODO.