Yasmin Posted October 8, 2023 Report Posted October 8, 2023 So, I modified a simple MAC design to use TLM FIFOs instead of SC Signals. I'm using clocked threads for the concurrent methods. For some reason, SystemC thinks I'm using the wrong form of wait, as evidenced by the warning message: Info: (I804) /IEEE_Std_1666/deprecated: all waits except wait() and wait(N) are deprecated for SC_CTHREAD, use an SC_THREAD instead I don't understand why this is the case. If you grep for "wait" over my code files, you'll see that I'm using the wait() method, as advised: $ grep -n wait *.h *.cpp mac.h:32: wait(); mac_tb.h:34: wait(); mac_tb.h:56: wait(); Am I doing something wrong here? Is there a fix for this? I've attached the design to this forum post. mac_sc_cthread.zip Quote
Andy Goodrich Posted October 8, 2023 Report Posted October 8, 2023 TLM interfaces use waits on events, e.g.: template <typename T> inline void tlm_fifo<T>::put( const T& val_ ) { while( is_full() ) { wait( m_data_read_event ); } . . . } So you cannot use a TLM interface with an SC_CTHREAD, you need an SC_THREAD as the diagnostic states. If you need to wait on an sc_clock in an SC_THREAD change your wait(); to wait on the positive edge of the clock. For instance, if your input port (sc_in<bool>) for the clock is called clk: wait( clk.posedge_event() ) Quote
Yasmin Posted October 8, 2023 Author Report Posted October 8, 2023 @Andy Goodrich Okay, that makes sense. I'm aware of how to use SC_THREADs but I didn't know that TLM fifos were incompatible with clocked threads. Thank you for the help. 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.