- 2D76A6B3E1EA5A1719CFFE798CA719A0D80533EED7E4A87B553398DB655A5CAF2EA888BA48ED2FD700ED292CFD036CF1AA093D38E2C4A22A0154DBE90D7FA112
+ BCB4CC4D9466EC43F01B7B9A2F8E473B013843B6BC0DAB034782054EF73B4D961345692A645ECF9ACA3451B567F54B5D2B822687BB6F74F031FCECA8B41325CD
ffa/libffa/word_ops.adb
(2 . 7)(2 . 7)
804 ------------------------------------------------------------------------------
805 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
806 -- --
807 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
808 -- (C) 2018 Stanislav Datskovskiy ( www.loper-os.org ) --
809 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
810 -- --
811 -- You do not have, nor can you ever acquire the right to use, copy or --
(55 . 9)(55 . 10)
813 -- +-+-+-+-----+--------------+-----+----------------+
814 -- | | 'Carry' out: | | 'Borrow' out: |
815 -- +-+-+-+-----+--------------+-----+----------------+
816 -- | | | | |(a and b) or | |(~a and b) or |
817 -- |A|B|C|A+B+C| ((a or b) and|A-B-C| ((~a or b) and |
818 -- | | | | | ~(A+B+C)) | | (A-B-C)) |
819 -- | | | | |(a and b) or | |(b and (A-B-C)) |
820 -- |A|B|C|A+B+C| ((a or b) and|A-B-C| or |
821 -- | | | | | ~(A+B+C)) | |((b or (A-B-C)) |
822 -- | | | | | | | and ~a) |
823 -- +-+-+-+-----+--------------+-----+----------------+
824 -- |0|0|0| 0 | 0 | 0 | 0 |
825 -- +-+-+-+-----+--------------+-----+----------------+
(78 . 7)(79 . 6)
827 -- This base case extends to any N bit register, since
828 -- both equations depend ~strictly~ on A, B, and C.
829
830
831 -- Without any branching: if Sel == 0, return A; if Sel == 1, return B.
832 function W_Mux(A : in Word; B : in Word; Sel : in WBool) return Word is
833 begin