summaryrefslogtreecommitdiff
path: root/src/vhdl/translate/translation.adb
diff options
context:
space:
mode:
authorTristan Gingold2016-01-09 09:04:17 +0100
committerTristan Gingold2016-01-09 09:04:17 +0100
commit9ccd655f0a727b7b1499870d577eea5da34ccbcd (patch)
treef02970dcf1baead7d18cc5e1eff7d83da3798e06 /src/vhdl/translate/translation.adb
parent12ecf52980418a2af1f50072fc00e62b2ff1aa6f (diff)
downloadghdl-9ccd655f0a727b7b1499870d577eea5da34ccbcd.tar.gz
ghdl-9ccd655f0a727b7b1499870d577eea5da34ccbcd.tar.bz2
ghdl-9ccd655f0a727b7b1499870d577eea5da34ccbcd.zip
Reorder fields in signals for alignment.
Diffstat (limited to 'src/vhdl/translate/translation.adb')
-rw-r--r--src/vhdl/translate/translation.adb7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vhdl/translate/translation.adb b/src/vhdl/translate/translation.adb
index cfc1590..8ed651a 100644
--- a/src/vhdl/translate/translation.adb
+++ b/src/vhdl/translate/translation.adb
@@ -1242,6 +1242,7 @@ package body Translation is
-- Declarations for signals.
-- 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));
@@ -1250,9 +1251,6 @@ package body Translation is
-- Type __signal_signal is record
Start_Uncomplete_Record_Type (Ghdl_Signal_Type, Rec);
- New_Record_Field (Rec, Ghdl_Signal_Value_Field,
- Get_Identifier ("value"),
- Ghdl_Ptr_Type);
New_Record_Field (Rec, Ghdl_Signal_Driving_Value_Field,
Get_Identifier ("driving_value"),
Ghdl_Scalar_Bytes);
@@ -1265,6 +1263,9 @@ package body Translation is
New_Record_Field (Rec, Ghdl_Signal_Last_Active_Field,
Get_Identifier ("last_active"),
Std_Time_Otype);
+ New_Record_Field (Rec, Ghdl_Signal_Value_Field,
+ Get_Identifier ("value"),
+ Ghdl_Ptr_Type);
New_Record_Field (Rec, Ghdl_Signal_Event_Field,
Get_Identifier ("event"),
Std_Boolean_Type_Node);