raw
ffa_ch9_exodus.kv       1 ------------------------------------------------------------------------------
ffa_ch9_exodus.kv 2 ------------------------------------------------------------------------------
ffa_ch9_exodus.kv 3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
ffa_ch9_exodus.kv 4 -- --
ffa_ch9_exodus.kv 5 -- (C) 2018 Stanislav Datskovskiy ( www.loper-os.org ) --
ffa_ch9_exodus.kv 6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
ffa_ch9_exodus.kv 7 -- --
ffa_ch9_exodus.kv 8 -- You do not have, nor can you ever acquire the right to use, copy or --
ffa_ch9_exodus.kv 9 -- distribute this software ; Should you use this software for any purpose, --
ffa_ch9_exodus.kv 10 -- or copy and distribute it to anyone or in any manner, you are breaking --
ffa_ch9_exodus.kv 11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
ffa_ch9_exodus.kv 12 -- continue doing so for the indefinite future. In any case, please --
ffa_ch9_exodus.kv 13 -- always : read and understand any software ; verify any PGP signatures --
ffa_ch9_exodus.kv 14 -- that you use - for any purpose. --
ffa_ch9_exodus.kv 15 -- --
ffa_ch9_exodus.kv 16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
ffa_ch9_exodus.kv 17 ------------------------------------------------------------------------------
ffa_ch9_exodus.kv 18 ------------------------------------------------------------------------------
ffa_ch9_exodus.kv 19
ffa_ch9_exodus.kv 20 with Words; use Words;
ffa_ch9_exodus.kv 21
ffa_ch9_exodus.kv 22
ffa_ch9_exodus.kv 23 package W_Mul is
ffa_ch9_exodus.kv 24
ffa_ch9_exodus.kv 25 pragma Pure;
ffa_ch9_exodus.kv 26
ffa_ch9_exodus.kv 27 -- The bitness of a Half-Word
ffa_ch9_exodus.kv 28 HalfBitness : constant Positive := Bitness / 2;
ffa_ch9_exodus.kv 29 subtype HalfWord is Word range 0 .. 2**HalfBitness;
ffa_ch9_exodus.kv 30
ffa_ch9_exodus.kv 31 -- The number of bytes in a Half-Word
ffa_ch9_exodus.kv 32 HalfByteness : constant Positive := Byteness / 2;
ffa_ch9_exodus.kv 33
ffa_ch10_karatsub... 34 -- Multiply half-words X and Y, producing a Word-sized product (Iron)
ffa_ch10_karatsub... 35 function Mul_HalfWord_Iron(X : in HalfWord; Y : in HalfWord) return Word;
ffa_ch10_karatsub... 36
ffa_ch10_karatsub... 37 -- Multiply half-words X and Y, producing a Word-sized product (Egyptian)
ffa_ch10_karatsub... 38 function Mul_HalfWord_Soft(X : in HalfWord; Y : in HalfWord) return Word;
ffa_ch9_exodus.kv 39
ffa_ch9_exodus.kv 40 -- Get the bottom half of a Word
ffa_ch9_exodus.kv 41 function BottomHW(W : in Word) return HalfWord;
ffa_ch9_exodus.kv 42
ffa_ch9_exodus.kv 43 -- Get the top half of a Word
ffa_ch9_exodus.kv 44 function TopHW(W : in Word) return HalfWord;
ffa_ch9_exodus.kv 45
ffa_ch10_karatsub... 46 -- Carry out X*Y mult, return lower word XY_LW and upper word XY_HW (Iron)
ffa_ch9_exodus.kv 47 procedure Mul_Word(X : in Word; Y : in Word; XY_LW : out Word; XY_HW : out Word);
ffa_ch9_exodus.kv 48
ffa_ch9_exodus.kv 49 end W_Mul;