diff options
author | Tristan Gingold | 2016-01-09 09:04:17 +0100 |
---|---|---|
committer | Tristan Gingold | 2016-01-09 09:04:17 +0100 |
commit | 9ccd655f0a727b7b1499870d577eea5da34ccbcd (patch) | |
tree | f02970dcf1baead7d18cc5e1eff7d83da3798e06 | |
parent | 12ecf52980418a2af1f50072fc00e62b2ff1aa6f (diff) | |
download | ghdl-9ccd655f0a727b7b1499870d577eea5da34ccbcd.tar.gz ghdl-9ccd655f0a727b7b1499870d577eea5da34ccbcd.tar.bz2 ghdl-9ccd655f0a727b7b1499870d577eea5da34ccbcd.zip |
Reorder fields in signals for alignment.
-rw-r--r-- | src/grt/grt-signals.ads | 4 | ||||
-rw-r--r-- | src/vhdl/translate/translation.adb | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/grt/grt-signals.ads b/src/grt/grt-signals.ads index e5fbf19..bd2d151 100644 --- a/src/grt/grt-signals.ads +++ b/src/grt/grt-signals.ads @@ -291,14 +291,16 @@ package Grt.Signals is type Ghdl_Signal is record -- Fields known by the compilers. - Value_Ptr : Ghdl_Value_Ptr; Driving_Value : aliased Value_Union; Last_Value : Value_Union; Last_Event : Std_Time; Last_Active : Std_Time; + Value_Ptr : Ghdl_Value_Ptr; + Event : Boolean; Active : Boolean; + -- If set, the activity of the signal is required by the user. Has_Active : Boolean; 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); |