Monday 15 April 2019

Wrapping Burst in AXI

In this post, I am going to give some basic details of the AXI WRAP Burst and how to calculate the WRAP boundary. First of all, there are few rules that need to be considered for WRAP Burst, which is stated below.
1) The start address must be aligned to the size of each transfer or in other word, aligned to AxSIZE
2) The Burst length must be 2, 4, 8 or 16 transfers.

Let's understand using one example. Assume, Burst length = 4, Burst size = 1(2 Bytes Data bus width) and Start_Address is 0x24(Aligned to AxSIZE).

First of all, we need to calculate the WRAP boundary using the below equation.

Wrap_Boundary = (INT(Start_Address/(Number_Bytes*Burst_Length))) * (Number_Bytes*Burst_Length)
                           = (INT(36/(2*4))) * (2*4)
Wrap_Boundary = 0x20

In WRAP burst, during any write/read request address gets increment the same as the INCR burst. Now the question is when actual wrapping will take place? So, for a WRAP burst, if (Start_Address_N  == Wrap_Boundary + (Number_Bytes * Burst_Length)) then wrapping will occur i.e. Start_Address_N = Wrap_Boundary.

For the above example, write/read request address increments following way

Start_Address_0 = 0x24
Start_Address_1 = 0x26
Start_Address_2 = 0x20(Wrap_Boundary)  (Why?
Because Start_Address_2 = 0x28 satisfies the equation "Start_Address_N  == Wrap_Boundary + (Number_Bytes * Burst_Length)" and so, Start_Address_2 = 0x20(Wrap_Boundary).)
Start_Address_3 = 0x22

If you have any comments or feedback, please leave it in the comment box. Thank you for reading this blog.

1 comment: