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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×