Commit 827de43f authored by julien.delange's avatar julien.delange

analysis now works for RMA case study



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1358 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 39051125
......@@ -302,6 +302,23 @@ package body Ocarina.Backends.MAST.Main is
Operation := Make_Operation (Operation_Name, Enclosing);
MTN.Set_Operations (Operation, Operations_List);
if Get_Execution_Time (E) /= Empty_Time_Array then
declare
ET : constant Time_Array := Get_Execution_Time (E);
begin
MTN.Set_Best_Case_Execution_Time
(Operation,
Make_Literal
(New_Numeric_Value
(To_Milliseconds (ET (0)), 1, 10)));
MTN.Set_Worst_Case_Execution_Time
(Operation,
Make_Literal
(New_Numeric_Value
(To_Milliseconds (ET (1)), 1, 10)));
end;
end if;
Append_Node_To_List (Operation, MTN.Declarations (MAST_File));
if not AINU.Is_Empty (Calls (E)) then
......
......@@ -656,39 +656,36 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write_Name (Node_Name (N));
if Worst_Case_Execution_Time (N) /= No_Node then
Write (Tok_Colon);
Write_Eol;
Write_Indentation (-1);
Write (Tok_Worst_Case_Execution_Time);
Write_Space;
Write (Tok_Assign);
Write_Space;
Write (Tok_Left_Paren);
Generate (Worst_Case_Execution_Time (N));
Write (Tok_Right_Paren);
Write_Line (Tok_Colon);
end if;
if Avg_Case_Execution_Time (N) /= No_Node then
Write (Tok_Colon);
Write_Eol;
Write_Indentation (-1);
Write (Tok_Avg_Case_Execution_Time);
Write_Space;
Write (Tok_Assign);
Write_Space;
Write (Tok_Left_Paren);
Generate (Avg_Case_Execution_Time (N));
Write (Tok_Right_Paren);
Write_Line (Tok_Colon);
end if;
if Best_Case_Execution_Time (N) /= No_Node then
Write (Tok_Colon);
Write_Eol;
Write_Indentation (-1);
Write (Tok_Best_Case_Execution_Time);
Write_Space;
Write (Tok_Assign);
Write_Space;
Write (Tok_Left_Paren);
Generate (Best_Case_Execution_Time (N));
Write (Tok_Right_Paren);
Write_Line (Tok_Colon);
end if;
if not Is_Empty (Operations (N)) then
......
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