Jump to content

Recommended Posts

May I ask for a reference on how to convert tlm interface to pin interface?

For example, sc_fifo_in_if<T> convert sc_out<T>

 

#include <systemc.h>

class fifo_in_tlm2pin : public sc_module {
public :
  sc_port< sc_fifo_in_if<T> >  fifo_in;

  sc_out<T> fifo_out;

  SC_HAS_PROCESS(fifo_in_tlm2pin);

  fifo_in_tlm2pin( sc_module_name _name ) : sc_module (_name)
  {

  }

 

};

 

 

Link to post
Share on other sites

Well, sc_fifo is not TLM.

For your example the basic question is: what is the protocol on fifo_out? Should it be clock-based? Valid-Ready signaling? So your queastion and example is too generic and broad.

If you are looking for an example to translate from TLM2.0 to pin level of an Amba AHB protocol you may have a look here: https://git.minres.com/SystemC/SystemC-Components/src/branch/master/incl/tlm/ahb/bfm and  https://git.minres.com/SystemC/SystemC-Components/src/branch/master/src/tlm_ahb_bfm_initiator.cpp as well as https://git.minres.com/SystemC/SystemC-Components/src/branch/master/src/tlm_ahb_bfm_target.cpp. They implement TLM2.0 to pin and pin to TLM2.0

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