Commit 1fa29dbd authored by yoogx's avatar yoogx

* Allow support for subprogram classifier in compute

          entrypoint
parent 842a9df5
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. -- -- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2013 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify -- -- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the -- -- it under terms of the GNU General Public License as published by the --
...@@ -2767,24 +2767,11 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is ...@@ -2767,24 +2767,11 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
when Thread_With_Compute_Entrypoint => when Thread_With_Compute_Entrypoint =>
declare declare
use ATN; use ATN;
Property : constant Node_Id
Value : constant Node_Id := Expanded_Single_Value := Get_Thread_Compute_Entrypoint (E);
(AIN.Property_Association_Value Value : Node_Id;
(Get_Thread_Compute_Entrypoint (E)));
begin begin
if ATN.Kind (Value) = ATN.K_Reference_Term then if AIN.Kind (Property) = K_Component_Instance then
-- Get IN ports values and dequeue them
if Has_In_Ports (E) then
Make_Fetch_In_Ports;
Make_Dequeue_In_Ports;
end if;
-- Handle the thread call sequences
Make_Call_Sequence (ATN.Entity
(ATN.Reference_Term (Value)));
else
-- Call the compute entrypoint. The code of the -- Call the compute entrypoint. The code of the
-- compute entry point will include the setting -- compute entry point will include the setting
-- of the thread OUT ports. -- of the thread OUT ports.
...@@ -2793,14 +2780,50 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is ...@@ -2793,14 +2780,50 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
-- Send OUT ports. -- Send OUT ports.
-- FIXME: Depending on an AADL property, the -- XXX: Depending on an AADL property, the
-- code of the thread entrypoint may include the -- code of the thread entrypoint may include the
-- sending of OUT ports. -- sending of OUT ports. Which AADL property?
if Has_Out_Ports (E) then if Has_Out_Ports (E) then
Make_Set_Out_Ports; Make_Set_Out_Ports;
Make_Send_Out_Ports; Make_Send_Out_Ports;
end if; end if;
else
Value := Expanded_Single_Value
(AIN.Property_Association_Value
(Property));
if ATN.Kind (Value) = ATN.K_Reference_Term then
-- Get IN ports values and dequeue them
if Has_In_Ports (E) then
Make_Fetch_In_Ports;
Make_Dequeue_In_Ports;
end if;
-- Handle the thread call sequences
Make_Call_Sequence (ATN.Entity
(ATN.Reference_Term (Value)));
else
-- Call the compute entrypoint. The code of the
-- compute entry point will include the setting
-- of the thread OUT ports.
Make_Thread_Compute_Entrypoint;
-- Send OUT ports.
-- XXX: Depending on an AADL property, the
-- code of the thread entrypoint may include the
-- sending of OUT ports. Which AADL property?
if Has_Out_Ports (E) then
Make_Set_Out_Ports;
Make_Send_Out_Ports;
end if;
end if;
end if; end if;
end; end;
......
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