Forum Discussion
Altera_Forum
Honored Contributor
15 years agoLoop index overflow problem
Hi there, I've wrote a little VHDL program in Quartus II. I'd like to separate one big std_logic_vector into small fix-length std_logic_vectors and the compile told me that the index is out...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- The code does exactly what you have written. In the last iteration, it tries to decrement p_count from 7 to -1, although everything is finished. Instead of decrementing a variable, you may want to calculate the p_count value at the entry of each iteration. --- Quote End --- Hi, thx for reply, i don't really understand what is your suggestion means...you mean i have to unroll the iteration? and i think you'er right about the iteration , that after the "last" iteration (i=63), the i continue increasing to 64, like C language or any other program language, but with the entry constrain , the procedure in the iteration shouldn't be executed... i think i have to loose the constrain of the range of p_count to -1 to 8*8*i_width...