summaryrefslogtreecommitdiff
path: root/src/grt
diff options
context:
space:
mode:
authorTristan Gingold2015-06-20 14:24:56 +0200
committerTristan Gingold2015-06-20 14:24:56 +0200
commitc823d41669c55d6c0bdb8de5ef45a407ac4f25bd (patch)
treed38d297789deb9eaeaecfbda9965010fb66a27e4 /src/grt
parentd08386567e47854722e2b3a92720737837ca0bbd (diff)
downloadghdl-c823d41669c55d6c0bdb8de5ef45a407ac4f25bd.tar.gz
ghdl-c823d41669c55d6c0bdb8de5ef45a407ac4f25bd.tar.bz2
ghdl-c823d41669c55d6c0bdb8de5ef45a407ac4f25bd.zip
Adjust previous patch.
Diffstat (limited to 'src/grt')
-rw-r--r--src/grt/grt-signals.adb28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/grt/grt-signals.adb b/src/grt/grt-signals.adb
index 96e2b98..fc97729 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;