OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [specs/] [discr_private.ads] - Blame information for rev 696

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-gnatws" }
3
 
4
package Discr_Private is
5
 
6
   package Dec is
7
      type T_DECIMAL (Prec : Integer := 1) is private;
8
   private
9
      type T_DECIMAL (Prec : Integer := 1) is record
10
         case Prec is
11
            when  1 .. 2 => Value : Integer;
12
            when others => null;
13
         end case;
14
      end record;
15
   end;
16
 
17
   type Value_T is record
18
      Bits  : Dec.T_DECIMAL(1);
19
   end record;
20
   for Value_T'size use 88;
21
 
22
   type Value_Entry_T is record
23
      Index : Integer;
24
      Value : Value_T;
25
   end record;
26
 
27
   type Value_Mode is (QI, HI, SI, DI, XI);
28
   for Value_Mode'size use 8;
29
 
30
   type Valid_Modes_T is array (Value_Mode) of Boolean;
31
 
32
   type Register_T is record
33
      Ventry : Value_Entry_T;
34
      Vmodes : Valid_Modes_T;
35
   end record;
36
 
37
   type Regid_T is (Latch, Acc);
38
   for Regid_T use (Latch => 0, Acc => 2);
39
   for Regid_T'Size use 8;
40
 
41
   type Regarray_T is array (Regid_T) of Register_T;
42
 
43
   type Machine_T (Up : Boolean := True) is record
44
      case Up is
45
         when True  => Regs : Regarray_T;
46
         when False => null;
47
       end case;
48
   end record;
49
 
50
end Discr_Private;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.