diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/grt/grt-signals.adb | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/grt/grt-signals.adb b/src/grt/grt-signals.adb index 96e2b9838..fc97729c7 100644 --- a/src/grt/grt-signals.adb +++ b/src/grt/grt-signals.adb @@ -2774,6 +2774,7 @@ package body Grt.Signals is procedure Delayed_Implicit_Process (Sig : Ghdl_Signal_Ptr) is Pfx : constant Ghdl_Signal_Ptr := Sig.Ports (0); + Ntime : Std_Time; Trans : Transaction_Acc; Last : Transaction_Acc; Prev : Transaction_Acc; @@ -2785,12 +2786,7 @@ package body Grt.Signals is -- R <= transport S after T; -- end process; - -- Create the transaction. - Trans := new Transaction'(Kind => Trans_Value, - Line => 0, - Time => Current_Time + Sig.S.Time, - Next => null, - Val => Pfx.Value); + Ntime := Current_Time + Sig.S.Time; -- Find the last transaction. Last := Sig.S.Attr_Trans; @@ -2801,11 +2797,23 @@ package body Grt.Signals is end loop; -- The transaction are scheduled after the last one. - pragma Assert (Last.Time <= Trans.Time); - pragma Assert (Last.Time /= Trans.Time or else Prev = Last); + pragma Assert (Last.Time <= Ntime); + + if Last.Time = Ntime then + -- Change the projected value. + Last.Val := Pfx.Value; + else + -- Create the transaction. + Trans := new Transaction'(Kind => Trans_Value, + Line => 0, + Time => Ntime, + Next => null, + Val => Pfx.Value); + + -- Append the transaction. + Prev.Next := Trans; + end if; - -- Append the transaction. - Prev.Next := Trans; if Sig.S.Time = 0 then Add_Active_Chain (Sig); end if; |