# AHB AXI WRAP Burst

A WRAP burst is similar to INCR burst. In WRAP the address will be incremented based the SiZE,

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

1. Upper address limit to make WRAP
2. Lower address to WRAP to

There are restrictions on WRAP bursts,

• 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

• Upper address limit to make WRAP

Address_N = Wrap_Boundary + (Number_Bytes × Burst_Length)

### WRAP Example-1

AxADDR = 0x04,  AxLEN = 3, AxSIZE = 2, AxBURST = 3

Burst_Length    = 4
Number_Bytes  = 4

= (0x04/(4×4)) x (4×4)
= 0

Address_N = Wrap_Boundary + (Number_Bytes × Burst_Length)
= 0 + (4 x 4)
= 16

As Burst_Length is 4, Burst consists of 4 Address,

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

### WRAP Example-2

AxADDR = 0x38,  AxLEN = 3, AxSIZE = 2, AxBURST = 3

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,

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

### WRAP Example-3

Lets consider an example,
AxADDR = 0x34,  AxLEN = 7, AxSIZE = 2, AxBURST = 3

Burst_Length  = 8
Number_Bytes  = 4

= (0x34/(4×8)) x (4×8)
= 0x20

Address_N = Wrap_Boundary + (Number_Bytes × Burst_Length)
= 0x20 + (4 x 8)
= 0x40

As Burst_Length is 4, Burst consists of 4 Address,