qingwen.ye@gmail.com Posted October 24, 2012 Report Posted October 24, 2012 Hi All, Is there any good method to implement 'peek()' function for 'sc_fifo_in' port? We want to read the fifo data without poping it. (yes, tlm_fifo_ifs can do this.) thanks Quote
David Black Posted October 24, 2012 Report Posted October 24, 2012 First, I never use sc_fifo_in<T> or sc_fifo_out<T> ports. Use sc_port<sc_fifo_in_if<T>> or sc_port<sc_fifo_out_if<T>>. The reason for the existence of those two specialized ports was backwards compatibility with SystemC 1.0 (Does anybody still use 1.0?). Just use the TLM FIFO and the TLM 1.0 interface appropriate to your needs. It's all part of SystemC 2.3. If you just have to use sc_fifo<> somehow (for what reason I cannot imagine), then derive a new FIFO class from sc_fifo<> and implement your own peek, but it will be non-standard. You could probably add multiple inheritance of the tlm_peek_if<T>. 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.