Altera_Forum
Honored Contributor
17 years agowait statement inside process
Hi all,
I faced some problem when I trying to compile my following code. The error replied was only one wait statement is allowed in the process. I have tried putting IF statement but it took 10,000 iterations. May I know how can i change my code? Main : process variable counter : counter_type := 0; begin -- HWY green, SRD red wait on (CLOCK until CLOCK = '1' and SRDcar = '1'); if (HWYcar = '1') then Counter := 0; loop wait until CLOCK = '1'; exit when (HWYcar = '0' or Counter = long_cycle); Counter := Counter + 1; end loop; end if ; Thank you so much