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
984432d0
Commit
984432d0
authored
Mar 16, 2020
by
Jerome Hugues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Address name collision in mapping multiple thread port to the same
process For openaadl/ocarina#251
parent
3cb1d889
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
19 deletions
+43
-19
src/backends/air_conf/ocarina-backends-air_conf-air_configuration.adb
.../air_conf/ocarina-backends-air_conf-air_configuration.adb
+13
-12
src/backends/air_conf/ocarina-backends-air_conf-partitions.adb
...ackends/air_conf/ocarina-backends-air_conf-partitions.adb
+7
-2
src/backends/po_hi_c/ocarina-backends-po_hi_c-deployment.adb
src/backends/po_hi_c/ocarina-backends-po_hi_c-deployment.adb
+23
-5
No files found.
src/backends/air_conf/ocarina-backends-air_conf-air_configuration.adb
View file @
984432d0
...
...
@@ -45,6 +45,7 @@ with Ocarina.Backends.Utils;
with
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
with
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
with
Ocarina
.
Backends
.
XML_Values
;
with
Ocarina
.
Backends
.
C_Common
.
Mapping
;
package
body
Ocarina
.
Backends
.
AIR_Conf
.
AIR_Configuration
is
...
...
@@ -56,6 +57,7 @@ package body Ocarina.Backends.AIR_Conf.AIR_Configuration is
use
Ocarina
.
Backends
.
Properties
.
ARINC653
;
use
Ocarina
.
Backends
.
Utils
;
use
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
use
Ocarina
.
Backends
.
C_Common
.
Mapping
;
package
AIN
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
package
AINU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
...
...
@@ -150,21 +152,20 @@ package body Ocarina.Backends.AIR_Conf.AIR_Configuration is
while
Present
(
C
)
loop
if
Kind
(
C
)
=
K_Connection_Instance
then
Source_Port_Name
:=
AIN
.
Name
(
AIN
.
Identifier
(
AIN
.
Item
(
AIN
.
Next_Node
(
AIN
.
First_Node
(
AIN
.
Path
(
AIN
.
Source
(
C
))))))
);
Map_C_Enumerator_
Name
(
AIN
.
Item
(
AIN
.
Next_Node
(
AIN
.
First_Node
(
AIN
.
Path
(
AIN
.
Source
(
C
))))),
Fully_Qualify_Parent
=>
True
);
Destination_Port_Name
:=
AIN
.
Name
(
AIN
.
Identifier
(
AIN
.
Item
(
AIN
.
Nex
t_Node
(
AIN
.
First_Node
(
AIN
.
Path
(
AIN
.
Destination
(
C
))))))
);
Map_C_Enumerator_
Name
(
AIN
.
Item
(
AIN
.
Next_Node
(
AIN
.
Firs
t_Node
(
AIN
.
Path
(
AIN
.
Destination
(
C
))))),
Fully_Qualify_Parent
=>
True
);
Source_Partition
:=
AIN
.
Corresponding_Instance
...
...
src/backends/air_conf/ocarina-backends-air_conf-partitions.adb
View file @
984432d0
...
...
@@ -40,6 +40,7 @@ with Ocarina.ME_AADL.AADL_Instances.Nutils;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Entities
;
with
Ocarina
.
ME_AADL
.
AADL_Tree
.
Entities
;
with
Ocarina
.
Backends
.
C_Common
.
Mapping
;
with
Ocarina
.
Backends
.
Utils
;
with
Ocarina
.
Instances
.
Queries
;
...
...
@@ -58,6 +59,7 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
use
Ocarina
.
ME_AADL
.
AADL_Instances
.
Entities
;
use
Ocarina
.
Instances
.
Queries
;
use
Ocarina
.
Backends
.
C_Common
.
Mapping
;
use
Ocarina
.
Backends
.
Utils
;
use
Ocarina
.
Backends
.
Messages
;
...
...
@@ -269,12 +271,15 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
Port_Node
:=
Make_XML_Node
(
"Queuing_Port"
);
end
if
;
-- Port name
-- Port name
: partition + port name
Set_Str_To_Name_Buffer
(
"Name"
);
P
:=
Make_Defining_Identifier
(
Name_Find
);
Get_Name_String
(
Display_Name
(
Identifier
(
F
)));
Get_Name_String
(
Map_C_Enumerator_Name
(
F
,
Fully_Qualify_Parent
=>
True
));
Q
:=
Make_Defining_Identifier
(
To_Lower
(
Name_Find
));
Append_Node_To_List
(
Make_Assignement
(
P
,
Q
),
...
...
src/backends/po_hi_c/ocarina-backends-po_hi_c-deployment.adb
View file @
984432d0
...
...
@@ -1772,11 +1772,29 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
(
N
,
CTN
.
Values
(
Global_Port_To_Entity
));
N
:=
Make_Literal
(
CV
.
New_Pointed_Char_Value
(
Map_C_Enumerator_Name
(
F
)));
Append_Node_To_List
(
N
,
CTN
.
Values
(
Global_Port_Names
));
-- For each feature of a thread, we define a
-- global port name as the name of the process
-- port.
--
-- Note: these names are also used by some other
-- backend, e.g. as part of TSP configuration.
declare
F_L
:
constant
List_Id
:=
(
if
Is_In
(
F
)
then
AAN
.
Sources
(
F
)
else
AAN
.
Destinations
(
F
));
F_N
:
constant
Node_Id
:=
AAN
.
First_Node
(
F_L
);
begin
N
:=
Make_Literal
(
CV
.
New_Pointed_Char_Value
(
Map_C_Enumerator_Name
(
Item
(
Foo_N
),
Fully_Qualify_Parent
=>
True
)));
Append_Node_To_List
(
N
,
CTN
.
Values
(
Global_Port_Names
));
end
;
N
:=
Make_Literal
...
...
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