55 lines
1.5 KiB
Ada
55 lines
1.5 KiB
Ada
package Interfaces
|
|
with Pure is
|
|
|
|
type Bit_1 is mod 2**1
|
|
with Size => 1;
|
|
type Bit_2 is mod 2**2
|
|
with Size => 2;
|
|
type Bit_3 is mod 2**3
|
|
with Size => 3;
|
|
type Bit_4 is mod 2**4
|
|
with Size => 4;
|
|
type Bit_5 is mod 2**5
|
|
with Size => 5;
|
|
type Bit_6 is mod 2**6
|
|
with Size => 6;
|
|
type Bit_7 is mod 2**7
|
|
with Size => 7;
|
|
type Bit_8 is mod 2**8
|
|
with Size => 8;
|
|
type Bit_10 is mod 2**10
|
|
with Size => 10;
|
|
|
|
type Bit_16 is mod 2**16
|
|
with Size => 16;
|
|
|
|
type Bit_20 is mod 2**20
|
|
with Size => 20;
|
|
|
|
type Bit_24 is mod 2**24
|
|
with Size => 24;
|
|
|
|
type Bit_31 is mod 2**31
|
|
with Size => 31;
|
|
type Bit_32 is mod 2**32
|
|
with Size => 32;
|
|
|
|
type Array_Bit_1 is array (Natural range <>) of Bit_1
|
|
with Component_Size => 1;
|
|
|
|
type Array_Bit_32 is array (Natural range <>) of Bit_32
|
|
with Component_Size => 32;
|
|
|
|
function Shift_Left (Value : Bit_32; Amount : Natural)
|
|
return Bit_32 with Import, Convention => Intrinsic;
|
|
function Shift_Right (Value : Bit_32; Amount : Natural)
|
|
return Bit_32 with Import, Convention => Intrinsic;
|
|
function Shift_Right_Arithmetic (Value : Bit_32; Amount : Natural)
|
|
return Bit_32 with Import, Convention => Intrinsic;
|
|
function Rotate_Left (Value : Bit_32; Amount : Natural)
|
|
return Bit_32 with Import, Convention => Intrinsic;
|
|
function Rotate_Right (Value : Bit_32; Amount : Natural)
|
|
return Bit_32 with Import, Convention => Intrinsic;
|
|
|
|
end Interfaces;
|