From 76790ce35751b7db120cbde496782c161d376c60 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 11 Sep 2014 05:39:42 +0200 Subject: vhdl2008: add translation and support for most of implicit operators. --- translate/grt/grt-rtis_utils.adb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'translate/grt/grt-rtis_utils.adb') diff --git a/translate/grt/grt-rtis_utils.adb b/translate/grt/grt-rtis_utils.adb index 4df5d6f..0d4328e 100644 --- a/translate/grt/grt-rtis_utils.adb +++ b/translate/grt/grt-rtis_utils.adb @@ -498,6 +498,28 @@ package body Grt.Rtis_Utils is end case; end Get_Physical_Unit_Name; + function Get_Physical_Unit_Value (Unit : Ghdl_Rti_Access; + Type_Rti : Ghdl_Rti_Access) + return Ghdl_I64 is + begin + case Unit.Kind is + when Ghdl_Rtik_Unit64 => + return To_Ghdl_Rtin_Unit64_Acc (Unit).Value; + when Ghdl_Rtik_Unitptr => + case Type_Rti.Kind is + when Ghdl_Rtik_Type_P64 => + return To_Ghdl_Rtin_Unitptr_Acc (Unit).Addr.I64; + when Ghdl_Rtik_Type_P32 => + return Ghdl_I64 + (To_Ghdl_Rtin_Unitptr_Acc (Unit).Addr.I32); + when others => + Internal_Error ("get_physical_unit_value(1)"); + end case; + when others => + Internal_Error ("get_physical_unit_value(2)"); + end case; + end Get_Physical_Unit_Value; + procedure Get_Enum_Value (Rstr : in out Rstring; Rti : Ghdl_Rti_Access; Val : Ghdl_Index_Type) is -- cgit