Jump to content

Recommended Posts

Posted

Hello,

 

I'm new to TLM. I have a question in non-blocking transaction.

I'm implementing an AT interconnect. It has tagged initiators and one target. During the forward transport, I use a private extension to store the tagged initiator id for each transaction.

My question is how do I insert a transaction into a payload event queue including this id as an argument. Meaning: the transaction need to be inserted into the peq with this id, transaction reference, phase and delay.

 

Thank you,

Rajesh

Posted

Rajesh,

 

My question is how do I insert a transaction into a payload event queue including this id as an argument. Meaning: the transaction need to be inserted into the peq with this id, transaction reference, phase and delay.

 


You can use a tlm_utils::eq_with_cb_and_phase (see 1666-2011, 16.3).  Since the extension is already stored within the transaction payload, it is sufficient to insert the payload itself:

 

// PEQ member of module "MyModule"
  tlm_utils::peq_with_cb_and_phase<MyModule> m_peq;


// callback member function (assuming base protocol)
  void peq_callback( tlm::tlm_generic_payload&, const tlm::tlm_phase& );


// in constructor: reqister callback for PEQ
SC_CTOR(MyModule)
  : m_peq( "peq", this, &MyModule::peq_callback )
  // , ...
 { /* ... */ }

// in nb_transport_fw, gp = current transaction payload
// memory management, extension handling, ...

  m_peq.notify( gp, phase, delay );  // insert into PEQ


// PEQ callback
void MyModule::peq_callback( tlm::tlm_generic_payload& gp, const tlm::tlm_phase& phase )
{
  // extract extension from payload
  // ...
}

 

 

Greetings from Oldenburg,

  Philipp

Posted

Hello Phillip,

 

Thank you for a quick and helpful answer. I have yet another question. My interconnect has two payload event queues. One from the initiator side and another from the target side, inbetween is the algorithm for the interconnect.

Does this mean that I need two sets of forward transport and backward transport methods? And also two sets of payload callback functions? A little bit more demonestration would help a lot.

 

Thank you again.

Posted

Rajesh,
 

Does this mean that I need two sets of forward transport and backward transport methods? And also two sets of payload callback functions?

 

Not necessarily.  But this depends on your requirements and the rest of your interconnect model.

 

A little bit more demonestration would help a lot.

 

I'd suggest that you do some experiments on your own. We can just guess, what your goals and constraints are. In case of persisting problems, you can post the relevant parts of your model and ask again. 

 

Greetings from Oldenburg,

  Philipp

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