notify() function in order to trigger event. It can be called with parameters as below.
-
- notify() :Immediate notification
- notify(SC_ZERO_TIME) :Delta notification
- notify(double v, sc_time_unit tu) :Timed notification
- In fact, Delta notification is Timed notification with timed value is zero.
- When an event using Immediate notification, It is implied execution will be in the same delta-cycle(in Evaluate phase). Later, the Update phase will be called.
- When an event using Delta notification, It is will to wait until Update phase called. and allows other processes in the current delta-cycle to complete.
We use an example to clarify:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
void NOTIFY::monitor_signal_immediate_method() { printf("[%40s][%10s] reg value is 0x%08x.\n", __FUNCTION__, sc_time_stamp().to_string().c_str(), reg.read()); } void NOTIFY::monitor_signal_delta_method() { printf("[%40s][%10s] reg value is 0x%08x.\n", __FUNCTION__, sc_time_stamp().to_string().c_str(), reg.read()); } void NOTIFY::StartEventMethod() { reg.write(0x1F1F1F1F); e_start_delta.notify(SC_ZERO_TIME); e_start_immediate.notify(); } |
Output:
1 2 |
[ NOTIFY::monitor_signal_immediate_method][ 5 ps] reg value is 0x00000000. [ NOTIFY::monitor_signal_delta_method][ 5 ps] reg value is 0x1F1F1F1F. |
When reg write value is 0x1F1F1F1F. The value will not update to reg until Update phase called. So, in monitor_signal_immediate_method ,the reg value still is 0x00000000 ( old value). And in monitor_signal_delta_method ,the reg value is 0x1F1F1F1F ( new value)
Download Project (VS2015):
Google Drive 1 Google Drive 2
Good day! freesourcec.com
We present oneself
Sending your commercial proposal through the feedback form which can be found on the sites in the contact partition. Feedback forms are filled in by our application and the captcha is solved. The superiority of this method is that messages sent through feedback forms are whitelisted. This method increases the probability that your message will be read.
Our database contains more than 25 million sites around the world to which we can send your message.
The cost of one million messages 49 USD
FREE TEST mailing of 50,000 messages to any country of your choice.
This message is automatically generated to use our contacts for communication.
Contact us.
Telegram – @FeedbackFormEU
Skype FeedbackForm2019
Email – FeedbackForm@make-success.com