You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while(n < fpblk_sz(DIM))
{
//looking for 0's in a unary substring INNER LOOP IN ZFPif(state&FOUND_1)
{
if(state&FIRST_0) //account for the first 1 seen in the unary substring using the "bits" state variable.
{state=S2;if(n < fpblk_sz(DIM))bits--;}
if(n < fpblk_sz(DIM) - 1 && !(state&FOUND_0S)) //Find length of '0's substring. terminate (go->S3) if a '1' is found.
{
if((!bits) || (!bits--)) //if bits cannot still be decoded..
{x[n]=true; state=S3;} //tally the last bit positively identified and terminate (go->S3).else//however if bits can still be decoded...
{
if(stream_window[bitoff++]) //check if '0' is in the current string position
{x[n]=true; state=S3;} //a 1 was found, signifying end of substring (go->S3)
}
n++; //consider next bit in the plane to be decoded
}
//accounts for the case when no more 0's could possibly fit in the main string, but substring not explicitly terminated.if((n==fpblk_sz(DIM)-1) || (state&FOUND_0S))
{
if((n >= fpblk_sz(DIM)-1) && !(state&FOUND_0S))
{x[n]=true; n++;} //force substring end
state=S3; //force substring termination (go->S3)
}
}
//looking for 1's in a unary substring. OUTER LOOP IN ZFPif(!(state&FOUND_1))
{
if(!bits || (n>=fpblk_sz(DIM))) //nothing left to search through...break; //exit the unary decoder state machine.//account for n = size case? what should happen is that n gets incremented to size and you break here before doing the stuff below.if(stream_window[bitoff++]) //A unary substring was found, next find all '0''s after this '1' in the string.
state=S1;
elsebreak; //stop looking for valid unary strings. This is the same as going to S0.
}
}
Loop 3
(An alternative to this might be an explicit priority decoder.)
ui_t e = 0;
while (rn >> (e + 1))
e++;
However, these loops might be transformed/rewritten if a constant bound is known, with the following form:
int i;
for(i = 0; i < BOUND; i++) {
if(original_terminate_condition) break;
else {
// original_loop_body; potentially with breaks;// increment_to_loop_variable;
}
}
There are several places where the generated loops are unbounded according to Vivado, listed as follows, although they might be bounded.
Loop 1
Loop 2
Loop 3
(An alternative to this might be an explicit priority decoder.)
However, these loops might be transformed/rewritten if a constant bound is known, with the following form:
#329
The text was updated successfully, but these errors were encountered: