Jump to content
michaelfivez

Is there a simple systemc channel with a blocking write and read function?

Recommended Posts

Hi,

I'm looking for a simple channel to use in system-c between sc_modules for the purpose of hardware modelling.
The functionality I'm looking for is basically an sc_fifo with size 0. A write should be blocking until the other side does a read. And a read vica-versa (should block until the other side writes).
I want the functionality as if I would implement a valid/ready handshake with the data I'm transferring trough the port.

Does such a channel exist, and if not what are alternatives I could use ? Trying to keep it as easy to use and as little error prone as possible.

I'm not looking to synthesis the code (purely for modelling).

Thanks a lot for your help :)

Michael

Share this post


Link to post
Share on other sites

Write your own channel, which is really quite simple(*). You could provide a template specialization of sc_fifo as a convenient and familiar interface.

* It's just C++.

We show students how to write their own FIFO channel as part of our Fundamentals of SystemC course <https://www.doulos.com/content/training/systemc_fundamental_training.php>.

Share this post


Link to post
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.

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