Commit c7ea9855 authored by yoogx's avatar yoogx
Browse files

* Use Fully_Qualified_Instance_Name for thread accessing a resource.

        Use thread Compute_Execution_Time property to indicate how
        long a resource is used.

        Fixes issue #11
parent 52d34e90
...@@ -305,17 +305,31 @@ package body Ocarina.Backends.Cheddar.Mapping is ...@@ -305,17 +305,31 @@ package body Ocarina.Backends.Cheddar.Mapping is
then then
M := Make_XML_Node ("resource_user"); M := Make_XML_Node ("resource_user");
K := Make_Defining_Identifier K := Make_Defining_Identifier
(To_XML_Name (Fully_Qualified_Instance_Name
(Display_Name (Corresponding_Instance
(Identifier
(Item (Item
(AIN.First_Node (AIN.First_Node
(Path (Destination (Connection)))))))); (Path (Destination (Connection)))))));
Append_Node_To_List (K, XTN.Subitems (M)); Append_Node_To_List (K, XTN.Subitems (M));
K := Make_Literal (XV.New_Numeric_Value (1, 1, 10));
-- For now, we assume all tasks take the
-- resource at the beginning, and release it at
-- the end of their dispatch.
K := Make_Literal (XV.New_Numeric_Value (0, 1, 10));
Append_Node_To_List (K, XTN.Subitems (M)); Append_Node_To_List (K, XTN.Subitems (M));
K := Make_Literal (XV.New_Numeric_Value (1, 1, 10)); K := Make_Literal
(XV.New_Numeric_Value
(To_Milliseconds
(Get_Execution_Time
(Corresponding_Instance
(Item
(AIN.First_Node
(Path (Destination (Connection))))))
(1)),
1, 10));
Append_Node_To_List (K, XTN.Subitems (M)); Append_Node_To_List (K, XTN.Subitems (M));
Append_Node_To_List (M, XTN.Subitems (P)); Append_Node_To_List (M, XTN.Subitems (P));
end if; end if;
end if; end if;
...@@ -593,8 +607,7 @@ package body Ocarina.Backends.Cheddar.Mapping is ...@@ -593,8 +607,7 @@ package body Ocarina.Backends.Cheddar.Mapping is
(Make_Defining_Identifier (Get_String_Name ("buffer_role")), (Make_Defining_Identifier (Get_String_Name ("buffer_role")),
Make_Defining_Identifier (Get_String_Name ("consumer"))), Make_Defining_Identifier (Get_String_Name ("consumer"))),
XTN.Items (M)); XTN.Items (M));
K := Make_Defining_Identifier K := Make_Defining_Identifier (Fully_Qualified_Instance_Name (E));
(To_XML_Name (Display_Name (Identifier (Parent_Subcomponent (E)))));
Append_Node_To_List (K, XTN.Subitems (M)); Append_Node_To_List (K, XTN.Subitems (M));
K := Make_Literal (XV.New_Numeric_Value (1, 1, 10)); K := Make_Literal (XV.New_Numeric_Value (1, 1, 10));
Append_Node_To_List (K, XTN.Subitems (M)); Append_Node_To_List (K, XTN.Subitems (M));
......
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