ocarina-backends-lnt.ads 3.33 KB
Newer Older
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
------------------------------------------------------------------------------
--                                                                          --
--                           OCARINA COMPONENTS                             --
--                                                                          --
--                 O C A R I N A . B A C K E N D S . L N T                  --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
--                     Copyright (C) 2016 ESA & ISAE.                       --
--                                                                          --
-- Ocarina  is free software; you can redistribute it and/or modify under   --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
-- sion. Ocarina is distributed in the hope that it will be useful, but     --
-- WITHOUT ANY WARRANTY; without even the implied warranty of               --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     --
--                                                                          --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception,   --
-- version 3.1, as published by the Free Software Foundation.               --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
--                                                                          --
--                 Ocarina is maintained by the TASTE project               --
--                      (taste-users@lists.tuxfamily.org)                   --
--                                                                          --
------------------------------------------------------------------------------

--  This package generates a pn tree

with Ocarina.Types;
hana's avatar
hana committed
35
with Ocarina.Backends.Properties;
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

package Ocarina.Backends.LNT is

   procedure Generate (AADL_Root : Types.Node_Id);

   procedure Init;
   --  Initializes the LNT module

   procedure Reset;
   --  Resets the LNT module

   type Thread is record
      Identifier : Name_Id;
      Period : Natural;
      Capacity : Natural;
hana's avatar
hana committed
51
      Dispatch_Protocol : Properties.Supported_Thread_Dispatch_Protocol;
52
53
54
55
56
57
58
   end record;

   type Thread_Array is array (Natural range <>) of Thread;
   type Period_Array is array (Natural range <>) of Natural;

   System_Name   : Name_Id;
   Thread_Number : Natural := 0;
hana's avatar
hana committed
59
   Not_Periodic_Thread_Number : Natural := 0;
60
61
   Hyperperiod   : Integer := 0;
   LNT_Thread_Instance_List   : List_Id := No_List;
hana's avatar
hana committed
62
   LNT_States_List   : List_Id := No_List;
63
64
65
66
67
68
69
70
71
private
   Separator : Types.Name_Id;
   LNT_Threads  : Node_Id;
   LNT_Types : Node_Id;
   LNT_Processor : Node_Id;
   LNT_Port : Node_Id;
   LNT_Main : Node_Id;
   SVL      : Node_Id;
end Ocarina.Backends.LNT;