[sv-ec] event.triggered()

From: Rich, Dave <Dave_Rich_at_.....>
Date: Tue Apr 03 2007 - 15:59:32 PDT
In 1800-2005, section 14.5.4 "Persistent trigger: triggered property", this should really be defined as a method. This difference between the two is that as a method, an evaluation event is only scheduled when there is an event trigger. 

I think we have to say that the triggered method gets reset at the end of time slot without generating an event. It's basically the same as the triggered function of this class:

class Event;

event m_e;
time trigger_time;

function void trigger; // the implementation of -> trigger
  -> m_e;
  trigger_time = $time;
endfunction

function bit triggered;
  return (trigger_time == $time); 
endfunction

endclass

Event e;

So wait(!e.triggered) will hang if called while triggered is set.

I know this seems strange, but it's no stranger than 

wait ( $time == 500 )

which has existed in Verilog from Day 1.

I believe the same issues have come up in the sv-ac with their $stable and $changed. The passage of time does not create an event, only the initial triggering of the event variable generates an evaluation event.

David Rich
Verification Technologist
Design Verification & Test Division
Mentor Graphics Corporation
dave_rich@mentor.com
Office:   408 487-7206
Cell:     510 589-2625


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Apr 3 15:59:48 2007

This archive was generated by hypermail 2.1.8 : Tue Apr 03 2007 - 15:59:55 PDT