The 890 proposal claims the following: When more than one synchronous drive on the same clocking block output (or inout) is scheduled to mature at the same simulation time, the last value is the only value driven onto the output signal. and When multiple drives are applied to a given clocking output at different times within the same clock cycle (i.e., between clocking events) then the last value written is the only value driven onto the output signal. For the "normal" cases of having drives appear before the clocking event, this is fine. But consider the following: bit a = 1; default clocking cb @(posedge clk); output a; endclocking initial begin ## 1; cb.a <= 0; @(x); cb.a <= 1; end Assume that the above is all active region set code but that "x" is an event that happens as a result of re-active stimulus in the same time step. This is a bit contrived ("a bit"?!?), but something along this line could happen with multiple processes in the system. So - does "a" glitch? The 890 text I quoted claims that it does not and that only the *last* value is driven. So when does this drive occur? It certainly cannot occur in re-nba since then the "0" would occur before the "cb.a <= 1" and cause a glitch. In general the "last write is the only write" can't possibly be guaranteed since the simulator can't possibly know which write is the last one (halting problem anyone?). We need to be really careful here. I would like to say "only the writes prior to the cb event are considered in this cycle" but that means that an intuitive write such as "##1 cb.a <= 1" would not occur when the user expects. Another alternative is to say that at the cb event the most recent value is written (as a re-nba write) and that subsequent writes to cb.a while cb.triggered is true are ALSO scheduled as re-nba writes. This means that "a" can glitch, but only in edge case scenarios. It does imply that the current wording of 890 needs to be weakened to not guarantee that only the last write shows up. Gord. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Mar 13 07:14:40 2007
This archive was generated by hypermail 2.1.8 : Tue Mar 13 2007 - 07:15:00 PDT