Jump to content
Sign in to follow this  
feron_jb

How to reset or kill an ongoing transaction?

Recommended Posts

Hi everyone,

For a processor model, I need to be able to reset or kill a transaction sent across an interface and stored in a Payload Event Queue.
How can I do that?

If I initiate a transaction like this :

tlm::tlm_generic_payload* trans = new tlm::tlm_generic_payload;
tlm::tlm_phase* trans_phase = new tlm::tlm_phase;
sc_time* delay = new sc_time;
tlm::tlm_sync_enum* transStatus = new tlm::tlm_sync_enum;

*trans_phase = tlm::BEGIN_REQ;
*delay = SC_ZERO_TIME;    // Or any delay
trans->set_command(tlm::TLM_WRITE_COMMAND);
trans->set_dmi_allowed(false);
trans->set_response_status(tlm::TLM_INCOMPLETE_RESPONSE);

*transStatus = InitSocket.nb_transport_fw(*trans, *trans_phase, *delay);

How could I, afterwards and before the specified delay has elapsed, kill this transaction or remove it from the target Payload Event Queue?

Can I keep a copy of the 'trans' pointer to reset the transaction content if needed?

 

Thank you for your help!

Regards,

J-B

Share this post


Link to post
Share on other sites

Your request is certainly non-standard, but if you have a custom protocol you could add a payload extension with a rule that allows it to kill a transaction.

 

A more standard approach would be to allow the transaction to complete, but have the target or interconnect tag the incoming transaction with an error status or perhaps just leave the TLM_INCOMPLETE_RESPONSE in place.

 

Question: Where/what is cancelling the transaction? The initiator or the target? Does this have to do with response timeout (target too slow) or some other situation?

 

Observation: The standard protocol requires that you use memory management when using nb_transport (Approximately Timed coding style). I don't see evidence of acquire() that in the code snippet above.

Share this post


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.

Sign in to follow this  

×
×
  • Create New...