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

Unable to enforce a carried constraint (II=1)

Hi,

I am trying to pipe line my loop and it is giving me following warning

 

WARNING: [SCHED 204-68] Unable to enforce a carried constraint (II = 1)
between 'fadd' operation ('babay_rho', guess_babay.cpp:62) and 'fadd' operation ('babay_rho', guess_babay.cpp:62).

The code of the loope is shown below and line refering to this warning is highlighed red. it is a simple add operation on floating numbers. Can somebody tell me how to achieve (II=1)

 

roh_babay_row:for (int row=0; row < 3*Nh ; row++) 
{
temp_value=0.0f;

roh_babay_col:for (int col=0; col <= 3*Nh ; col++){

if (col<=row){
temp_value+=V_Gen(row,col)*U_babay[col];
}

}

temp_value=U_unc_kk[row]-temp_value;
temp_value=temp_value*temp_value;
babay_rho=babay_rho+temp_value;


};

 

The loop which I am trying to pipe line is roh_babay_roh (outer loop)

0 Kudos
2 Replies
xilinxacct
Professor
Professor
530 Views
Registered: ‎10-23-2018

@ans.khalid 

Give this a read ... https://www.xilinx.com/support/answers/62859.html

If that doesn't do it, sometimes you may have to settle for 2

Hope that Helps
If so, Please mark as solution accepted. Kudos also welcomed. :-)

ans.khalid
Observer
Observer
473 Views
Registered: ‎03-12-2019

@xilinxacct 

Hey I read that and followed the technique but still I am not able to achieve lower II.

Strictly speaking My code is not  a simple accumaltor, rather it involves multiplication (matrix) and then addition.

Here is the piece of original code

unconstrained_row:for (int row=0 ; row < 3*Nh ; row++){ 

unconstrained[row]=0;
unconstrained_col:for (int col=0 ; col < 3*Nh ; col++){

#pragma HLS PIPELINE

unconstrained[row]+= -V_Mul_H_Inv(row,col)*theta_kk[col];
}

}

and this is the modified one based on the technique mentioned in XAP5999

unconstrained_row:for (int row=0 ; row < 3*Nh ; row++){ 

unconstrained[row]=0;
unconstrained_col:for (int col=0 ; col < 3*Nh ; col=col+4){

#pragma HLS PIPELINE

acc_part:for (int col_s=0;col_s<4;col_s++){

accu[col_s]+=-V_Mul_H_Inv(row,col+col_s)*theta_kk[col+col_s];
}
}

accu_uncos:for(int i=0;i<4;i++)
{

#pragma HLS UNROLL
accu_value+=accu[i];
accu[i]=0.0f;
}

unconstrained[row]=accu_value;
accu_value=0.0f;

}

 

(Nh=4 , V_Mul_H_Inv is a single dimenional array, function like macro is used to access its elements)

 

I have checked my C simulation results are okay. But again I am not abale to acheive II=4 ,

Now same warning is coming but for accumulation part, warning is shown below

 

WARNING: [SCHED 204-68] Unable to enforce a carried constraint (II = 1)
between 'fadd' operation ('accu[3]', unconstrained.cpp:101) and 'fadd' operation ('accu[3]', unconstrained.cpp:101).
WARNING: [SCHED 204-68] Unable to enforce a carried constraint (II = 2)
between 'fadd' operation ('accu[3]', unconstrained.cpp:101) and 'fadd' operation ('accu[3]', unconstrained.cpp:101).
WARNING: [SCHED 204-68] Unable to enforce a carried constraint (II = 3)
between 'fadd' operation ('accu[3]', unconstrained.cpp:101) and 'fadd' operation ('accu[3]', unconstrained.cpp:101).
INFO: [SCHED 204-61] Pipelining result : Target II = 1, Final II = 4, Depth = 11.

Can you please have a look and let me know what I am missing here.

0 Kudos