UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ans.khalid
Observer
334 Views
Registered: ‎03-12-2019

Unable to enforce a carried dependence constraint between 'load' and 'store' operation

Hi,

I am trying to pipe line a function, but I am not able to satisfy pipeline directive.

Console log is shown below

 

INFO: [SCHED 204-11] Starting scheduling ...
INFO: [SCHED 204-61] Pipelining function 'sph_dec'.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 1, distance = 1, offset = 1)
between 'load' operation ('U_load', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 2, distance = 1, offset = 1)
between 'load' operation ('U_load_2', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 3, distance = 1, offset = 1)
between 'load' operation ('U_load_2', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 4, distance = 1, offset = 1)
between 'load' operation ('U_load_2', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 130, distance = 1, offset = 1)
between 'load' operation ('U_load_13', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 193, distance = 1, offset = 1)
between 'load' operation ('U_load_25', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 225, distance = 1, offset = 1)
between 'load' operation ('U_load_25', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 241, distance = 1, offset = 1)
between 'load' operation ('U_load_37', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 249, distance = 1, offset = 1)
between 'load' operation ('U_load_37', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 253, distance = 1, offset = 1)
between 'load' operation ('U_load_37', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 255, distance = 1, offset = 1)
between 'load' operation ('U_load_37', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
WARNING: [SCHED 204-68] The II Violation in module 'sph_dec': Unable to enforce a carried dependence constraint (II = 256, distance = 1, offset = 1)
between 'load' operation ('U_load_37', sph_dec.cpp:58) on array 'U', sph_dec.cpp:25 and 'store' operation (sph_dec.cpp:51) of variable 'switch_point_load_3_s', sph_dec.cpp:51 on array 'U', sph_dec.cpp:25.
INFO: [SCHED 204-61] Unable to satisfy pipeline directive: Unable to pipeline the region.

I cant seem to understand what is the problem.

Code of my function is written below. The code is written to solve shpere decoder problem

#include <stdio.h>
#include <math.h>
#include <string.h>
#include "pred_controller.h"

void sph_dec (float V_Gen_a[9*Nh*Nh],float roh, float U_unc[3*Nh], float U_opt[3*Nh]){

 


// Initialize variables
bool solution_found = false; // termination of while loop
int level = 0; // current level of tree-search
float dist_array[Nh*3] = {0.0f}; // accumulated costs
float dist_temp = 0; // temporary costs for current step
float dist_matmul = 0;


int switch_point[Nh*3];
int U[Nh*3];
int sol[Nh*3];


int ii,jj,kk,ll; // loop counter
int i=0;

init:for (ll = 0; ll < 3*Nh; ++ll)
{
switch_point[ll] = -1;
}


sphdec: for (int i=0;i< 35; i++)
{


U[level] = switch_point[level];
dist_matmul = 0; // reset value
dist_matmul:for (ii = 0; ii<12; ii++)
{
if (ii<=level){

//dist_matmul += V_gen[level][ii]*U[ii];
if (U[ii]== 1) {dist_matmul += V_Gen(level,ii);}
else if (U[ii]==-1){dist_matmul -= V_Gen(level,ii);}
}

}
float dist_temp_temp=U_unc[level]-dist_matmul;

dist_temp = dist_temp_temp*dist_temp_temp+dist_array[level];

// depth first search
if (dist_temp <= roh + 1e-6) { //distance smaller than current radius?
if (level == 3*Nh-1)
{
//Copy array U_opt = U;
U_opt:for (jj = 0; jj < 3*Nh; ++jj)
{
U_opt[jj]= U[jj];

}
roh = dist_temp;
switch_point[3*Nh-1] +=1;
}
else
{
level += 1;
dist_array[level] = dist_temp;
}
} else switch_point[level] +=1;

// Backtracking
Backtracking:for (kk = 3*Nh-1; kk > 0; --kk)
{
if (switch_point[kk]>1) {
switch_point[kk] = -1;
level = kk-1;
switch_point[level] += 1;
}
}

// Check if full tree is searched
if (switch_point[0]>1) {
solution_found = true;
}
}

}

 

0 Kudos
1 Reply
Scholar u4223374
Scholar
301 Views
Registered: ‎04-26-2015

Re: Unable to enforce a carried dependence constraint between 'load' and 'store' operation

What pragmas/directives have you got applied?

 

It looks like you've asked HLS to pipeline this function, which means it'll unroll all internal loops. There's a very large amount of processing happening here (over 400 loop iterations) which will be very difficult to pipeline. As each iteration accesses the U array (among others), to unroll properly that array is going to have to be fully partitioned. That alone should fix the dependence constraint (fully partitioned arrays don't have dependence problems), but I suspect HLS will still have trouble pipelining your loop.