Saturday, 13 September 2014

EXCLUSIVE access in AXI and use of it

EXCLUSIVE access provides semaphore type of mechanism without secrificing AXI bus performance and with little bit complexity in AXI Slave.
Here is some description about how exclusive access works. EXCLUSIVE access is performed in following steps. 
  • First master initiates exclusive read transaction with ARID to slave.
  • Once slave gets some exclusive read request for perticular address range it starts monitoring that perticular address range for change of value in that memory address. 
  • After some time master initiate exclusive write transaction to that slave with same transaction type and same AWID that was used in previous exclusive read transaction. 
  • Exclusive write transaction is responced :
    • Successful:  If data values at address which was monitored is not changed by other master 
    • Fail : If data values at which address which was being monitored has been changed or address to be monitored has been updated with same ARID as initiated by master in first step of the exclusive access transaction. 
     

We all might have some question that what is the advantage of using this exclusive access transaction for AXI ? 

Now consider a system in which two AXI master devices are using same memory or we can say in technical term using shared memory.  And as a system designer you always will make sure that at a time your one master does not overwrite your memory written by another master.
Consider AXI Master 1 (M1) has initiated exclusive read transaction for address location 12'h100 to 12'h10F. Now slave will start monitoring these addresses for ARID given by M1. Now till exclusive write operation is performed slave monitors that address and if that address is changed by another master M2  it will give indication of exclusive access failure during the exclusive write transaction and memory is dose not get updated by M1. 
What happened in above scenario is that Slave has reserved some memory resource for M1 virtually by given exclusive read request from master. When master comes for write transaction for that memory location slave will allow to write that memory resource if and only if another master device is not using that memory resource other wise data is not written to memory resource. 
This way we can avoid memory overwrite problem for shared memory using EXCLUSIVE Access in AXI.


Hope you got my view point in advantage of using AXI exclusive access.  Correct me if I am wrong at some place in my answer.

No comments:

Post a Comment