Jump to content
yair

making the target reject the initiator

Recommended Posts

Hi everyone,

my initiator is writing to a specific register but I want to block the initiator if a certain bit of the target register is set (1).
is there a way to do that?

 

Share this post


Link to post
Share on other sites

Your options depend on what you mean by "reject/block".

For example, you can reject the transaction by setting an error response in the transaction.  See IEEE Std. 1666-2011, 14.17 for the available status codes and their meaning.

  // tlm::tlm_generic_payload& trans
  trans.set_response_status( tlm::TLM_GENERIC_ERROR_RESPONSE ); 

Hope that helps,
  Philipp
 

Share this post


Link to post
Share on other sites

Thanks Philipp,
 

in my case it isnt an Error if we try to write to that register, the initiator can try to do write but the target doesnt have to accept it.
i think that the right solution would be to add a condition to the b-transport() method

Share this post


Link to post
Share on other sites
11 hours ago, yair said:

in my case it isnt an Error if we try to write to that register, the initiator can try to do write but the target doesnt have to accept it.
i think that the right solution would be to add a condition to the b-transport() method

You would need to describe your actual question in a bit more detail.

  • Is it about the logic inside the target (i.e. not performing the write)?  Sure, you can check the state of the control bit in b_transport before processing the command.
  • Is it about informing the initiator that this happened? Then you need to either use the response status or an extension.

/Philipp

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

×