Jump to content

sc_event not working but sc_fifo does


Recommended Posts

Hi all,

I have a project which has a many modules. In one of the modules there is a producer and a consumer. I synced them using an event.





This seems to be not working.

Now I tried using sc_fifo

sc_fifo<int> notifyFifo(1)





dummy = notifyFifo->read()


This is working.


I also tried putting wait after signal in producer and commenting out the consumer wait




This also does not work. As the producer is getting stuck in wait. Verified by inserting print statements.

Did anyone face a similar issue?



Edited by Gautham
spelling mistakes
Link to comment
Share on other sites

Please note that event notification will be lost if no one is waiting for it.  This may be your case:

Option 1:  Consumer starts and suspends on wait(), Producer starts, notifies event, resumes consumer.

Option 2:  Producer starts, notifies event, event notification does nothing since no one is waiting for it.

So maybe sc_fifo is what you really need. 

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...