aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/translate/translation.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-07-24 18:31:11 +0200
committerTristan Gingold <tgingold@free.fr>2020-07-25 11:28:49 +0200
commit04cd83fb46bee1e7a7b37be95bee73449af9c8b8 (patch)
tree3fe35d0bc6d4b1be8d81ad44df685057c221d2dc /src/vhdl/translate/translation.adb
parent4033dd795927a4953879bdc92d395788893a5468 (diff)
downloadghdl-04cd83fb46bee1e7a7b37be95bee73449af9c8b8.tar.gz
ghdl-04cd83fb46bee1e7a7b37be95bee73449af9c8b8.tar.bz2
ghdl-04cd83fb46bee1e7a7b37be95bee73449af9c8b8.zip
ortho: add unbounded records, rework array subtypes.
Diffstat (limited to 'src/vhdl/translate/translation.adb')
-rw-r--r--src/vhdl/translate/translation.adb10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vhdl/translate/translation.adb b/src/vhdl/translate/translation.adb
index 519671970..b510a7ae5 100644
--- a/src/vhdl/translate/translation.adb
+++ b/src/vhdl/translate/translation.adb
@@ -1364,8 +1364,10 @@ package body Translation is
-- Max length of a scalar type.
-- Note: this type is not correctly aligned. Restricted use only.
-- type __ghdl_scalar_bytes is __ghdl_chararray (0 .. 8);
- Ghdl_Scalar_Bytes := New_Constrained_Array_Type
- (Chararray_Type, New_Unsigned_Literal (Ghdl_Index_Type, 8));
+ Ghdl_Scalar_Bytes := New_Array_Subtype
+ (Chararray_Type,
+ Char_Type_Node,
+ New_Unsigned_Literal (Ghdl_Index_Type, 8));
New_Type_Decl (Get_Identifier ("__ghdl_scalar_bytes"),
Ghdl_Scalar_Bytes);
@@ -2130,8 +2132,8 @@ package body Translation is
-- Std_Ulogic indexed array of STD.Boolean.
-- Used by PSL to convert Std_Ulogic to boolean.
- Std_Ulogic_Boolean_Array_Type :=
- New_Constrained_Array_Type (Std_Boolean_Array_Type, New_Index_Lit (9));
+ Std_Ulogic_Boolean_Array_Type := New_Array_Subtype
+ (Std_Boolean_Array_Type, Std_Boolean_Type_Node, New_Index_Lit (9));
New_Type_Decl (Get_Identifier ("__ghdl_std_ulogic_boolean_array_type"),
Std_Ulogic_Boolean_Array_Type);
New_Const_Decl (Ghdl_Std_Ulogic_To_Boolean_Array,