| 1 |
package Fixedpnt2 is |
| 2 |
|
| 3 |
type T_Integer_32 is range -2 ** 31 .. 2 ** 31 - 1 |
| 4 |
with Size => 32; |
| 5 |
|
| 6 |
type T_Integer_64 is range -2 ** 63 .. 2 ** 63 - 1 |
| 7 |
with Size => 64; |
| 8 |
|
| 9 |
C_Unit : constant := 0.001; -- One millisecond. |
| 10 |
C_First : constant := (-2 ** 63) * C_Unit; |
| 11 |
C_Last : constant := (2 ** 63 - 1) * C_Unit; |
| 12 |
|
| 13 |
type My_Type is |
| 14 |
delta C_Unit range C_First .. C_Last |
| 15 |
with Size => 64, |
| 16 |
Small => C_Unit; |
| 17 |
|
| 18 |
function "*" (Left : in T_Integer_32; Right : in My_Type) |
| 19 |
return My_Type; |
| 20 |
function "*" (Left : in My_Type; Right : in T_Integer_32) |
| 21 |
return My_Type; |
| 22 |
|
| 23 |
end Fixedpnt2; |