Jump to content

Ok to put() to tlm_fifo and call nb_can_get() in the same delta cycle?

Recommended Posts

Neither is the case. Between putting an element into the fifo and the element becoming available is at least a delta cycle. And this is by design as in hardware it takes some time for values to propagate. sc_core::sc_fifo exposes the same behavior.

If you need immediate update you can use ordinary C++ containers like std::dequeue...

Link to comment
Share on other sites

Well, I'm not sure something like deque will provide what is needed, because I still need process notifications when an entry is written or read.

I think what I am not seeing is how to write into the fifo and then block the writer until the reader reads from it.  I can write something custom based on deque or something else (or look for another class in sc_core or tlm) to provide this, but wanted to be sure that tlm_fifo didn't provide this first.

Link to comment
Share on other sites

  • 2 weeks later...

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