how to convert for loop with non-static bound into a synthes

S

Shantanu

Guest
Hi,

I have the following code which has to be converted into a
synthesizable code
------------------------------------------------------------------------------------------------------------------------
for(cIdx = (num_ref_idx_l0_active_minus1 + 1); cIdx > refIdxL0;
cIdx=cIdx -1) begin

RefPicList0[cIdx] <= RefPicList0[cIdx - 1];
end

here both num_ref_idx_l0_active_minus1 &
refIdxL0 are variable
------------------------------------------------------------------------------------------------------------------------

can anybody help me?
 
On May 14, 11:02 am, Shantanu <shaan.gu...@gmail.com> wrote:
Hi,

I have the following code which has to be converted into a
synthesizable code
--------------------------------------------------------------------------- ---------------------------------------------
for(cIdx = (num_ref_idx_l0_active_minus1 + 1); cIdx > refIdxL0;
cIdx=cIdx -1) begin

                         RefPicList0[cIdx] <= RefPicList0[cIdx - 1];
end

                      here both num_ref_idx_l0_active_minus1 &
refIdxL0 are variable
--------------------------------------------------------------------------- ---------------------------------------------

can anybody help me?
Just make the loop bounds be static form max to min values and then
put a conditional inside on the assignment. Like this...

for (cIdx = max_possible_value; cIdx >= 0; cIdx = cIdx-1)
if (cIdx <= num_ref_idx_10_active_minus1+1 && cIdx > refIdxL0)
efPicList0[cIdx] <= RefPicList0[cIdx - 1];
 

Welcome to EDABoard.com

Sponsor

Back
Top