Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
387c4cc8
Commit
387c4cc8
authored
Aug 20, 2019
by
Maxime Perrotin
Browse files
Add basic driver information to the templates
parent
c01e3bf4
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/taste-concurrency_view.adb
View file @
387c4cc8
...
...
@@ -524,6 +524,17 @@ package body TASTE.Concurrency_View is
Bus_Names
,
Bus_AADL_Pkg
,
Bus_Classifier
:
Vector_Tag
;
-- System busses
Device_Names
,
Device_Node_Name
,
Device_AADL_Pkg
,
Device_Classifier
,
Device_CPU
,
Device_Configuration
,
Device_Accessed_Bus_Name
,
Device_Accessed_Port_Name
,
Device_ASN1_Filename
,
Device_ASN1_Typename
,
Device_ASN1_Module
:
Vector_Tag
;
-- Device drivers
begin
-- Prepare the template tags of system.aadl with the busses
for
Bus
of
CV
.
Deployment
.
Busses
loop
...
...
@@ -625,6 +636,42 @@ package body TASTE.Concurrency_View is
end
if
;
end
;
end
loop
;
-- Iterate again on the nodes to set the devices
-- at system level (they could also be added to
-- nodes if needed, but for the concurrency view
-- in AADL they are only used at system level)
for
N
:
Taste_Node
of
CV
.
Deployment
.
Nodes
loop
for
D
:
Taste_Device_Driver
of
N
.
Drivers
loop
declare
Dot
:
constant
Natural
:=
Index
(
D
.
Name
,
"."
);
Name
:
constant
String
:=
To_String
(
D
.
Name
);
Result
:
constant
String
:=
(
if
Dot
>
0
then
Name
(
Name
'
First
..
Dot
-
1
)
else
"ERROR_MALFORMED_DEVICE_NAME"
);
begin
-- Device names are in the form ethernet0.other
-- Get rid of the ".other"
Device_Names
:=
Device_Names
&
Result
;
end
;
Device_Node_Name
:=
Device_Node_Name
&
N
.
Name
;
Device_AADL_Pkg
:=
Device_AADL_Pkg
&
D
.
Package_Name
;
Device_Classifier
:=
Device_Classifier
&
D
.
Device_Classifier
;
Device_CPU
:=
Device_CPU
&
D
.
Associated_Processor_Name
;
Device_Configuration
:=
Device_Configuration
&
D
.
Device_Configuration
;
Device_Accessed_Bus_Name
:=
Device_Accessed_Bus_Name
&
D
.
Accessed_Bus_Name
;
Device_Accessed_Port_Name
:=
Device_Accessed_Port_Name
&
D
.
Accessed_Port_Name
;
Device_ASN1_Filename
:=
Device_ASN1_Filename
&
D
.
ASN1_Filename
;
Device_ASN1_Typename
:=
Device_ASN1_Typename
&
D
.
ASN1_Typename
;
Device_ASN1_Module
:=
Device_ASN1_Module
&
D
.
ASN1_Module
;
end
loop
;
end
loop
;
if
Trig_Sys
and
File_Sys
/=
""
and
Nodes
/=
""
then
-- Generate from system.tmplt
Set_Sys
:=
CV
.
Configuration
.
To_Template
...
...
@@ -648,7 +695,18 @@ package body TASTE.Concurrency_View is
&
Assoc
(
"Target_Packages"
,
All_Target_Names
)
&
Assoc
(
"Bus_Names"
,
Bus_Names
)
&
Assoc
(
"Bus_AADL_Package"
,
Bus_AADL_Pkg
)
&
Assoc
(
"Bus_Classifier"
,
Bus_Classifier
);
&
Assoc
(
"Bus_Classifier"
,
Bus_Classifier
)
&
Assoc
(
"Device_Names"
,
Device_Names
)
&
Assoc
(
"Device_Node_Name"
,
Device_Node_Name
)
&
Assoc
(
"Device_AADL_Pkg"
,
Device_AADL_Pkg
)
&
Assoc
(
"Device_Classifier"
,
Device_Classifier
)
&
Assoc
(
"Device_CPU"
,
Device_CPU
)
&
Assoc
(
"Device_Config"
,
Device_Configuration
)
&
Assoc
(
"Device_Bus_Name"
,
Device_Accessed_Bus_Name
)
&
Assoc
(
"Device_Port_Name"
,
Device_Accessed_Port_Name
)
&
Assoc
(
"Device_ASN1_File"
,
Device_ASN1_Filename
)
&
Assoc
(
"Device_ASN1_Sort"
,
Device_ASN1_Typename
)
&
Assoc
(
"Device_ASN1_Module"
,
Device_ASN1_Module
);
Create_Path
(
CV_Out_Dir
);
Create
(
File
=>
Output_File
,
Mode
=>
Out_File
,
...
...
templates/concurrency_view/aadl_2_threads/system.tmplt
View file @
387c4cc8
...
...
@@ -16,6 +16,20 @@
@@--
@
_Part_Source_Name_
@
:
Inter
-
partition
connections
:
partition
source
name
(
vector
tag
)
@@--
@
_Part_Source_Port_
@
:
|
_
Corresponding
port
name
@@--
@
_Part_Dest_Name_
@
:
|
_
Corresponding
name
of
the
remote
partition
@@--
@
_Bus_Names_
@
:
Vector
tag
:
busses
present
in
the
system
@@--
@
_Bus_AADL_Package_
@
:
|
_
corresponding
AADL
Package
@@--
@
_Bus_Classifier_
@
:
|
_
corresponding
AADL
classifier
@@--
@
_Device_Names_
@
@@--
@
_Device_Node_Name_
@
@@--
@
_Device_AADL_Pkg_
@
@@--
@
_Device_Classifier_
@
@@--
@
_Device_CPU_
@
@@--
@
_Device_Config_
@
@@--
@
_Device_Bus_Name_
@
@@--
@
_Device_Port_Name_
@
@@--
@
_Device_ASN1_File_
@
@@--
@
_Device_ASN1_Sort_
@
@@--
@
_Device_ASN1_Module_
@
:
Device
drivers
(
vector
tag
)
@@--
And
all
the
system
configuration
obtained
from
the
command
line
:
@@--
Interface_View
,
Deployment_View
,
Data_View
,
Binary_Path
,
Check_Data_View
,
@@--
Output_Dir
,
Skeletons
,
Glue
,
Use_POHIC
,
Timer_Resolution
,
Debug_Flag
,
...
...
@@ -97,7 +111,19 @@ subcomponents
@_CAPITALIZE:Node_Names_@_Memory : memory deploymentview::DV::@_CAPITALIZE:Node_Names_@::main_memory.others;
@@END_IF@@
@@END_TABLE@@
@@-- Specify the cconnections for distributed and TSP systems
@@-- Then declare the busses (distributed systems only)
@@TABLE'
ALIGN_ON
(
":"
)@@
@
_Bus_Names_
@
:
bus
@
_Bus_Classifier_
@;
@@
END_TABLE
@@
@@--
Then
declare
the
device
drivers
(
distributes
systems
only
)
@@
TABLE
'ALIGN_ON(":")@@
@_Device_Node_Name_@_@_Device_Names_@ : device @_Device_Classifier_@
{
Source_Text => ("../DriversConfig/PARTITION_NAME/DeviceConfig-@_Device_Node_Name_@-@_Device_Names_@.c");
Type_Source_Name => "pohidrv_@_Device_Node_Name_@_@_Device_Names_@";
};
@@END_TABLE@@
@@-- Specify the connections for distributed and TSP systems
@@IF@@ @_Part_Source_Name'
Length_
@
>
0
connections
@@
TABLE
@@
...
...
templates/concurrency_view/aadl_4_makefile/system.tmplt
View file @
387c4cc8
@@-- The following tags are available in this template:
@@--
@@-- @_Nodes_@ : Code generated for the nodes
(from node.tmplt)
@@-- @_Nodes_@ : Code generated for the nodes
@@-- @_Node_Names_@ : Vector Tag of node names
@@-- @_Node_CPU_@ : |_ Corresponding CPU name (eg x86_linux)
@@-- @_Node_CPU_Classifier_@ : |_ CPU Classifier (ocarina...::x86_linux)
@@-- @_Node_Major_Frame_@ : |_ Time in milliseconds allocated to the CPU (TSP only)
@@-- @_Partition_Names_@ : Vector Tag of partition names
@@-- @_Partition_Node_@ : |_ Corresponding node name
@@-- @_Partition_CPU_@ : |_ Corresponding CPU name
@@-- @_Threads_@ : Code generated for the threads (from thread.tmplt)
@@-- @_Partition_Duration_@ : |_ Corresponding time allocation (TSP only)
@@-- @_Partition_VP_@ : |_ Virtual processor binding (TSP only)
@@-- @_Threads_@ : Code generated for the threads
@@-- @_Thread_Names_@ : List of all threads in the complete system
@@-- @_Block_Names_@ : List of all blocks in the complete system
@@-- @_Target_Packages_@ : List of all target package names in the complete system
@@-- @_Part_Source_Name_@ : Inter-partition connections : partition source name (vector tag)
@@-- @_Part_Source_Port_@ : |_ Corresponding port name
@@-- @_Part_Dest_Name_@ : |_ Corresponding name of the remote partition
@@-- @_Bus_Names_@ : Vector tag: busses present in the system
@@-- @_Bus_AADL_Package_@ : |_ corresponding AADL Package
@@-- @_Bus_Classifier_@ : |_ corresponding AADL classifier
...
...
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