FPGA Center



WAIT

"Wait" expression is used to suspend an operation or a process. A signal change or time period can be used as wait condition.

wait;
wait on signal_list;
wait until conditional_statement;
wait for time;

If a "wait" expression is encountered in the process, the following changes are waited as wait conditions:

NOTE:

EXAMPLE 1 :

wait until CLK'event and CLK='1';  
--Process resumes at rising edge of the CLK signal.

EXAMPLE 2 :

wait for 80 ns;      -- Operation is resumed after 80 ns.

EXAMPLE 3 :

BC : process
begin
  wait on E, F until CLK = '0';
  . . .
end process;

If any one of the E and F signals are changed when CLK is "0", operation resumes.

EXAMPLE 4 :

wait until En = '1';
--   loop
--   wait on En;
--   exit when En = '1';
--   end loop;

Operation is suspended untill "En" sigal becomes '1'. This operation is similar to expressions at next lines written as comments.

EXAMPLE 5:

signal S1, S2 : integer;
. . .
process
  begin
   . . .
   wait on S1, S2; 
-- Any one of the S2 and S1 signals are waited to be changed before Process ends.

end process;

EXAMPLE 5:

P: process
begin
   P0 <= '1' after 5 ns,
               '0' after 15 ns;
    P1<= '1' after 5 ns,
               '0' after 10 ns,
               '1' after 15 ns,
               '0' after 20 ns;
wait;
end process P;

After P0 and P1 signals take values of '11', '10', '01', and '00' at 5, 10, 15 ve 20 ns respectively, operation will be suspended forever.

 

                                                                                                           

    

                                                                                                                                    

 

                                                                                                                                                                                                                                                                   

Home | Fpga | VHDL | VHDL Dictionary | Digital Design | Simulation | PCB | Examples | Contact Us
Copyright © 2010 - 2013 FPGAcenter. All Rights Reserved.