This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

WRAP CALCULATION in AHB LITE

Hi There,

I have small doubts in wrap calculation

for suppose I have start address 0x04 and HSIZE = 0(one byte) and HBURST = 2(4 beat wrapping burst)

for suppose I have start address 0x38 and HSIZE = 1(two byte) and HBURST = 2(4 beat wrapping burst)

can any one help me to calculate the wrap for above number with detailed calculations

Parents
  • WRAP bursts transfer data within an HSIZE and burst length aligned range.

    So taking your first example, with HSIZE=byte and length 4, we are looking at a 4 byte aligned range. As the start address of the burst (0x04) is already 4 byte aligned, there will be no wrap point, so the burst will simply access 0x04, 0x05, 0x06 and 0x07.

    Similarly with your second example, HSIZE is 2 bytes and length is 4, so an 8 byte aligned range. With the start address 0x38 being 8 byte aligned we again don't have any wrapping, so the burst will be to 0x38, 0x3A, 0x3C and 0x3E.

    If this second burst had started at 0x3A, then you would have had transfers after this to 0x3C, 0x3E and wrapping back to 0x38 to finish the burst.

    I'm not sure what detailed calculations you are looking for, but the above is how I work it out.

Reply
  • WRAP bursts transfer data within an HSIZE and burst length aligned range.

    So taking your first example, with HSIZE=byte and length 4, we are looking at a 4 byte aligned range. As the start address of the burst (0x04) is already 4 byte aligned, there will be no wrap point, so the burst will simply access 0x04, 0x05, 0x06 and 0x07.

    Similarly with your second example, HSIZE is 2 bytes and length is 4, so an 8 byte aligned range. With the start address 0x38 being 8 byte aligned we again don't have any wrapping, so the burst will be to 0x38, 0x3A, 0x3C and 0x3E.

    If this second burst had started at 0x3A, then you would have had transfers after this to 0x3C, 0x3E and wrapping back to 0x38 to finish the burst.

    I'm not sure what detailed calculations you are looking for, but the above is how I work it out.

Children