Altera_Forum
Honored Contributor
19 years agowhile loops in quartus
Hi there,
Just wondering if anyone out there could help. I wrote the following code in verilog r = r-1; while(r != 0) begin r = r-1; end When I simulate the code in Quartus (web edition) I get the following error: must use only constant expressions in terminating conditions. Fair enough. The problem however in my case is that r is a random number (its value is not known in advance) Can anyone please help me solve this problem. Thanks in advance