diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/translate/trans.ads | 5 | ||||
-rw-r--r-- | src/vhdl/translate/translation.adb | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/vhdl/translate/trans.ads b/src/vhdl/translate/trans.ads index f18795e61..565ee2a87 100644 --- a/src/vhdl/translate/trans.ads +++ b/src/vhdl/translate/trans.ads @@ -100,6 +100,11 @@ package Trans is Ghdl_Bool_Array_Type : O_Tnode; Ghdl_Bool_Array_Ptr : O_Tnode; + -- Size record + Ghdl_Sizes_Type : O_Tnode; + Ghdl_Sizes_Val : O_Fnode; + Ghdl_Sizes_Sig : O_Fnode; + -- Comparaison type. Ghdl_Compare_Type : O_Tnode; Ghdl_Compare_Lt : O_Cnode; 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; |