From d9e4e63079c7c4b5b965414a53679d502fe4a233 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 22 Dec 2017 06:42:30 +0100 Subject: WIP: define ghdl_sizes_type. --- src/vhdl/translate/translation.adb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/vhdl/translate/translation.adb') diff --git a/src/vhdl/translate/translation.adb b/src/vhdl/translate/translation.adb index c6ef271fa..86497bae5 100644 --- a/src/vhdl/translate/translation.adb +++ b/src/vhdl/translate/translation.adb @@ -508,6 +508,24 @@ package body Translation is New_Type_Decl (Get_Identifier ("__ghdl_bool_array_ptr"), Ghdl_Bool_Array_Ptr); + -- Create: + -- type __ghdl_sizes_type is record + -- size_val : ghdl_index_type; + -- size_sig : ghdl_index_type; + -- end record; + declare + Constr : O_Element_List; + begin + Start_Record_Type (Constr); + New_Record_Field (Constr, Ghdl_Sizes_Val, + Get_Identifier ("size_val"), Ghdl_Index_Type); + New_Record_Field (Constr, Ghdl_Sizes_Sig, + Get_Identifier ("size_sig"), Ghdl_Index_Type); + Finish_Record_Type (Constr, Ghdl_Sizes_Type); + New_Type_Decl (Get_Identifier ("__ghdl_sizes_type"), + Ghdl_Sizes_Type); + end; + -- Create type ghdl_compare_type is (lt, eq, ge); declare Constr : O_Enum_List; -- cgit v1.2.3