katang Posted October 23, 2019 Report Share Posted October 23, 2019 I am using a FIFO in my design and in some cases I need to push back the slightly modified content to the FIFO. I understand that sending immediate self-notification should be avoided. To do so, I modified the sample FIFO code as void write(FIFO_t* c) { if (num_elements == max) wait(FIFO_read_event); data[(first + num_elements) % max] = c; ++ num_elements; // wait(SCTIME_CLOCKTIME); // Avoid immediate notification FIFO_write_event.notify(SCTIME_CLOCKTIME); } In the combination shown above, I receive no warning. However, when I define the notification time by the wait() (now commented out) and notify() brackets are empty, I receive the warning Warning: (W536) immediate self-notification ignored as of IEEE 1666-2011: My guess was that the two cases are equivalent. What is the difference? Maybe only the syntax is checked and not the time difference? Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted October 23, 2019 Report Share Posted October 23, 2019 Quote My guess was that the two cases are equivalent No, they are not equivalent. They notify different events: wait ( time ); // notify active thread == self-notification FIFO_write_event.notify (time); // notify FIFO_write_event Quote Link to comment Share on other sites More sharing options...
katang Posted October 23, 2019 Author Report Share Posted October 23, 2019 Sorry. The question was bad. I meant that the self-notification is delayed, so it is not immediate any more. Do I miss something? Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted October 23, 2019 Report Share Posted October 23, 2019 Probably SCTIME_CLOCKTIME expands to nothing in your case? Quote Link to comment Share on other sites More sharing options...
katang Posted October 28, 2019 Author Report Share Posted October 28, 2019 It is defined as #define SCTIME_CLOCKTIME sc_time(100,sc_core::SC_PS) Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted October 28, 2019 Report Share Posted October 28, 2019 Then I have no idea. Set breakpoint on this report and analyze why it gets there. From my perspective your code sample should work without Warnings. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.