Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Thank Kevin - what does the wait do? I never use those in RTL design coding - not sure what they're for, and Quartus often doesn't seem to like them. thanks! /j --- Quote End --- Wait all by itself will wait forever, the process will permanently suspend. There are several flavors of wait statements... wait; -- Unconditional, waits forever wait until xxx; -- xxx is a boolean condition, such as 'rising_edge(clk)' or 'abc = '1' wait for xxx; -- xxx is type time, such as 1 ns, 10 us A process with a wait statement cannot be used with a sensitivity list, the compiler will flag it as an error for you to fix. Waits are more typically used in testbenches than synthesizable designs, however the following two forms are generally recognized as equivalent
process(clk)
begin
if rising_edge(clk) then
b <= a;
end if;
end process;
process
begin
wait until rising_edge(clk);
b <= a;
end process;
Kevin Jennings