michaelfivez Posted October 19, 2019 Report Posted October 19, 2019 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 Quote
David Black Posted October 19, 2019 Report Posted October 19, 2019 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>. Quote
Roman Popov Posted October 20, 2019 Report Posted October 20, 2019 My advice: start with sc_fifo, learn how it works, learn it's source code. Then write your own handshake channel using same principles. Quote
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.