summaryrefslogtreecommitdiff
path: root/src/vhdl/simulate/elaboration.adb
diff options
context:
space:
mode:
authorTristan Gingold2015-12-19 21:36:47 +0100
committerTristan Gingold2015-12-19 21:36:47 +0100
commitae7a913a9c8193daee80f6774e8cb7351edea974 (patch)
tree620864a61a70d1d490665a511309e37e2250060f /src/vhdl/simulate/elaboration.adb
parent7fc250bfc464604ba811e9785a4719ac2c0e6564 (diff)
downloadghdl-ae7a913a9c8193daee80f6774e8cb7351edea974.tar.gz
ghdl-ae7a913a9c8193daee80f6774e8cb7351edea974.tar.bz2
ghdl-ae7a913a9c8193daee80f6774e8cb7351edea974.zip
Adjust simulation after sigptr changes.
Diffstat (limited to 'src/vhdl/simulate/elaboration.adb')
-rw-r--r--src/vhdl/simulate/elaboration.adb18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/vhdl/simulate/elaboration.adb b/src/vhdl/simulate/elaboration.adb
index a70a4ab..5e7109d 100644
--- a/src/vhdl/simulate/elaboration.adb
+++ b/src/vhdl/simulate/elaboration.adb
@@ -114,8 +114,8 @@ package body Elaboration is
Signals_Table.Append ((Kind => User_Signal,
Decl => Signal,
Sig => Sig,
- Instance => Block,
- Init => Def));
+ Val => Def,
+ Instance => Block));
end Elaborate_Signal;
function Execute_Time_Attribute (Instance : Block_Instance_Acc; Attr : Iir)
@@ -151,8 +151,9 @@ package body Elaboration is
Init := Create_B1_Value (False);
end if;
Sig := Create_Signal_Value (null);
+ Init := Unshare (Init, Global_Pool'Access);
Instance.Objects (Info.Slot) := Sig;
- Instance.Objects (Info.Slot + 1) := Unshare (Init, Global_Pool'Access);
+ Instance.Objects (Info.Slot + 1) := Init;
Prefix := Execute_Name (Instance, Get_Prefix (Signal), True);
Prefix := Unshare_Bounds (Prefix, Global_Pool'Access);
@@ -161,6 +162,7 @@ package body Elaboration is
Signals_Table.Append ((Kind => Implicit_Stable,
Decl => Signal,
Sig => Sig,
+ Val => Init,
Instance => Instance,
Time => T,
Prefix => Prefix));
@@ -168,6 +170,7 @@ package body Elaboration is
Signals_Table.Append ((Kind => Implicit_Quiet,
Decl => Signal,
Sig => Sig,
+ Val => Init,
Instance => Instance,
Time => T,
Prefix => Prefix));
@@ -175,6 +178,7 @@ package body Elaboration is
Signals_Table.Append ((Kind => Implicit_Transaction,
Decl => Signal,
Sig => Sig,
+ Val => Init,
Instance => Instance,
Time => 0,
Prefix => Prefix));
@@ -238,6 +242,7 @@ package body Elaboration is
Signals_Table.Append ((Kind => Implicit_Delayed,
Decl => Signal,
Sig => Sig,
+ Val => Init,
Instance => Instance,
Time => T,
Prefix => Prefix));
@@ -1194,19 +1199,20 @@ package body Elaboration is
procedure Elaborate_Guard_Signal
(Instance : Block_Instance_Acc; Guard : Iir)
is
- Sig : Iir_Value_Literal_Acc;
+ Sig, Val : Iir_Value_Literal_Acc;
Info : constant Sim_Info_Acc := Get_Info (Guard);
begin
Create_Signal (Instance, Guard);
Sig := Create_Signal_Value (null);
+ Val := Unshare (Create_B1_Value (False), Instance_Pool);
Instance.Objects (Info.Slot) := Sig;
- Instance.Objects (Info.Slot + 1) :=
- Unshare (Create_B1_Value (False), Instance_Pool);
+ Instance.Objects (Info.Slot + 1) := Val;
Signals_Table.Append ((Kind => Guard_Signal,
Decl => Guard,
Sig => Sig,
+ Val => Val,
Instance => Instance));
end Elaborate_Guard_Signal;