Commit b1cd5d65 authored by Julien's avatar Julien
Browse files

Map schedule using nanoseconds, not milliseconds

parent e4de4fdf
...@@ -1365,10 +1365,22 @@ package body Ocarina.Backends.C_Common.Mapping is ...@@ -1365,10 +1365,22 @@ package body Ocarina.Backends.C_Common.Mapping is
------------------------- -------------------------
function Map_Scade_Parameter (Parameter : Node_Id) return Node_Id is function Map_Scade_Parameter (Parameter : Node_Id) return Node_Id is
Scade_Name : Name_Id;
begin begin
Get_Name_String (Get_Scade_Signal (Parameter)); Scade_Name := Get_Scade_Signal (Parameter);
return CTU.Make_Defining_Identifier (Name_Find, C_Conversion => False); if Scade_Name = No_Name then
Scade_Name := Get_Source_Name (Parameter);
end if;
if Scade_Name = No_Name then
Display_Located_Error
(AIN.Loc (Parameter),
"The Parameter does not specify a SCADE mapping",
Fatal => True);
end if;
return CTU.Make_Defining_Identifier (Scade_Name, C_Conversion => False);
end Map_Scade_Parameter; end Map_Scade_Parameter;
---------------------- ----------------------
......
...@@ -177,8 +177,8 @@ package body Ocarina.Backends.Deos_Conf.Schedule is ...@@ -177,8 +177,8 @@ package body Ocarina.Backends.Deos_Conf.Schedule is
-- For now, we assume the partition duration -- For now, we assume the partition duration
-- is in milliseconds. -- is in milliseconds.
-- --
Slot_Duration := To_Milliseconds Slot_Duration := To_Nanoseconds
(Module_Schedule (J).Duration) * 1_000_000; (Module_Schedule (J).Duration);
XTU.Add_Attribute ("Duration", XTU.Add_Attribute ("Duration",
Trim (Unsigned_Long_Long'Image Trim (Unsigned_Long_Long'Image
(Slot_Duration), Left), (Slot_Duration), Left),
......
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