diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-12-22 06:42:30 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-01-02 12:11:19 +0100 |
commit | d9e4e63079c7c4b5b965414a53679d502fe4a233 (patch) | |
tree | 0ee9dfa838f5572a5caa5b253c23940513efb44a /src/vhdl | |
parent | befe6faf5f902f58e8d64c423526e86337a2b025 (diff) | |
download | ghdl-d9e4e63079c7c4b5b965414a53679d502fe4a233.tar.gz ghdl-d9e4e63079c7c4b5b965414a53679d502fe4a233.tar.bz2 ghdl-d9e4e63079c7c4b5b965414a53679d502fe4a233.zip |
WIP: define ghdl_sizes_type.
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; |