avl_axi._utils module

avl_axi._utils.get_burst_addresses(base, length, size, burst)[source]

Calculate addresses for an AXI transaction.

Parameters:
  • base (int) – Starting address (ARADDR/AWADDR)

  • length (int) – ARLEN/AWLEN - number of transfers minus 1 (0-255)

  • size (int) – ARSIZE/AWSIZE - size of each transfer as power of 2 0=1 byte, 1=2 bytes, 2=4 bytes, 3=8 bytes, etc.

  • burst (int) – ARBURST/AWBURST - burst type 0=FIXED, 1=INCR, 2=WRAP

Returns:

List of addresses for all transfers in the transaction

Return type:

list

avl_axi._utils.get_burst_byte_count(strb, length, size, burst)[source]

Calculate total bytes transferred for an AXI burst.

Parameters:
  • strb (int) – Byte strobe width (number of valid bytes in a beat)

  • length (int) – Burst length (ARLEN/AWLEN) = number of beats - 1

  • size (int) – log2(bytes per beat)

  • burst (str) – “FIXED”, “INCR”, or “WRAP”

Returns:

Total number of bytes transferred

Return type:

int