diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-03-02 06:40:35 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-03-02 06:40:35 +0100 |
commit | 031541584d305db2ef306c8941799a850f4617fc (patch) | |
tree | 584de28215a4ba5ae5a68d781585a2903c029184 /src | |
parent | 68181e75ecb5ff2277561b166f8c283de61d8385 (diff) | |
download | ghdl-031541584d305db2ef306c8941799a850f4617fc.tar.gz ghdl-031541584d305db2ef306c8941799a850f4617fc.tar.bz2 ghdl-031541584d305db2ef306c8941799a850f4617fc.zip |
grt-signals: remove next_signal_active.
Diffstat (limited to 'src')
-rw-r--r-- | src/grt/grt-processes.adb | 4 | ||||
-rw-r--r-- | src/grt/grt-signals.adb | 28 | ||||
-rw-r--r-- | src/grt/grt-signals.ads | 11 |
3 files changed, 10 insertions, 33 deletions
diff --git a/src/grt/grt-processes.adb b/src/grt/grt-processes.adb index a76eda7ed..0f0de340b 100644 --- a/src/grt/grt-processes.adb +++ b/src/grt/grt-processes.adb @@ -864,9 +864,6 @@ package body Grt.Processes is Next_Time := Compute_Next_Time; end if; end if; - if Next_Time /= 0 then - Update_Active_Chain; - end if; -- Clear current_delta, will be set by Simulation_Cycle. Current_Delta := 0; @@ -1046,7 +1043,6 @@ package body Grt.Processes is Tn := Compute_Next_Time; end if; - Update_Active_Chain; Next_Time := Tn; Current_Delta := 0; diff --git a/src/grt/grt-signals.adb b/src/grt/grt-signals.adb index b7d61a9f0..0d9be85b8 100644 --- a/src/grt/grt-signals.adb +++ b/src/grt/grt-signals.adb @@ -655,10 +655,6 @@ package body Grt.Signals is -- Update_Clear_List : Ghdl_Signal_Ptr; - -- Updated by Find_Next_Time to the list of signal that would be active - -- at the time returned (if not current_time). - Next_Signal_Active_Chain : Ghdl_Signal_Ptr; - -- List of signals which have projected waveforms in the future (beyond -- the next delta cycle). -- Currently signals are never removed from this list. @@ -1923,7 +1919,7 @@ package body Grt.Signals is Next_Sig : Ghdl_Signal_Ptr; begin -- Free active_chain. - Sig := Next_Signal_Active_Chain; + Sig := Ghdl_Signal_Active_Chain; loop Next_Sig := Sig.Link; exit when Next_Sig = null; @@ -1931,16 +1927,9 @@ package body Grt.Signals is Sig := Next_Sig; end loop; pragma Assert (Sig = Signal_End); - Next_Signal_Active_Chain := Sig; + Ghdl_Signal_Active_Chain := Sig; end Flush_Active_Chain; - procedure Update_Active_Chain is - begin - pragma Assert (Ghdl_Signal_Active_Chain.Link = null); - Ghdl_Signal_Active_Chain := Next_Signal_Active_Chain; - Next_Signal_Active_Chain := Signal_End; - end Update_Active_Chain; - function Find_Next_Time (Tn : Std_Time) return Std_Time is Res : Std_Time; @@ -1953,20 +1942,18 @@ package body Grt.Signals is return; end if; - if Trans.Time = Res and Sig.Link = null then + if Trans.Time = Res then -- Put to active list. - Sig.Link := Next_Signal_Active_Chain; - Next_Signal_Active_Chain := Sig; + Add_Active_Chain (Sig); elsif Trans.Time < Res then -- A transaction is scheduled before all the previous one. Clear -- the active chain, and put simply Sig on it. Flush_Active_Chain; - -- Put sig on the list. - Sig.Link := Next_Signal_Active_Chain; - Next_Signal_Active_Chain := Sig; - Res := Trans.Time; + + -- Put sig on the list. + Add_Active_Chain (Sig); end if; if Res = Current_Time then -- Must have been in the active list. @@ -3662,7 +3649,6 @@ package body Grt.Signals is Ghdl_Signal_Active_Chain := Signal_End; Ghdl_Implicit_Signal_Active_Chain := Signal_End; Future_List := Signal_End; - Next_Signal_Active_Chain := Signal_End; end Init; end Grt.Signals; diff --git a/src/grt/grt-signals.ads b/src/grt/grt-signals.ads index 195036fde..61a38d38c 100644 --- a/src/grt/grt-signals.ads +++ b/src/grt/grt-signals.ads @@ -482,17 +482,12 @@ package Grt.Signals is procedure Init_Signals; -- Return the next time at which a driver becomes active. - -- SIDE EFFECT: this function updates the next_signal_active_chain. - -- Note: the next_signal_active_chain must be empty before running + -- SIDE EFFECT: this function updates the ghdl_signal_active_chain. + -- Note: the ghdl_signal_active_chain must be emptied before running -- processes as they assume that if signals are on a list, they are on the - -- ghdl_signal_active_chain (and not on next_signal_active_chain). Use one - -- of Update_Active_Chain or Flush_Active_Chain for that effect. + -- ghdl_signal_active_chain. function Find_Next_Time (Tn : Std_Time) return Std_Time; - -- To be called after Find_Next_Time to update the chain of active signals, - -- only if the next cycle is not a delta cycle. - procedure Update_Active_Chain; - -- Empty the next_signal_active_chain. procedure Flush_Active_Chain; |