Forum Discussion
Altera_Forum
Honored Contributor
13 years agoprocesses: while loop does not work, for loop does work. Why?
I want to write this code for a basic synchronous counter more efficiently... u_count: process(rst_i, clk_i) -- generated on rising edge variable i: integer :=1; begin if rst_i = '1' ...
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- I found that Quartus does synthesize the while iteration. The problem is a missing i:=1; before the while statement. --- Quote End --- so the variable cannot be initialized in the declaration as I did it "variable i: integer :=1;"
We should be able to do that so the compiler does have a problem. Simple solution though. Thank you!