cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
548 Views
Registered: ‎07-08-2019

How to specify datawidth for pointer interface

Jump to solution

I am now using HLS to implement some design. For a module/function, which has a pointer interface(for example, int * Out), however, I want this interface can be access (write multiple data through this interface in one clock) in parallel. Since data connected with this interface is a 2d memory, in which each row is supposed to be access in parallel, what #pragma I should add to make the pointer interface be able to be written in parallel?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
519 Views
Registered: ‎05-27-2018

Hi @julien-niu ,

   Refer to Ug902 V2019.1. The SSR FFT liberay perfroms quite a good example for your question.

   As the total sample of the FFT output is L and the  number of samples processed in parallel per cycle is R. They created a 2D array and specify the input and output interface as FIFO.

I_TYPE inD[R][L/R];
O_TYPE outD[R][L/R];

  For the first dimension, it uses pragmas for data packing, partitioning and reshaping to create a single wide stream.  It uses the HLS STREAM pragma for the second dimension. The read and write on SSR FFT I/O arrays can be performed as follows:

  The Loop unroll directive can be applyed to the inner loop to ensure all the [R] data be accessed in a single clock cycle.

 

for( int t=0;t<L/R;t++)
{
    for (int r=0; r <R : r++)
    {
    inD[r][t] = …… ;
    }
}

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
Highlighted
Moderator
Moderator
520 Views
Registered: ‎05-27-2018

Hi @julien-niu ,

   Refer to Ug902 V2019.1. The SSR FFT liberay perfroms quite a good example for your question.

   As the total sample of the FFT output is L and the  number of samples processed in parallel per cycle is R. They created a 2D array and specify the input and output interface as FIFO.

I_TYPE inD[R][L/R];
O_TYPE outD[R][L/R];

  For the first dimension, it uses pragmas for data packing, partitioning and reshaping to create a single wide stream.  It uses the HLS STREAM pragma for the second dimension. The read and write on SSR FFT I/O arrays can be performed as follows:

  The Loop unroll directive can be applyed to the inner loop to ensure all the [R] data be accessed in a single clock cycle.

 

for( int t=0;t<L/R;t++)
{
    for (int r=0; r <R : r++)
    {
    inD[r][t] = …… ;
    }
}

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------

View solution in original post

Highlighted
Moderator
Moderator
481 Views
Registered: ‎11-21-2018

Hi @julien-niu 

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply)

 

If this is not solved/answered, please reply in the topic giving more information on your current status.

 

Thanks and Regards,

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