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

AHB WRAP address boundaries

Note: This was originally posted on 18th June 2008 at http://forums.arm.com

AMBA spec (v2.0) only shows how the addresses wrap when hsize = 2 (word). Is it because the address boundary remains the same for each WRAP4, WRAP8, and WRAP16 cases? Or, should I re-calculate the wrap boundary based on hsize?

For example, I know from the spec that hsize = 2 and WRAP4 will sequence through addresses like this:
0x4 - 0x8 - 0xC - 0x0

Then, does hsize = 1 (halfword) and WRAP4, mean the sequence should be
0x4 - 0x6 - 0x8 - 0xA    (using 4 word boundary)
or
0x4 - 0x6 - 0x0 - 0x2     (using 4 halfword boundary)?

Thanks!
Parents
  • Note: This was originally posted on 18th June 2008 at http://forums.arm.com

    Hi
         Wrap boundary depends on both Hsize and the No of beats(4 ,8,16).
          As per the Spec"[color="#0000FF"]For wrapping bursts, if the start address of the transfer is not aligned to the total
    number of bytes in the burst (size x beats) then the address of the transfers in the
    burst will wrap when the boundary is reached[/color]".

        Let me take the same scenario which u had analysed.
      [color="#0000FF"] Case1:  Start Address is 0x4,Wrap4,Hsize is 2.[/color]                 0000   0100 - beat1 - 0x4
                     0000   1000 - beat2 - 0x8
                     0000   1100 - beat3 - 0xc
                     0000   0000 - beat4 - 0x0
               Here as Hsize is 2,it means 4bytes are to be transfered.
               As it is Wrap4 no of beats are 4.
               Total no of bytes is 16(beats*Hsize in bytes).
               Therefore 4bit alignment is to be done.
               In beat3 the address is  0000 1100.Now as Hsize is 2,address shld be incremented by 4.
                                          0000 1100
                                        +0000 0100
                                        -------------------------
                                          0001 0000 --->it is crossing the address boundary(4 bits).

            So we are aligning it to 0000 0000.-beat4
                                     
        [color="#0000FF"] Case2:  Start Address is 0x4,Wrap4,Hsize is 1.[/color]               
                     0000   0100 - beat1 - 0x4
                     0000   0110 - beat2 - 0x6
                     0000   0000 - beat3 - 0x0
                     0000   0010 - beat4 - 0x2
               Here as Hsize is 1,it means 2bytes are to be transfered.
               As it is Wrap4 no of beats are 4.
               Total no of bytes is 8(beats*Hsize in bytes).
               Therefore 3bit alignment is to be done.
               In beat2 the address is  0000 0110.Now as Hsize is 1,address shld be incremented by 2.
                                          0000 0110
                                        +0000 0010
                                        -------------------------
                                          0000 1000 --->it is crossing the address boundary(3 bits).

            So we are aligning it to 0000 0000.-beat3

        [color="#0000FF"]Case3:  Start Address is 0x4,Wrap8,Hsize is 1.[/color]
                     0000   0100 - beat1 - 0x4
                     0000   0110 - beat2 - 0x6
                     0000   1000 - beat3 - 0x8
                     0000   1010 - beat4 - 0xa
                     0000   1100 - beat5 - 0xc
                     0000   1110 - beat6 - 0xe
                     0000   0000 - beat7 - 0x0
                     0000   0010 - beat8 - 0x2

             Here as Hsize is 1,it means 2bytes are to be transfered.
               As it is Wrap8 no of beats are 8.
               Total no of bytes is 16(beats*Hsize in bytes).
               Therefore 4bit alignment is to be done.
               In beat6 the address is  0000 1110.Now as Hsize is 1,address shld be incremented by 2.
                                          0000 1110
                                        +0000 0010
                                        -------------------------
                                          0001 0000 --->it is crossing the address boundary(4 bits).

            So we are aligning it to 0000 0000.-beat7 .


    So the wrapping of the address depends on both Hsize and the no of beats.      


                           



    AMBA spec (v2.0) only shows how the addresses wrap when hsize = 2 (word). Is it because the address boundary remains the same for each WRAP4, WRAP8, and WRAP16 cases? Or, should I re-calculate the wrap boundary based on hsize?

    For example, I know from the spec that hsize = 2 and WRAP4 will sequence through addresses like this:
    0x4 - 0x8 - 0xC - 0x0

    Then, does hsize = 1 (halfword) and WRAP4, mean the sequence should be
    0x4 - 0x6 - 0x8 - 0xA    (using 4 word boundary)
    or
    0x4 - 0x6 - 0x0 - 0x2     (using 4 halfword boundary)?

    Thanks!
Reply
  • Note: This was originally posted on 18th June 2008 at http://forums.arm.com

    Hi
         Wrap boundary depends on both Hsize and the No of beats(4 ,8,16).
          As per the Spec"[color="#0000FF"]For wrapping bursts, if the start address of the transfer is not aligned to the total
    number of bytes in the burst (size x beats) then the address of the transfers in the
    burst will wrap when the boundary is reached[/color]".

        Let me take the same scenario which u had analysed.
      [color="#0000FF"] Case1:  Start Address is 0x4,Wrap4,Hsize is 2.[/color]                 0000   0100 - beat1 - 0x4
                     0000   1000 - beat2 - 0x8
                     0000   1100 - beat3 - 0xc
                     0000   0000 - beat4 - 0x0
               Here as Hsize is 2,it means 4bytes are to be transfered.
               As it is Wrap4 no of beats are 4.
               Total no of bytes is 16(beats*Hsize in bytes).
               Therefore 4bit alignment is to be done.
               In beat3 the address is  0000 1100.Now as Hsize is 2,address shld be incremented by 4.
                                          0000 1100
                                        +0000 0100
                                        -------------------------
                                          0001 0000 --->it is crossing the address boundary(4 bits).

            So we are aligning it to 0000 0000.-beat4
                                     
        [color="#0000FF"] Case2:  Start Address is 0x4,Wrap4,Hsize is 1.[/color]               
                     0000   0100 - beat1 - 0x4
                     0000   0110 - beat2 - 0x6
                     0000   0000 - beat3 - 0x0
                     0000   0010 - beat4 - 0x2
               Here as Hsize is 1,it means 2bytes are to be transfered.
               As it is Wrap4 no of beats are 4.
               Total no of bytes is 8(beats*Hsize in bytes).
               Therefore 3bit alignment is to be done.
               In beat2 the address is  0000 0110.Now as Hsize is 1,address shld be incremented by 2.
                                          0000 0110
                                        +0000 0010
                                        -------------------------
                                          0000 1000 --->it is crossing the address boundary(3 bits).

            So we are aligning it to 0000 0000.-beat3

        [color="#0000FF"]Case3:  Start Address is 0x4,Wrap8,Hsize is 1.[/color]
                     0000   0100 - beat1 - 0x4
                     0000   0110 - beat2 - 0x6
                     0000   1000 - beat3 - 0x8
                     0000   1010 - beat4 - 0xa
                     0000   1100 - beat5 - 0xc
                     0000   1110 - beat6 - 0xe
                     0000   0000 - beat7 - 0x0
                     0000   0010 - beat8 - 0x2

             Here as Hsize is 1,it means 2bytes are to be transfered.
               As it is Wrap8 no of beats are 8.
               Total no of bytes is 16(beats*Hsize in bytes).
               Therefore 4bit alignment is to be done.
               In beat6 the address is  0000 1110.Now as Hsize is 1,address shld be incremented by 2.
                                          0000 1110
                                        +0000 0010
                                        -------------------------
                                          0001 0000 --->it is crossing the address boundary(4 bits).

            So we are aligning it to 0000 0000.-beat7 .


    So the wrapping of the address depends on both Hsize and the no of beats.      


                           



    AMBA spec (v2.0) only shows how the addresses wrap when hsize = 2 (word). Is it because the address boundary remains the same for each WRAP4, WRAP8, and WRAP16 cases? Or, should I re-calculate the wrap boundary based on hsize?

    For example, I know from the spec that hsize = 2 and WRAP4 will sequence through addresses like this:
    0x4 - 0x8 - 0xC - 0x0

    Then, does hsize = 1 (halfword) and WRAP4, mean the sequence should be
    0x4 - 0x6 - 0x8 - 0xA    (using 4 word boundary)
    or
    0x4 - 0x6 - 0x0 - 0x2     (using 4 halfword boundary)?

    Thanks!
Children
No data