Happens at a single instant in time has no duration

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: uration or value Usually there is a observer that watches the event If an event occurs and no processes are waiting to catch it, it goes unnoticed sc_event event_name; event_name.notify(void); // Immediate … … // Process A // wait(event_B); …… … … // Process B event_B.notify(); …… ECEN 468 Lecture 3 10 Delayed Event Notification event_name.notify(SC_ZERO_TIME); // Delayed event_name.notify(sc_time); // Timed, sc_time > 0 event_name.notify(double, units); What does notify(SC_ZERO_TIME) mean? SC_ZERO_TIME is equivalent to sc_time(0, SC_SEC) Processes waiting for a delayed notification will execute only after all runnable processes in the current evaluation state have executed ECEN 468 Lecture 3 11 Example of Delayed Event Notification SC_MODULE(iEvent){ SC_CTOR(iEvent){ SC_THREAD(proc_A); SC_THREAD(proc_B); } void proc_A(){ event_A.notify(); } void proc_B(){ wait(event_A); } //May miss event sc_event event_A; } SC_MODULE(iEvent){ SC_CTOR(iEvent){ SC_THREAD(proc_A); SC_THREAD(proc_B); } void proc_A(){ event_A.notify(SC_ZERO_TIME); } void proc...
View Full Document

This note was uploaded on 03/02/2014 for the course ECEN 468 taught by Professor Jianghu during the Spring '08 term at Texas A&M.

Ask a homework question - tutors are online