Altera_Forum
Honored Contributor
13 years agoFor loop
hello I want to check an array. which one is quicker? using for loop or using a counter that counts up at the "posedge" of the clock. thanks
think in terms of hardware.
The first option is trying to search an array in a single clock cycle. This would be impossible/impractiacle in a real circuit. the 2nd option is more realistic, but will take n clocks to search the array, depending on how big the array is. You are clearly not thinking in terms of hardware. Stop thinking this is like software.