Commit 100872e7 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add CPU information in templates for partitions

parent 76ef8de4
......@@ -358,11 +358,13 @@ package body TASTE.AADL_Parser is
-- Initialize the lists of nodes and partitions based on the DV
for Node of Model.Deployment_View.Nodes loop
declare
New_Node : CV_Node;
New_Node : CV_Node :=
(Deployment_Node => Node, others => <>);
begin
for Partition of Node.Partitions loop
declare
New_Partition : CV_Partition;
New_Partition : constant CV_Partition :=
(Deployment_Partition => Partition, others => <>);
begin
New_Node.Partitions.Insert
(Key => To_String (Partition.Name),
......
......@@ -227,9 +227,12 @@ package body TASTE.Concurrency_View is
String'(Parse (Path & "/block.tmplt", Block_Assoc));
end;
end loop;
Partition_Assoc := +Assoc ("Threads", Threads)
& Assoc ("Blocks", Blocks)
& Assoc ("Partition_Name", Partition_Name);
-- 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 ("Blocks", Blocks);
return Parse (Path & "/partition.tmplt", Partition_Assoc);
end Generate_Partition;
......
......@@ -78,8 +78,9 @@ package TASTE.Concurrency_View is
type CV_Partition is tagged
record
Threads : AADL_Threads.Map;
Blocks : Protected_Blocks.Map;
Deployment_Partition : aliased Taste_Partition;
Threads : AADL_Threads.Map;
Blocks : Protected_Blocks.Map;
end record;
package CV_Partitions is new Indefinite_Ordered_Maps (String, CV_Partition);
......@@ -87,7 +88,8 @@ package TASTE.Concurrency_View is
-- A node may contain several partitions (in case of TSP)
type CV_Node is tagged
record
Partitions : CV_Partitions.Map;
Deployment_Node : aliased Taste_Node;
Partitions : CV_Partitions.Map;
end record;
package CV_Nodes is new Indefinite_Ordered_Maps (String, CV_Node);
......
@@-- The following tags are available in this template:
@@--
@@-- @_Partition_Name_@ : Partition name (usually the name of the binary)
@@-- @_Threads_@ : List of threads
@@-- @_Blocks_@ : List of protected functions
@@-- @_Name_@ : Partition name (usually the name of the binary)
@@-- @_Threads_@ : List of threads
@@-- @_Blocks_@ : List of protected functions
@@-- @_Coverage_@ : True if user requested code coverage enable
@@-- @_Package_Name_@ : AADL Package name for the target (e.g. ocarina_porocessors_x86)
@@-- @_CPU_Name_@ : CPU Name (e.g. x86_linux)
@@-- @_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
package @_CAPITALIZE:Partition_Name_@ is
-- Coverage : @_Coverage_@
-- Package Name : @_Package_Name_@
-- CPU Name : @_CPU_Name_@
-- CPU Platform : @_CPU_Platform_@
-- CPU Classifier : @_CPU_Classifier_@
-- Bound Functions : @_Bound_Functions_@
@@TABLE@@
@_Threads_@ @@-- should have 'Indent
@@END_TABLE@@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment