cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
e_ensafi
Explorer
Explorer
121 Views
Registered: ‎08-13-2020

Advancing Asynchronous Windows an Arbitrary Amount

Jump to solution

Let's say I have an AIE kernel with an asynchronous window of size 9 * sizeof(int16) = 18 bytes, reading data for 5 iterations from a PL data mover such that the total amount of data read is 90 bytes.  The smallest supported ap_axis is 32 bits for an HLS kernel connected to an AIE graph, so in 32-bit or 4-byte increments, the PL kernel will feed the AIE tile 92 bytes.  Is there any way to consume and discard those extra 2 bytes in my AIE kernel such that the next window_acquire() will give me with a full 18 byte window containing 9 * int16 new values? 

Basically, I am looking for:

void my_kernel(input_window<int16>* in)
{
  for (i = 0; i < 5; ++i)
  {
    window_acquire(in); // 18 bytes ready
    // Process "in" using window_readincr() 9 times
    window_release(in);
  }

  // Now we need to deal with 2 extra bytes, and then we want
  // the next window_acquire() to give us a full 18 byte window
  // of new data, as if those previous 2 bytes never existed.
}

 

Tags (3)
0 Kudos
Reply
1 Solution

Accepted Solutions
florentw
Moderator
Moderator
80 Views
Registered: ‎11-09-2015

HI @e_ensafi 

No I do not believe this is possible with the current architecture. The DMA will completely fill the memory buffer with the size it was set.

The options that you have:

  • Consume the window over 2 iterations (do not use the last window_release in the kernel and do not do window_acquire in the next iteration)
  • Add padding from the PL to fill the window which contains the 2 extra bytes)

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

1 Reply
florentw
Moderator
Moderator
81 Views
Registered: ‎11-09-2015

HI @e_ensafi 

No I do not believe this is possible with the current architecture. The DMA will completely fill the memory buffer with the size it was set.

The options that you have:

  • Consume the window over 2 iterations (do not use the last window_release in the kernel and do not do window_acquire in the next iteration)
  • Add padding from the PL to fill the window which contains the 2 extra bytes)

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post