Forum Discussion
Altera_Forum
Honored Contributor
10 years agoArray indexing questions
Hi all, new user here, and new to verilog as well. I have some questions about indexing an array. Say I have a 16x8bit array. There will be an address input that points to which one of the 16 byte...
Altera_Forum
Honored Contributor
10 years agoRemember that in Verilog, all loops will be unrolled. What is being generated here is logic to set all array elements to 0 in one clock tick. Everything in the for loop body will get a separate hardware allocated for it. If that is what you must have, then fine, but keep in mind that a lot of logic will be used up to do this. The overhead in this example isn't too bad. It could be huge if you had lots of code in the loop body.