Notify20 scms schedule action 20ms from now

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: action 20ms from now action.notify(1.5, SC_NS); // Reschedule for 1.5ns from now action.notify(1.5, SC_NS); // Redundant, useless action.notify(3.0, SC_NS); // Preempted by event at 1.5ns action.notify(SC_ZERO_TIME); //Reschedule to the end of now action.notify(1.0, SC_SEC); // Useless action.cancel(); action.notify(3.0, SC_US); // Schedule action 3us from now …… ECEN 468 Lecture 3 16 Catching Event wait(event); wait(event1 | event2…); wait(event1 & event2…); wait(time, event); // Event or timeout wait(time, event1 | event2…); wait(time, event1 & event2…); wait(); // Static sensitivity When multiple events are or’ed, impossible to know which event occurred, as events have no value if (event_A) do_something(); // Syntax error! ECEN 468 Lecture 3 17 Example of Event Catching …… sc_event ack_event, bus_error; …… sc_time start_time(sc_time_stamp()); wait (t_MAX_DELAY, ack_event | bus_error); if (sc_time_stamp() - start_time == t_MAX_DELAY) { break; …… } ECEN 468 Lecture 3 18...
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