Forum Discussion
Altera_Forum
Honored Contributor
14 years agoFor loop-VHDL
How do i write for i= 0:63 :360 (matlab code) in VHDL .searched for long about for loops but couldn't see any instance of the above form. Is defining an array and writing "for in A"the only way??
Altera_Forum
Honored Contributor
14 years agoin VHDL, the loop variable is an integer if you use a for loop:
for i in 0 to 63 loop
end loop;
will loop 64 times. for a while loop, you can do whatever you want:
variable i : real : 0.0;
while i < 1.0 loop
....
i := i + 0.001;
end loop;