diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-09-06 06:43:21 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-09-06 06:43:21 +0200 |
commit | 75fcb55685369ab176541cdce4b0874bd1774f55 (patch) | |
tree | 7fd55fc6c2ce1dc35966ed1413545c55eca5c2e3 /translate/grt | |
parent | fe6ff5794545ce9f7d00985b55cf9d5b18725ea0 (diff) | |
download | ghdl-75fcb55685369ab176541cdce4b0874bd1774f55.tar.gz ghdl-75fcb55685369ab176541cdce4b0874bd1774f55.tar.bz2 ghdl-75fcb55685369ab176541cdce4b0874bd1774f55.zip |
First run of OSVVM_2014_01 with gcc backend.
Diffstat (limited to 'translate/grt')
-rw-r--r-- | translate/grt/ghdl_main.adb | 3 | ||||
-rw-r--r-- | translate/grt/grt-images.adb | 14 | ||||
-rw-r--r-- | translate/grt/grt-images.ads | 8 | ||||
-rw-r--r-- | translate/grt/grt-types.ads | 5 |
4 files changed, 30 insertions, 0 deletions
diff --git a/translate/grt/ghdl_main.adb b/translate/grt/ghdl_main.adb index 256d4299b..ce5b67d7e 100644 --- a/translate/grt/ghdl_main.adb +++ b/translate/grt/ghdl_main.adb @@ -27,8 +27,11 @@ with Grt.Options; use Grt.Options; with Grt.Main; with Grt.Types; use Grt.Types; +-- Some files are only referenced from compiled code. With it here so that +-- they get compiled during build (and elaborated). pragma Warnings (Off); with Grt.Rtis_Binding; +with Grt.Std_Logic_1164; pragma Warnings (On); diff --git a/translate/grt/grt-images.adb b/translate/grt/grt-images.adb index e3d66c186..49bce9d75 100644 --- a/translate/grt/grt-images.adb +++ b/translate/grt/grt-images.adb @@ -165,6 +165,20 @@ package body Grt.Images is Return_String (Res, Str (1 .. P)); end Ghdl_To_String_F64_Digits; + procedure Ghdl_BV_To_Ostring (Res : Std_String_Ptr; + Base : Std_Bit_Vector_Basep; + Len : Ghdl_Index_Type) is + begin + raise Program_Error; + end Ghdl_BV_To_Ostring; + + procedure Ghdl_BV_To_Hstring (Res : Std_String_Ptr; + Base : Std_Bit_Vector_Basep; + Len : Ghdl_Index_Type) is + begin + raise Program_Error; + end Ghdl_BV_To_Hstring; + -- procedure Ghdl_Image_F64 (Res : Std_String_Ptr; Val : Ghdl_F64) -- is -- -- Sign (1) + digit (1) + dot (1) + digits (15) + exp (1) + sign (1) diff --git a/translate/grt/grt-images.ads b/translate/grt/grt-images.ads index cd97fe944..a5d8415a3 100644 --- a/translate/grt/grt-images.ads +++ b/translate/grt/grt-images.ads @@ -46,6 +46,12 @@ package Grt.Images is procedure Ghdl_To_String_F64 (Res : Std_String_Ptr; Val : Ghdl_F64); procedure Ghdl_To_String_F64_Digits (Res : Std_String_Ptr; Val : Ghdl_F64; Nbr_Digits : Ghdl_I32); + procedure Ghdl_BV_To_Ostring (Res : Std_String_Ptr; + Base : Std_Bit_Vector_Basep; + Len : Ghdl_Index_Type); + procedure Ghdl_BV_To_Hstring (Res : Std_String_Ptr; + Base : Std_Bit_Vector_Basep; + Len : Ghdl_Index_Type); private pragma Export (Ada, Ghdl_Image_B1, "__ghdl_image_b1"); pragma Export (C, Ghdl_Image_E8, "__ghdl_image_e8"); @@ -58,4 +64,6 @@ private pragma Export (C, Ghdl_To_String_I32, "__ghdl_to_string_i32"); pragma Export (C, Ghdl_To_String_F64, "__ghdl_to_string_f64"); pragma Export (C, Ghdl_To_String_F64_Digits, "__ghdl_to_string_f64_digits"); + pragma Export (C, Ghdl_BV_To_Ostring, "__ghdl_bv_to_ostring"); + pragma Export (C, Ghdl_BV_To_Hstring, "__ghdl_bv_to_hstring"); end Grt.Images; diff --git a/translate/grt/grt-types.ads b/translate/grt/grt-types.ads index 18ea2b9f3..96bd97b51 100644 --- a/translate/grt/grt-types.ads +++ b/translate/grt/grt-types.ads @@ -86,6 +86,11 @@ package Grt.Types is function To_Std_String_Ptr is new Ada.Unchecked_Conversion (Source => Address, Target => Std_String_Ptr); + type Std_Bit is ('0', '1'); + type Std_Bit_Vector_Uncons is array (Ghdl_Index_Type range <>) of Std_Bit; + subtype Std_Bit_Vector_Base is Std_Bit_Vector_Uncons (Ghdl_Index_Type); + type Std_Bit_Vector_Basep is access all Std_Bit_Vector_Base; + -- An unconstrained array. -- It is in fact a fat pointer to the base and the bounds. type Ghdl_Uc_Array is record |