blob: ce912f6e0a0ae23ab0306d3adf393952c84458ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
with System;
package Init8 is
type Nested1 is record
C1 : Integer;
C2 : Integer;
C3 : Integer;
end record;
for Nested1'Bit_Order use System.High_Order_First;
for Nested1'Scalar_Storage_Order use System.High_Order_First;
for Nested1 use record
C1 at 0 range 0 .. 31;
C2 at 4 range 0 .. 31;
C3 at 8 range 0 .. 31;
end record;
type R1 is record
I : Integer;
N : Nested1;
end record;
for R1'Bit_Order use System.Low_Order_First;
for R1'Scalar_Storage_Order use System.Low_Order_First;
for R1 use record
I at 0 range 0 .. 31;
N at 4 range 0 .. 95;
end record;
type Nested2 is record
C1 : Integer;
C2 : Integer;
C3 : Integer;
end record;
for Nested2'Bit_Order use System.Low_Order_First;
for Nested2'Scalar_Storage_Order use System.Low_Order_First;
for Nested2 use record
C1 at 0 range 0 .. 31;
C2 at 4 range 0 .. 31;
C3 at 8 range 0 .. 31;
end record;
type R2 is record
I : Integer;
N : Nested2;
end record;
for R2'Bit_Order use System.High_Order_First;
for R2'Scalar_Storage_Order use System.High_Order_First;
for R2 use record
I at 0 range 0 .. 31;
N at 4 range 0 .. 95;
end record;
My_R1 : constant R1 := (I => 16#12345678#,
N => (16#AB0012#, 16#CD0034#, 16#EF0056#));
My_R2 : constant R2 := (I => 16#12345678#,
N => (16#AB0012#, 16#CD0034#, 16#EF0056#));
end Init8;
|