cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
quantum
Visitor
Visitor
991 Views
Registered: ‎03-27-2019

How to achieve II = 1 by partitioning?

Jump to solution

It is a function of a layer of convolution, I use array_partition directives and analyze the "input" array has enough ports to read, but the result can't achieve II = 1.

#include"data.h"

void deconv_input( MI_IMG_TYPE input[2][36][36], MI_IMG_TYPE slide[2][6][6], int row, int col) {
#pragma HLS array_partition variable=slide complete dim=0

#pragma HLS array_partition variable=input complete dim=1
#pragma HLS array_partition variable=input cyclic factor=6 dim=2
#pragma HLS array_partition variable=input cyclic factor=6 dim=3

input_loop:
for(int i = 0; i < 2; ++i){
   #pragma HLS unroll
    for(int u = 0; u < 6; ++u){
       #pragma HLS unroll
       for(int r = 0; r < 6; ++r){
           #pragma HLS unroll
           slide[i][u][r] = input[i][row+u][col+r];
        }
    }
}

 

Thx!

}

0 Kudos
1 Solution

Accepted Solutions
nupurs
Moderator
Moderator
925 Views
Registered: ‎06-24-2015

@quantum 

 

You need not apply UNROLL so many times, you can just try with PIPELINE.

Are you getting II=2?

 

Thanks,
Nupur
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (click on the 'thumbs-up' button).

View solution in original post

2 Replies
nupurs
Moderator
Moderator
926 Views
Registered: ‎06-24-2015

@quantum 

 

You need not apply UNROLL so many times, you can just try with PIPELINE.

Are you getting II=2?

 

Thanks,
Nupur
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (click on the 'thumbs-up' button).

View solution in original post

u4223374
Advisor
Advisor
896 Views
Registered: ‎04-26-2015

To add to what @nupurs  has said - if HLS is actually trying to achieve II=1 (it isn't at the moment because there's no pipeline pragma) and failing, it'll tell you why that is. The reason is almost always data dependency or limited ports. Re-run synthesis and tell us what reason HLS gives for not meeting II=1.

0 Kudos