{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/2037f364937bb1a1a5392748aee4d777?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2037f364937bb1a1a5392748aee4d777","url":"https://api.github.com/users/juli1","login":"juli1","id":993972},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-04T15:46:23Z","comments":1,"closed_at":null,"url":"https://api.github.com/repos/osate/osate2-core/issues/9","body":"Hello,\r\n\r\nWhen trying OSATE2 and defining my own properties, I get compilation errors. However, these property set compile fine with Ocarina. There are the property definition (see below).\r\n\r\nAny idea on why this is not working in OSATE2 ?\r\n\r\nThanks for any comment/suggestion,\r\n\r\nBest regards,\r\n\r\nproperty set Processor_Properties is\r\n\r\n  Frequency : type aadlinteger 0 Hz .. Max_Aadlinteger  units \r\n  (Hz,\r\n  KHz => Hz  * 1000,\r\n  MHz => KHz * 1000,\r\n  GHz => MHz * 1000);\r\n  \r\n  CPU_Speed : Frequency applies to (processor);\r\n  \r\n  MIPS : aadlinteger 0 .. Max_Aadlinteger applies to (processor, abstract);\r\n\r\nend Processor_Properties; \r\n\r\n\r\nproperty set Physical_Properties is\r\n\r\n  -----------------\r\n  -- Power units --\r\n  -----------------\r\n\r\n  Power_Units: type units \r\n  (W, \r\n   KW  => W * 1000, \r\n   MW  => KW * 1000, \r\n   GW  => MW * 1000,\r\n   TW  => GW * 1000);\r\n  \r\n  Max_Power: constant Physical_Properties::Power_Units => 2#1#e32 W;\r\n  Power : type aadlreal 0 W .. Max_Power units Physical_Properties::Power_Units;\r\n  Power_Consume : Power applies to (processor, device, memory, system);\r\n  Power_Provide : Power applies to (device);\r\n  Total_Power   : Power applies to (system);\r\n  \r\n  ---------\r\n  -- EMC --\r\n  ---------\r\n\r\n  Ionizing_Dose_Units : type units (\r\n  rad, \r\n  Krad  => rad * 1000,\r\n  Mrad  => Krad * 1000, \r\n  Grad  => Mrad * 1000,\r\n  Trad  => Grad * 1000);\r\n  \r\n  Max_Ionizing_Dose: constant Ionizing_Dose_Units => 2#1#e32 rad;\r\n  \r\n  Ionizing_Type : type aadlinteger \r\n     0 rad .. Max_Ionizing_Dose units Ionizing_Dose_Units;\r\n  \r\n  TID : Ionizing_Type applies to (processor, device, memory);\r\n\r\n\r\n\r\n  Mass_Units: type units (\r\n  g, \r\n  Kg => g  * 1000, \r\n  T  => Kg * 1000);\r\n\r\n  Maximum_Mass: constant Mass_Units => 2#1#e32 g;\r\n\r\n  Mass_Type : type aadlreal 0 g .. Maximum_Mass units Mass_Units;\r\n\r\n  Mass : Mass_Type applies to (processor, device, memory, system);\r\n\r\n  Max_Mass : Mass_Type applies to (processor, device, memory, system);\r\n\r\nend Physical_Properties;\r\n\r\n\r\n\r\n","html_url":"https://github.com/osate/osate2-core/issues/9","number":9,"title":"Failed to parse properties","id":2078132,"created_at":"2011-10-28T12:35:57Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/ab82d190d0cd32183c56c522ec115fb3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ab82d190d0cd32183c56c522ec115fb3","url":"https://api.github.com/users/reteprelief","login":"reteprelief","id":750520},"updated_at":"2011-11-04T15:46:23Z","url":"https://api.github.com/repos/osate/osate2-core/issues/comments/2632467","body":"In your first property set the problem is that the upper bound for Frequency does not have a unit. The property constant Max_AadlInteger just has an integer value.\r\nYou cannot just add the unit after the constant reference as upper bound because the standard does nto allow that. You need to define a constant that includes the unit.\r\nAlso CPU_Speed refers to Frequency. That reference needs to be qualified by the property set - even if it is the same property set.\r\n\r\n\r\n\r\n","id":2632467,"created_at":"2011-11-04T15:46:23Z"}}