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
554fc33f
Commit
554fc33f
authored
Apr 23, 2019
by
Maxime Perrotin
Browse files
Add connections at partition level
parent
55e74c18
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/taste-concurrency_view.adb
View file @
554fc33f
...
...
@@ -175,24 +175,41 @@ package body TASTE.Concurrency_View is
Thread_Names
:
Tag
;
Blocks
:
Unbounded_String
;
Partition_Assoc
:
Translate_Set
;
-- Connections between threads:
Thread_Src_Name
:
Vector_Tag
;
Thread_Src_Port
:
Vector_Tag
;
Thread_Dst_Name
:
Vector_Tag
;
Thread_Dst_Port
:
Vector_Tag
;
begin
for
T
of
Partition
.
Threads
loop
declare
-- Render each thread
Name
:
constant
String
:=
To_String
(
T
.
Name
);
Thread_Assoc
:
constant
Translate_Set
:=
T
.
To_Template
;
Result
:
constant
String
:=
Result
:
constant
String
:=
(
Parse
(
Path
&
"/thread.tmplt"
,
Thread_Assoc
));
begin
Threads
:=
Threads
&
Newline
&
Result
;
Thread_Names
:=
Thread_Names
&
To_String
(
T
.
Name
);
Threads
:=
Threads
&
Newline
&
Result
;
Thread_Names
:=
Thread_Names
&
Name
;
for
P
of
T
.
Output_Ports
loop
Thread_Src_Name
:=
Thread_Src_Name
&
Name
;
Thread_Src_Port
:=
Thread_Src_Port
&
To_String
(
P
.
Name
);
Thread_Dst_Name
:=
Thread_Dst_Name
&
To_String
(
P
.
Remote_Thread
);
Thread_Dst_Port
:=
Thread_Dst_Port
&
To_String
(
P
.
Remote_PI
);
end
loop
;
end
;
end
loop
;
for
B
of
Partition
.
Blocks
loop
declare
Tmpl
:
constant
Block_As_Template
:=
B
.
Prepare_Template
;
Tmpl
:
constant
Block_As_Template
:=
B
.
Prepare_Template
;
Block_Assoc
:
Translate_Set
:=
Tmpl
.
Header
;
PI_Tag
:
Unbounded_String
;
RI_Tag
:
Unbounded_String
;
PI_Tag
:
Unbounded_String
;
RI_Tag
:
Unbounded_String
;
begin
for
PI_Assoc
of
Tmpl
.
Provided
loop
PI_Tag
:=
PI_Tag
&
Newline
...
...
@@ -213,11 +230,14 @@ package body TASTE.Concurrency_View is
-- Association includes Name, Coverage, CPU Info, etc.
-- (see taste-deployment_view.ads for the complete list)
Partition_Assoc
:=
Partition
.
Deployment_Partition
.
To_Template
&
Assoc
(
"Threads"
,
Threads
)
&
Assoc
(
"Thread_Names"
,
Thread_Names
)
&
Assoc
(
"Node_Name"
,
Node_Name
)
&
Assoc
(
"Blocks"
,
Blocks
);
&
Assoc
(
"Threads"
,
Threads
)
&
Assoc
(
"Thread_Names"
,
Thread_Names
)
&
Assoc
(
"Node_Name"
,
Node_Name
)
&
Assoc
(
"Blocks"
,
Blocks
)
&
Assoc
(
"Thread_Src_Name"
,
Thread_Src_Name
)
&
Assoc
(
"Thread_Src_Port"
,
Thread_Src_Port
)
&
Assoc
(
"Thread_Dst_Name"
,
Thread_Dst_Name
)
&
Assoc
(
"Thread_Dst_Port"
,
Thread_Dst_Port
);
return
Parse
(
Path
&
"/partition.tmplt"
,
Partition_Assoc
);
end
Generate_Partition
;
...
...
templates/concurrency_view/aadl_1_nodes/partition.tmplt
View file @
554fc33f
...
...
@@ -11,6 +11,10 @@
@@-- @_CPU_Platform_@ : AADL CPU_Platform (e.g. PLATFORM_NATIVE)
@@-- @_CPU_Classifier_@ : AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
@@-- @_Bound_Functions_@ : List of user functions from Interface view
@@-- @_Thread_Src_Name_@ : Vector tag : connection thread name (source)
@@-- @_Thread_Dst_Name_@ : Vector tag : connection thread name (dest)
@@-- @_Thread_Src_Port_@ : Vector tag : connection port name (source)
@@-- @_Thread_Dst_Port_@ : Vector tag : connection port name (dest)
* @_LOWER:Name_@ @_CPU_Platform_@
@@TABLE@@
@_Bound_Functions_@
...
...
templates/concurrency_view/aadl_2_threads/partition.tmplt
View file @
554fc33f
...
...
@@ -11,6 +11,10 @@
@@-- @_CPU_Platform_@ : AADL CPU_Platform (e.g. PLATFORM_NATIVE)
@@-- @_CPU_Classifier_@ : AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
@@-- @_Bound_Functions_@ : List of user functions from Interface view
@@-- @_Thread_Src_Name_@ : Vector tag : connection thread name (source)
@@-- @_Thread_Dst_Name_@ : Vector tag : connection thread name (dest)
@@-- @_Thread_Src_Port_@ : Vector tag : connection port name (source)
@@-- @_Thread_Dst_Port_@ : Vector tag : connection port name (dest)
@_Threads_@
with @_Package_Name_@;
...
...
@@ -27,5 +31,7 @@ subcomponents
@_Thread_Names_@ : thread @_Thread_Names_@_Thread::@_Thread_Names_@.others;
@@END_TABLE@@
connections
<MISSING>
@@TABLE@@
port @_LOWER:Thread_Src_Name_@.@_LOWER:Thread_Src_Port_@ -> @_LOWER:Thread_Dst_Name_@.@_LOWER:Thread_Dst_Port_@;
@@END_TABLE@@
end @_Name_@.final;
templates/concurrency_view/ada_basic_body/partition.tmplt
View file @
554fc33f
...
...
@@ -11,6 +11,10 @@
@@--
@
_CPU_Platform_
@
:
AADL
CPU_Platform
(
e
.
g
.
PLATFORM_NATIVE
)
@@--
@
_CPU_Classifier_
@
:
AADL
CPU
Classifier
(
e
.
g
.
ocarina_processors_x86
::
x86
.
linux
)
@@--
@
_Bound_Functions_
@
:
List
of
user
functions
from
Interface
view
@@--
@
_Thread_Src_Name_
@
:
Vector
tag
:
connection
thread
name
(
source
)
@@--
@
_Thread_Dst_Name_
@
:
Vector
tag
:
connection
thread
name
(
dest
)
@@--
@
_Thread_Src_Port_
@
:
Vector
tag
:
connection
port
name
(
source
)
@@--
@
_Thread_Dst_Port_
@
:
Vector
tag
:
connection
port
name
(
dest
)
package
body
@
_CAPITALIZE
:
Name_
@
is
...
...
templates/concurrency_view/ada_basic_source/partition.tmplt
View file @
554fc33f
...
...
@@ -11,6 +11,10 @@
@@--
@
_CPU_Platform_
@
:
AADL
CPU_Platform
(
e
.
g
.
PLATFORM_NATIVE
)
@@--
@
_CPU_Classifier_
@
:
AADL
CPU
Classifier
(
e
.
g
.
ocarina_processors_x86
::
x86
.
linux
)
@@--
@
_Bound_Functions_
@
:
List
of
user
functions
from
Interface
view
@@--
@
_Thread_Src_Name_
@
:
Vector
tag
:
connection
thread
name
(
source
)
@@--
@
_Thread_Dst_Name_
@
:
Vector
tag
:
connection
thread
name
(
dest
)
@@--
@
_Thread_Src_Port_
@
:
Vector
tag
:
connection
port
name
(
source
)
@@--
@
_Thread_Dst_Port_
@
:
Vector
tag
:
connection
port
name
(
dest
)
package
@
_CAPITALIZE
:
Name_
@
is
...
...
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