summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grt/grt-signals.ads4
-rw-r--r--src/vhdl/translate/translation.adb7
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);