Jump to content

sc_fifo data_read_event


Recommended Posts

Here is how it is specified by standard:


virtual const sc_event& data_read_event() const;

Member function data_read_event shall return a reference to an event, the data-read event, that is notified in the delta notification phase that occurs at the end of the delta cycle in which a value is read from the fifo.

So it notified after each delta cycle where fifo was read. Can it be that your receiver does nb_read from empty fifo?

Link to comment
Share on other sites

I'm actually using read(), rather than nb_read(). Given the specification you posted, it seems like something unexpected is happening. I can see the fifo is getting read (I put a log statement in after the read() call), but I don't see the thread that is waiting on data_read_event getting woken up (I put a log statement there, too).

The thread that is waiting on data_read_event does eventually get woken up when the last item is read off the fifo.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...