Jump to content

Getting a deprecated wait warning in SystemC even though I'm using the right type of wait.

Recommended Posts

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.



Link to comment
Share on other sites

TLM interfaces use waits on events, e.g.:

template <typename T>



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


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() ) 



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

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