Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
3a46bcf5
Commit
3a46bcf5
authored
Apr 17, 2015
by
Julien
Browse files
Improving VxWorks653 conf code generator
parent
6c44b2ef
Changes
5
Show whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-vxworks653_conf-connections.adb
View file @
3a46bcf5
...
...
@@ -9,7 +9,7 @@ with Ocarina.ME_AADL.AADL_Instances.Entities;
with
Ocarina
.
Backends
.
C_Common
.
Mapping
;
with
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
with
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
--
with Ocarina.Backends.Vxworks653_Conf.Mapping;
with
Ocarina
.
Backends
.
Vxworks653_Conf
.
Mapping
;
package
body
Ocarina
.
Backends
.
Vxworks653_Conf
.
Connections
is
...
...
@@ -21,9 +21,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
use
Ocarina
.
ME_AADL
.
AADL_Instances
.
Entities
;
use
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
--
use Ocarina.Backends.Vxworks653_Conf.Mapping;
use
Ocarina
.
Backends
.
Vxworks653_Conf
.
Mapping
;
package
AIN
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
package
AINU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
XTN
renames
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
...
...
@@ -187,10 +186,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Source_Node
:=
Make_XML_Node
(
"Source"
);
Add_Attribute
(
"PartitionNameRef"
,
Get_Name_String
(
AIN
.
Name
(
AIN
.
Identifier
(
Parent_Subcomponent
(
E
)))),
(
Map_Partition_Name
(
E
)),
Source_Node
);
Add_Attribute
(
"PortNameRef"
,
...
...
@@ -211,11 +207,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Add_Attribute
(
"PartitionNameRef"
,
Get_Name_String
(
AIN
.
Name
(
AIN
.
Identifier
(
Parent_Subcomponent
(
Map_Partition_Name
(
Get_Partition_Runtime
(
Partition_Destination
)))
))
,
(
Partition_Destination
))),
Destination_Node
);
Append_Node_To_List
(
Destination_Node
,
...
...
src/backends/ocarina-backends-vxworks653_conf-hm.adb
View file @
3a46bcf5
...
...
@@ -10,7 +10,7 @@ with Ocarina.ME_AADL.AADL_Instances.Entities;
-- with Ocarina.Backends.Properties;
with
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
with
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
--
with Ocarina.Backends.Vxworks653_Conf.Mapping;
with
Ocarina
.
Backends
.
Vxworks653_Conf
.
Mapping
;
package
body
Ocarina
.
Backends
.
Vxworks653_Conf
.
Hm
is
...
...
@@ -20,9 +20,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
use
Ocarina
.
ME_AADL
.
AADL_Instances
.
Entities
;
use
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
-- use Ocarina.Backends.Properties;
--
use Ocarina.Backends.Vxworks653_Conf.Mapping;
use
Ocarina
.
Backends
.
Vxworks653_Conf
.
Mapping
;
package
AIN
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
package
AINU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
XTN
renames
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
package
XTU
renames
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
...
...
@@ -384,10 +383,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Partition_HM_Table_Node
:=
Make_XML_Node
(
"PartitionHMTable"
);
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Parent_Subcomponent
(
Virtual_Processor
)))),
(
Map_Partition_Name
(
Virtual_Processor
))
&
"_hm"
,
Partition_HM_Table_Node
);
Settings_Node
:=
Make_XML_Node
(
"Settings"
);
...
...
@@ -408,11 +405,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Trusted_Partition_Node
:=
Make_XML_Node
(
"TrustedPartition"
);
XTU
.
Add_Attribute
(
"NameRef"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Parent_Subcomponent
(
Virtual_Processor
)))),
Settings_Node
);
(
Map_Partition_Name
(
Virtual_Processor
)),
Trusted_Partition_Node
);
Append_Node_To_List
(
Trusted_Partition_Node
,
XTN
.
Subitems
(
Settings_Node
));
...
...
src/backends/ocarina-backends-vxworks653_conf-mapping.adb
View file @
3a46bcf5
...
...
@@ -1121,7 +1121,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
Append_Node_To_List
(
Settings_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
XTU
.
Add_Attribute
(
"RequiredMemorySize"
,
"0x300000"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"PartitionHMTable"
,
"part1Hm"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"PartitionHMTable"
,
Get_Name_String
(
Map_Partition_Name
(
Runtime
))
&
"_hm"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"watchDogDuration"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"allocDisable"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"numWorkerTasks"
,
"0"
,
Settings_Node
);
...
...
@@ -1138,32 +1140,34 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
Settings_Node
);
Shared_Library_Region_Node
:=
Make_XML_Node
(
"SharedLibraryRegion"
);
XTU
.
Add_Attribute
(
"Name
d
Ref"
,
"vxSysLib"
,
Shared_Library_Region_Node
);
XTU
.
Add_Attribute
(
"NameRef"
,
"vxSysLib"
,
Shared_Library_Region_Node
);
Append_Node_To_List
(
Shared_Library_Region_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
Application_Node
:=
Make_XML_Node
(
"Application"
);
Append_Node_To_List
(
Application_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
XTU
.
Add_Attribute
(
"NameRef"
,
Get_Name_String
(
Map_Partition_Name
(
Runtime
)),
Partition_Node
);
(
Map_Partition_Name
(
Runtime
,
True
)),
Application_Node
);
Append_Node_To_List
(
Application_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
return
Partition_Node
;
end
Map_Partition
;
function
Map_Partition_Name
(
Runtime
:
Node_Id
)
return
Name_Id
is
function
Map_Partition_Name
(
Runtime
:
Node_Id
;
Use_Source_Name
:
Boolean
:=
False
)
return
Name_Id
is
Result
:
Name_Id
;
begin
Result
:=
Get_Source_Name
(
Runtime
);
if
Result
=
No_Name
then
if
Result
/=
No_Name
and
then
Use_Source_Name
then
return
Result
;
end
if
;
Result
:=
AIN
.
Name
(
Identifier
(
Parent_Subcomponent
(
Runtime
)));
end
if
;
return
Result
;
end
Map_Partition_Name
;
...
...
src/backends/ocarina-backends-vxworks653_conf-mapping.ads
View file @
3a46bcf5
...
...
@@ -47,6 +47,8 @@ package Ocarina.Backends.Vxworks653_Conf.Mapping is
function
Map_Queuing_Port
(
Port
:
Node_Id
)
return
Node_Id
;
function
Map_Partition_Name
(
Runtime
:
Node_Id
)
return
Name_Id
;
function
Map_Partition_Name
(
Runtime
:
Node_Id
;
Use_Source_Name
:
Boolean
:=
False
)
return
Name_Id
;
end
Ocarina
.
Backends
.
Vxworks653_Conf
.
Mapping
;
src/backends/ocarina-backends-vxworks653_conf-naming.adb
View file @
3a46bcf5
...
...
@@ -238,7 +238,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Naming is
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
Map_Partition_Name
(
AADL_Virtual_Processor
)),
(
AADL_Virtual_Processor
,
True
)),
Application_Node
);
Append_Node_To_List
(
Application_Node
,
XTN
.
Subitems
(
XML_Node
));
...
...
@@ -332,7 +332,11 @@ package body Ocarina.Backends.Vxworks653_Conf.Naming is
Trim
(
Unsigned_Long_Long
'
Image
(
Size
),
Left
),
Port_Node
);
XTU
.
Add_Attribute
(
"Name"
,
"1"
,
Port_Node
);
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
C_Common
.
Mapping
.
Map_Port_Name
(
Feature
)),
Port_Node
);
if
Is_In
(
Feature
)
and
then
not
Is_Out
(
Feature
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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