raw
ffa_ch3_shifts.kv       1 ------------------------------------------------------------------------------
ffa_ch3_shifts.kv 2 ------------------------------------------------------------------------------
ffa_ch3_shifts.kv 3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
ffa_ch3_shifts.kv 4 -- --
ffa_ch15_gcd.kv 5 -- (C) 2019 Stanislav Datskovskiy ( www.loper-os.org ) --
ffa_ch3_shifts.kv 6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
ffa_ch3_shifts.kv 7 -- --
ffa_ch3_shifts.kv 8 -- You do not have, nor can you ever acquire the right to use, copy or --
ffa_ch3_shifts.kv 9 -- distribute this software ; Should you use this software for any purpose, --
ffa_ch3_shifts.kv 10 -- or copy and distribute it to anyone or in any manner, you are breaking --
ffa_ch3_shifts.kv 11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
ffa_ch3_shifts.kv 12 -- continue doing so for the indefinite future. In any case, please --
ffa_ch3_shifts.kv 13 -- always : read and understand any software ; verify any PGP signatures --
ffa_ch3_shifts.kv 14 -- that you use - for any purpose. --
ffa_ch3_shifts.kv 15 -- --
ffa_ch3_shifts.kv 16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
ffa_ch3_shifts.kv 17 ------------------------------------------------------------------------------
ffa_ch3_shifts.kv 18 ------------------------------------------------------------------------------
ffa_ch3_shifts.kv 19
ffa_ch3_shifts.kv 20 with Words; use Words;
ffa_ch3_shifts.kv 21 with FZ_Type; use FZ_Type;
ffa_ch3_shifts.kv 22
ffa_ch3_shifts.kv 23
ffa_ch3_shifts.kv 24 package FZ_Shift is
ffa_ch3_shifts.kv 25
ffa_ch3_shifts.kv 26 pragma Pure;
ffa_ch3_shifts.kv 27
ffa_ch3_shifts.kv 28 --------------------------------------------------------------
ffa_ch14_barrett.kv 29 -- WARNING: These ops are not precondition-shielded, and
ffa_ch14_barrett.kv 30 -- must never be directly exposed via the user API ( ffa.ads )
ffa_ch14_barrett.kv 31 --------------------------------------------------------------
ffa_ch14_barrett.kv 32
ffa_ch14_barrett.kv 33 --------------------------------------------------------------
ffa_ch3_shifts.kv 34 -- Shift Right
ffa_ch3_shifts.kv 35 --------------------------------------------------------------
ffa_ch3_shifts.kv 36
ffa_ch3_shifts.kv 37 -- ShiftedN := N >> Count (with Overflow Input and Output)
ffa_ch14_barrett.kv 38 -- WARNING: OF_in MUST be of valid bit-width for the shift!
ffa_ch3_shifts.kv 39 procedure FZ_ShiftRight_O_I(N : in FZ;
ffa_ch3_shifts.kv 40 ShiftedN : out FZ;
ffa_ch3_shifts.kv 41 Count : in WBit_Index;
ffa_ch3_shifts.kv 42 Overflow : out Word;
ffa_ch3_shifts.kv 43 OF_in : in Word);
ffa_ch11_tuning_a... 44 pragma Inline_Always(FZ_ShiftRight_O_I);
ffa_ch3_shifts.kv 45
ffa_ch3_shifts.kv 46 -- ShiftedN := N >> Count (with Overflow Output only)
ffa_ch3_shifts.kv 47 procedure FZ_ShiftRight_O(N : in FZ;
ffa_ch3_shifts.kv 48 ShiftedN : out FZ;
ffa_ch3_shifts.kv 49 Count : in WBit_Index;
ffa_ch3_shifts.kv 50 Overflow : out Word);
ffa_ch11_tuning_a... 51 pragma Inline_Always(FZ_ShiftRight_O);
ffa_ch3_shifts.kv 52
ffa_ch3_shifts.kv 53 -- ShiftedN := N >> Count (no Overflow output or input)
ffa_ch3_shifts.kv 54 procedure FZ_ShiftRight(N : in FZ;
ffa_ch3_shifts.kv 55 ShiftedN : out FZ;
ffa_ch3_shifts.kv 56 Count : in WBit_Index);
ffa_ch11_tuning_a... 57 pragma Inline_Always(FZ_ShiftRight);
ffa_ch3_shifts.kv 58
ffa_ch3_shifts.kv 59 --------------------------------------------------------------
ffa_ch3_shifts.kv 60 -- Shift Left
ffa_ch3_shifts.kv 61 --------------------------------------------------------------
ffa_ch3_shifts.kv 62
ffa_ch3_shifts.kv 63 -- ShiftedN := N << Count (with Overflow Input and Output)
ffa_ch14_barrett.kv 64 -- WARNING: OF_in MUST be of valid bit-width for the shift!
ffa_ch3_shifts.kv 65 procedure FZ_ShiftLeft_O_I(N : in FZ;
ffa_ch3_shifts.kv 66 ShiftedN : out FZ;
ffa_ch3_shifts.kv 67 Count : in WBit_Index;
ffa_ch3_shifts.kv 68 Overflow : out Word;
ffa_ch3_shifts.kv 69 OF_in : in Word);
ffa_ch11_tuning_a... 70 pragma Inline_Always(FZ_ShiftLeft_O_I);
ffa_ch3_shifts.kv 71
ffa_ch3_shifts.kv 72 -- ShiftedN := N << Count (with Overflow Output only)
ffa_ch3_shifts.kv 73 procedure FZ_ShiftLeft_O(N : in FZ;
ffa_ch3_shifts.kv 74 ShiftedN : out FZ;
ffa_ch3_shifts.kv 75 Count : in WBit_Index;
ffa_ch3_shifts.kv 76 Overflow : out Word);
ffa_ch11_tuning_a... 77 pragma Inline_Always(FZ_ShiftLeft_O);
ffa_ch3_shifts.kv 78
ffa_ch3_shifts.kv 79 -- ShiftedN := N << Count (no Overflow output or input)
ffa_ch3_shifts.kv 80 procedure FZ_ShiftLeft(N : in FZ;
ffa_ch3_shifts.kv 81 ShiftedN : out FZ;
ffa_ch3_shifts.kv 82 Count : in WBit_Index);
ffa_ch11_tuning_a... 83 pragma Inline_Always(FZ_ShiftLeft);
ffa_ch3_shifts.kv 84
ffa_ch3_shifts.kv 85 end FZ_Shift;