Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Ocarina
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
Ocarina
Commits
7d85a19c
Commit
7d85a19c
authored
Aug 30, 2013
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added support for ISR tasks
parent
9899b809
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
6097 additions
and
5978 deletions
+6097
-5978
resources/AADLv2/aadl_project.aadl
resources/AADLv2/aadl_project.aadl
+1
-1
resources/deployment.aadl
resources/deployment.aadl
+1
-1
src/backends/ocarina-backends-ada_tree-nutils.ads
src/backends/ocarina-backends-ada_tree-nutils.ads
+2
-1
src/backends/ocarina-backends-po_hi_ada-activity.adb
src/backends/ocarina-backends-po_hi_ada-activity.adb
+64
-0
src/backends/ocarina-backends-po_hi_ada-main.adb
src/backends/ocarina-backends-po_hi_ada-main.adb
+3
-2
src/backends/ocarina-backends-po_hi_ada-runtime.adb
src/backends/ocarina-backends-po_hi_ada-runtime.adb
+2
-1
src/backends/ocarina-backends-po_hi_ada-runtime.ads
src/backends/ocarina-backends-po_hi_ada-runtime.ads
+3
-0
src/backends/ocarina-backends-properties.adb
src/backends/ocarina-backends-properties.adb
+29
-3
src/backends/ocarina-backends-properties.ads
src/backends/ocarina-backends-properties.ads
+8
-0
tests/real-annexes-execution/test_real_exec_02.aadl.out
tests/real-annexes-execution/test_real_exec_02.aadl.out
+4
-4
tests/real-annexes-parsing/test_real_parse_01.aadl.out
tests/real-annexes-parsing/test_real_parse_01.aadl.out
+1
-1
tests/real-annexes-parsing/test_real_parse_02.aadl.out
tests/real-annexes-parsing/test_real_parse_02.aadl.out
+1
-1
tests/real-annexes-parsing/test_real_parse_03.aadl.out
tests/real-annexes-parsing/test_real_parse_03.aadl.out
+1
-1
tests/real-annexes-parsing/test_real_parse_04.aadl.out
tests/real-annexes-parsing/test_real_parse_04.aadl.out
+1
-1
tests/real-annexes-parsing/test_real_parse_05.aadl.out
tests/real-annexes-parsing/test_real_parse_05.aadl.out
+1
-1
tests/test_tree_p2/test.aadl.out
tests/test_tree_p2/test.aadl.out
+5975
-5960
No files found.
resources/AADLv2/aadl_project.aadl
View file @
7d85a19c
...
...
@@ -23,7 +23,7 @@ property set AADL_Project is
Spin_Lock,
Semaphore);
Supported_Dispatch_Protocols: type enumeration (Periodic, Sporadic, Aperiodic, Timed, Hybrid, Background);
Supported_Dispatch_Protocols: type enumeration (Periodic, Sporadic, Aperiodic, Timed, Hybrid, Background
, Interrupt
);
Supported_Queue_Processing_Protocols: type enumeration (Fifo);
...
...
resources/deployment.aadl
View file @
7d85a19c
...
...
@@ -77,7 +77,7 @@ property set Deployment is
Driver_Name : aadlstring applies to (device);
Configuration : aadlstring applies to (device);
Configuration : aadlstring applies to (device
, thread
);
Config : aadlstring applies to (device);
...
...
src/backends/ocarina-backends-ada_tree-nutils.ads
View file @
7d85a19c
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
2
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
3
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -228,6 +228,7 @@ package Ocarina.Backends.Ada_Tree.Nutils is
P_Init
,
P_Initialize_Entrypoint
,
P_Index
,
P_Interrupt_Identifier
,
P_Item
,
P_Job
,
P_Key
,
...
...
src/backends/ocarina-backends-po_hi_ada-activity.adb
View file @
7d85a19c
...
...
@@ -397,6 +397,9 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
function
Background_Task_Instantiation
(
E
:
Node_Id
)
return
Node_Id
;
-- Build a package instantiation for a background task
function
ISR_Task_Instantiation
(
E
:
Node_Id
)
return
Node_Id
;
-- Build a package instantiation for a background task
function
Task_Job_Spec
(
E
:
Node_Id
)
return
Node_Id
;
-- Creates the parameterless subprogram specification that does
-- the thread's job.
...
...
@@ -434,6 +437,7 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
if
Get_Thread_Dispatch_Protocol
(
E
)
=
Thread_Periodic
or
else
Get_Thread_Dispatch_Protocol
(
E
)
=
Thread_Sporadic
or
else
Get_Thread_Dispatch_Protocol
(
E
)
=
Thread_Hybrid
or
else
Get_Thread_Dispatch_Protocol
(
E
)
=
Thread_ISR
then
-- The task period of minimal interarrival time
...
...
@@ -722,6 +726,48 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
return
N
;
end
Background_Task_Instantiation
;
----------------------------
-- ISR_Task_Instantiation --
----------------------------
function
ISR_Task_Instantiation
(
E
:
Node_Id
)
return
Node_Id
is
N
:
Node_Id
;
Parameter_List
:
constant
List_Id
:=
New_List
(
ADN
.
K_List_Id
);
Configuration
:
Name_Id
;
begin
Configuration
:=
Get_Configuration
(
E
);
if
Configuration
=
No_Name
then
Display_Located_Error
(
Loc
(
E
),
"No interrupt configured"
,
Fatal
=>
True
);
end
if
;
N
:=
Make_Withed_Package
(
RU
(
RU_Ada_Interrupts_Names
));
Append_Node_To_List
(
N
,
ADN
.
Withed_Packages
(
Current_Package
));
N
:=
Make_Used_Package
(
RU
(
RU_Ada_Interrupts_Names
));
Append_Node_To_List
(
N
,
ADN
.
Visible_Part
(
Current_Package
));
N
:=
Make_Parameter_Association
(
Selector_Name
=>
Make_Defining_Identifier
(
PN
(
P_Interrupt_Identifier
)),
Actual_Parameter
=>
Make_Defining_Identifier
(
Get_Configuration
(
E
)));
Append_Node_To_List
(
N
,
Parameter_List
);
-- Append the common parameters
Cyclic_Task_Instantiation_Formals
(
E
,
Parameter_List
);
-- Build the package instantiation
N
:=
Make_Package_Instantiation
(
Defining_Identifier
=>
Map_Task_Identifier
(
E
),
Generic_Package
=>
RU
(
RU_PolyORB_HI_ISR_Task
),
Parameter_List
=>
Parameter_List
);
return
N
;
end
ISR_Task_Instantiation
;
-------------------------------
-- Hybrid_Task_Instantiation --
-------------------------------
...
...
@@ -1180,6 +1226,12 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
&
Get_Name_String
(
Display_Name
(
Identifier
(
S
))));
Append_Node_To_List
(
N
,
ADN
.
Visible_Part
(
Current_Package
));
when
Thread_ISR
=>
N
:=
Message_Comment
(
"ISR task : "
&
Get_Name_String
(
Display_Name
(
Identifier
(
S
))));
Append_Node_To_List
(
N
,
ADN
.
Visible_Part
(
Current_Package
));
when
others
=>
Display_Located_Error
(
AIN
.
Loc
(
E
),
...
...
@@ -1227,6 +1279,12 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
N
:=
Background_Task_Instantiation
(
E
);
Append_Node_To_List
(
N
,
ADN
.
Visible_Part
(
Current_Package
));
when
Thread_ISR
=>
-- Instantiate the ISR task
N
:=
ISR_Task_Instantiation
(
E
);
Append_Node_To_List
(
N
,
ADN
.
Visible_Part
(
Current_Package
));
when
others
=>
raise
Program_Error
;
end
case
;
...
...
@@ -4124,6 +4182,12 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
&
Get_Name_String
(
Display_Name
(
Identifier
(
S
))));
Append_Node_To_List
(
N
,
ADN
.
Statements
(
Current_Package
));
when
Thread_ISR
=>
N
:=
Message_Comment
(
"ISR task : "
&
Get_Name_String
(
Display_Name
(
Identifier
(
S
))));
Append_Node_To_List
(
N
,
ADN
.
Statements
(
Current_Package
));
when
Thread_Hybrid
=>
N
:=
Message_Comment
(
"Hybrid task : "
...
...
src/backends/ocarina-backends-po_hi_ada-main.adb
View file @
7d85a19c
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
2
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
3
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -351,7 +351,8 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
|
Thread_Sporadic
|
Thread_Hybrid
|
Thread_Aperiodic
|
Thread_Background
=>
|
Thread_Background
|
Thread_ISR
=>
Add_With_Package
(
E
=>
RU
(
RU_PolyORB_HI_Generated_Activity
,
False
),
...
...
src/backends/ocarina-backends-po_hi_ada-runtime.adb
View file @
7d85a19c
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
2
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
3
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -268,6 +268,7 @@ package body Ocarina.Backends.PO_HI_Ada.Runtime is
(
RUD
(
RU_Ada_Strings_Wide_Bounded_Generic_Bounded_Length
));
Declare_Subunit
(
RUD
(
RU_Ada_Strings_Bounded_Generic_Bounded_Length
));
Declare_Subunit
(
RUD
(
RU_PolyORB_HI_Hybrid_Task_Driver_Driver
));
Declare_Subunit
(
RUD
(
RU_Ada_Interrupts_Names
));
-- Package Standard is not a subunit but it has to be handled
-- in a specific way as well as subunit.
...
...
src/backends/ocarina-backends-po_hi_ada-runtime.ads
View file @
7d85a19c
...
...
@@ -39,6 +39,8 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
(
RU_Null
,
RU_Ada
,
RU_Ada_Exceptions
,
RU_Ada_Interrupts
,
RU_Ada_Interrupts_Names
,
RU_Ada_Real_Time
,
RU_Ada_Strings
,
RU_Ada_Strings_Bounded
,
...
...
@@ -64,6 +66,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RU_PolyORB_HI_Periodic_Task
,
RU_PolyORB_HI_Sporadic_Task
,
RU_PolyORB_HI_Hybrid_Task
,
RU_PolyORB_HI_ISR_Task
,
RU_PolyORB_HI_Port_Kinds
,
RU_PolyORB_HI_Marshallers_G
,
RU_PolyORB_HI_Port_Type_Marshallers
,
...
...
src/backends/ocarina-backends-properties.adb
View file @
7d85a19c
...
...
@@ -290,6 +290,7 @@ package body Ocarina.Backends.Properties is
Thread_Sporadic_Name
:
Name_Id
;
Thread_Hybrid_Name
:
Name_Id
;
Thread_Timed_Name
:
Name_Id
;
Thread_Interrupt_Name
:
Name_Id
;
Thread_Background_Name
:
Name_Id
;
Time_Ps_Name
:
Name_Id
;
...
...
@@ -1821,6 +1822,9 @@ package body Ocarina.Backends.Properties is
elsif
P_Name
=
Thread_Aperiodic_Name
then
return
Thread_Aperiodic
;
elsif
P_Name
=
Thread_Interrupt_Name
then
return
Thread_ISR
;
elsif
P_Name
=
Thread_Sporadic_Name
then
if
not
Is_Defined_Integer_Property
(
T
,
Thread_Period
)
then
Display_Located_Error
...
...
@@ -1993,7 +1997,10 @@ package body Ocarina.Backends.Properties is
pragma
Assert
(
Is_Thread
(
T
));
case
Get_Thread_Dispatch_Protocol
(
T
)
is
when
Thread_Periodic
|
Thread_Sporadic
|
Thread_Hybrid
=>
when
Thread_Periodic
|
Thread_Sporadic
|
Thread_Hybrid
|
Thread_ISR
=>
-- We are sure the thread has a period
The_Period
:=
Get_Time_Property_Value
(
T
,
Thread_Period
);
...
...
@@ -2046,7 +2053,10 @@ package body Ocarina.Backends.Properties is
pragma
Assert
(
Is_Thread
(
T
));
case
Get_Thread_Dispatch_Protocol
(
T
)
is
when
Thread_Periodic
|
Thread_Sporadic
|
Thread_Hybrid
=>
when
Thread_Periodic
|
Thread_Sporadic
|
Thread_Hybrid
|
Thread_ISR
=>
if
Is_Defined_Property
(
T
,
Thread_Deadline
)
then
return
Get_Time_Property_Value
(
T
,
Thread_Deadline
);
else
...
...
@@ -3245,7 +3255,8 @@ package body Ocarina.Backends.Properties is
Thread_Aperiodic_Name
:=
Get_String_Name
(
"aperiodic"
);
Thread_Sporadic_Name
:=
Get_String_Name
(
"sporadic"
);
Thread_Hybrid_Name
:=
Get_String_Name
(
"hybrid"
);
Thread_Timed_Name
:=
Get_String_Name
(
"timed"
);
Thread_Timed_Name
:=
Get_String_Name
(
"timed"
);
Thread_Interrupt_Name
:=
Get_String_Name
(
"interrupt"
);
Thread_Background_Name
:=
Get_String_Name
(
"background"
);
Time_Ps_Name
:=
Get_String_Name
(
"ps"
);
...
...
@@ -4455,6 +4466,21 @@ package body Ocarina.Backends.Properties is
return
No_Name
;
end
Get_Driver_Name
;
-----------------------
-- Get_Configuration --
-----------------------
function
Get_Configuration
(
Device
:
Node_Id
)
return
Name_Id
is
begin
if
Is_Defined_String_Property
(
Device
,
Get_String_Name
(
"deployment::configuration"
))
then
return
Get_String_Property
(
Device
,
Get_String_Name
(
"deployment::configuration"
));
end
if
;
return
No_Name
;
end
Get_Configuration
;
----------------------------
-- Get_Send_Function_Name --
----------------------------
...
...
src/backends/ocarina-backends-properties.ads
View file @
7d85a19c
...
...
@@ -370,6 +370,7 @@ package Ocarina.Backends.Properties is
Thread_Hybrid
,
Thread_Timed
,
Thread_Background
,
Thread_ISR
,
Thread_None
);
type
Time_Units
is
...
...
@@ -823,6 +824,13 @@ package Ocarina.Backends.Properties is
return
ARINC653_Memory_Kind
;
-- Returns the memory_kind property value of a memory component.
-----------------------
-- Device properties --
-----------------------
function
Get_Configuration
(
Device
:
Node_Id
)
return
Name_Id
;
-- Returns the configuraton string attached to a device
function
Get_Driver_Name
(
Device
:
Node_Id
)
return
Name_Id
;
-- Returns the name of the driver.
...
...
tests/real-annexes-execution/test_real_exec_02.aadl.out
View file @
7d85a19c
...
...
@@ -151,22 +151,22 @@ Evaluating theorem set_declaration_is_passing_through
* Iterate for variable: rma.erc32_node_a_task_1
Content of set accessor_flows (test_real_exec_02.aadl:251:21) is
anonymous end to end flow :379
0
end to end flow spec
anonymous end to end flow :379
1
end to end flow spec
=> Result: TRUE
* Iterate for variable: rma.erc32_node_a_task_2
Content of set accessor_flows (test_real_exec_02.aadl:251:21) is
anonymous end to end flow :379
0
end to end flow spec
anonymous end to end flow :379
1
end to end flow spec
=> Result: TRUE
* Iterate for variable: rma.erc32_node_a_task_12
Content of set accessor_flows (test_real_exec_02.aadl:251:21) is
anonymous end to end flow :379
1
end to end flow spec
anonymous end to end flow :379
2
end to end flow spec
=> Result: TRUE
* Iterate for variable: rma.erc32_node_a_task_22
Content of set accessor_flows (test_real_exec_02.aadl:251:21) is
anonymous end to end flow :379
1
end to end flow spec
anonymous end to end flow :379
2
end to end flow spec
=> Result: TRUE
theorem set_declaration_is_passing_through is: TRUE
...
...
tests/real-annexes-parsing/test_real_parse_01.aadl.out
View file @
7d85a19c
...
...
@@ -55,7 +55,7 @@ property set Deployment is
applies
to
(
device
);
Configuration
:
aadlstring
applies
to
(
device
);
applies
to
(
device
,
thread
);
Config
:
aadlstring
applies
to
(
device
);
...
...
tests/real-annexes-parsing/test_real_parse_02.aadl.out
View file @
7d85a19c
...
...
@@ -55,7 +55,7 @@ property set Deployment is
applies
to
(
device
);
Configuration
:
aadlstring
applies
to
(
device
);
applies
to
(
device
,
thread
);
Config
:
aadlstring
applies
to
(
device
);
...
...
tests/real-annexes-parsing/test_real_parse_03.aadl.out
View file @
7d85a19c
...
...
@@ -55,7 +55,7 @@ property set Deployment is
applies
to
(
device
);
Configuration
:
aadlstring
applies
to
(
device
);
applies
to
(
device
,
thread
);
Config
:
aadlstring
applies
to
(
device
);
...
...
tests/real-annexes-parsing/test_real_parse_04.aadl.out
View file @
7d85a19c
...
...
@@ -55,7 +55,7 @@ property set Deployment is
applies
to
(
device
);
Configuration
:
aadlstring
applies
to
(
device
);
applies
to
(
device
,
thread
);
Config
:
aadlstring
applies
to
(
device
);
...
...
tests/real-annexes-parsing/test_real_parse_05.aadl.out
View file @
7d85a19c
...
...
@@ -55,7 +55,7 @@ property set Deployment is
applies
to
(
device
);
Configuration
:
aadlstring
applies
to
(
device
);
applies
to
(
device
,
thread
);
Config
:
aadlstring
applies
to
(
device
);
...
...
tests/test_tree_p2/test.aadl.out
View file @
7d85a19c
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment