rajesh Posted July 2, 2013 Report Posted July 2, 2013 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 Quote
Philipp A Hartmann Posted July 2, 2013 Report Posted July 2, 2013 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 maehne 1 Quote
rajesh Posted July 3, 2013 Author Report Posted July 3, 2013 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. Quote
Philipp A Hartmann Posted July 3, 2013 Report Posted July 3, 2013 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 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.