Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Simple testbench_for_loop - Question

Hi,

I am using a simple test bench, as attached.

Please refer to the for loop portion of the test bench, When I run a simulation using this test bench, I except the

address to run till 1250 and then stop..but the address keeps on incrementing even after 1250..

How do I write the for loop in testbench, to make the address count from 0 to 1250, and once reaching 1250..it should reset and count again.

Please advice.

Thanks,

Manoj

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    because after the loop, the process resets and does the loop again. incrementing the address forever

    You need a wait after the loop.