You are on page 1of 5

Presented by

M S Sai Kamesh

AXI WRAP CALCULATION

1 CONFIDENTIAL
WRAP Calculation

⮚ A wrap burst is similar to INCR burst. In WRAP the address will be incremented based the size, but on
reaching the upper address limit address will wrap to lower address.

⮚ From the above statement, we could see that there are two considerations during WRAP address calculation.

⮚ The start address must be aligned to the size of each transfer

⮚ The length of the burst must be 2, 4, 8, or 16 transfers


Equations for WRA Address Calculation

Below equations are used for WRAP address calculation,

● Lower address to WRAP to

Wrap_Boundary = (INT(Start_Address/(Number_Bytes×Burst_Length)))×(Number_Bytes×Burst_Length)

● Upper address limit to make WRAP

Address_N = Wrap_Boundary + (Number_Bytes × Burst_Length)


2 CONFIDENTIAL
Start_Address = 0x04, Burst_Length
WRAP Address calculation examples = 4, Number_Bytes = 4

Wrap_Boundary
WRAP Example-1 = (INT(Start_Address/(Number_Bytes×Burst_Length)))×(Number_Bytes×Burst_Length)

= (0x04/(4×4))
AxADDR = 0x04,xAxLEN
(4×4) = 3,= AxSIZE
0 = 2, AxBURST = 3

Address_N = Wrap_Boundary + (Number_Bytes × Burst_Length)

= 0 + (4 x 4) = 16

As Burst_Length is 4, Burst consists of 4 Address,

Condition, If the Address_n == 16, Address_n = wrap_boundary = 0

Address_0 = 4

Address_1 = Address_0 + Number_Bytes = 4 + 4 = 8

Address_2 = Address_1 + Number_Bytes = 8 + 4 = 12

Address_3 = Address_2 + Number_Bytes = 12 + 4 = 16

As per condition, Address_3 == 16, so Address_3 = 0

Therefore, ADDRESSES are 4, 8, 12, 0.


3 CONFIDENTIAL
WRAP Example-2
Wrap_Boundary = (INT(Start_Address/(Number_Bytes×Burst_Length)))×(Number_Bytes×Burst_Length)
AxADDR = 0x38, AxLEN = 3, AxSIZE = 2, AxBURST = 3, Start_Address = 0x38, Burst_Length = 4, Number_Bytes = 4
= (0x38/(4×4)) x (4×4) = 0x30

Address_N = Wrap_Boundary + (Number_Bytes × Burst_Length)

= 0x30 + (4 x 4) = 0x40

As Burst_Length is 4, Burst consists of 4 Address,

Condition, If the Address_n == 0x34, Address_n = wrap_boundary = 0x30

Address_0 = 0x38

Address_1 = Address_0 + Number_Bytes = 0x38 + 0x4 = 0x3C

Address_2 = Address_1 + Number_Bytes = 0x3C + 0x4 = 0x40

As per condition, Address_2 == 0x40, so Address_2 = 0x30

Address_3 = Address_2 + Number_Bytes = 0x30 + 0x4 = 0x34

Therefore, ADDRESSES are 0x38, 0x3C, 0x30, 0x34.

4 CONFIDENTIAL
v

Thank You
By

5 CONFIDENTIAL

You might also like