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

AXI4 Narrow and possibly unaligned READ

Hi.

I have a 16-byte AXI4 data bus.

I want to read 3 bytes, and there's a limitation to only use INCR burst. 

I know that AXI only supports 1,2,4,8, etc byte-size bursts, but I have another module to receive the data from AXI and extract only the desired 3 bytes.

Length 0 (1 beat) is enough obviously.

Let's say the read address is 0x4a7a.

My question is, what is the correct ARSIZE for this read request?

I originally thought that SIZE = 0x2 (4 bytes) is the answer, exemplified below:

this Access is not aligned.

0xF 0xE 0xD 0xC 0xB 0xA 0x9 0x8 0x7 0x6 0x5 0x4 0x3 0x2 0x1 0x0
V V V V

But I guess that SIZE = 0x3 (8 bytes) is also possible:

0xF 0xE 0xD 0xC 0xB 0xA 0x9 0x8 0x7 0x6 0x5 0x4 0x3 0x2 0x1 0x0
V V V V V V

this Access is not aligned as well

Is there one better than the other? is one of them illegal?

Thanks

Parents
  • After further reading, I think that the first transaction, although legal, will not return the expected data. 

    So a ARSIZE 4 access to Address 0xA, will actually read only 2 bytes, from addresses 0xA and 0xB

    0xF 0xE 0xD 0xC 0xB 0xA 0x9 0x8 0x7 0x6 0x5 0x4 0x3 0x2 0x1 0x0
    DATA DATA

    This is because, as I understood, the first beat of an unaligned transfer will only access the number of bytes it can until it reaches its natural size boundary. In this case, it is up to (and not including) 0xC. 

    In some cases the device might provide the data for 0x8 and 0x9 as well, since those are part of the aligned line that is being read.

    I would appreciate if someone can comment on the correctness or incorrectness of this explanation..

Reply
  • After further reading, I think that the first transaction, although legal, will not return the expected data. 

    So a ARSIZE 4 access to Address 0xA, will actually read only 2 bytes, from addresses 0xA and 0xB

    0xF 0xE 0xD 0xC 0xB 0xA 0x9 0x8 0x7 0x6 0x5 0x4 0x3 0x2 0x1 0x0
    DATA DATA

    This is because, as I understood, the first beat of an unaligned transfer will only access the number of bytes it can until it reaches its natural size boundary. In this case, it is up to (and not including) 0xC. 

    In some cases the device might provide the data for 0x8 and 0x9 as well, since those are part of the aligned line that is being read.

    I would appreciate if someone can comment on the correctness or incorrectness of this explanation..

Children