Jump to content

Yi-Chung.Lee

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Hi Philipp, thank you for the explanation. This do answer my question. The mechanism seems like that when calling wait(..., e) and event e triggered occurs at the same moment (e.g. @ 3 ns in this case), the wait function would not catch the event. Therefore, timestamp moves on to 3 ns + delta due to timeout and e.triggered() is not asserted. This is what you mentioned that the event is triggered between the wait(1, SC_NS) and the following wait(..., e).
  2. Dear all, I am confused about the expected behavior of wait event with timeout for sc_thread when the time-out value is delta cycle (i.e. SC_ZERO_TIME). //SC_THREAD void recv() { ... wait(SC_ZERO_TIME, e); ... } Given timestamp T and event e is triggered, what should be the time that recv() resumed from wait function? T or T+delta? I think it should be T since the event is not timeout. However, the simulation result behaves as the thread resumed at T+delta. The following code is an example. The send function send event e @ 0 ns and the event will be triggere
×
×
  • Create New...