Process |
LRM §9.2. |
A process statement defines an independent sequential process representing the behavior of some portion of the design.
[ label: ] [ postponed ] process [ ( sensitivity_list ) ] [ is ] process_declarations begin sequential_statements end [ postponed ] process [ label ] ;
The process statement represents the behavior of some portion of the design. It consists of the sequential statements whose execution is made in order defined by the user.
The process declarative part defines items that are only visible within that process. The declarative part may contain declarations of: subprograms, types, subtypes, constants, variables, files, aliases, attributes, use clauses and group declarations. It is not allowed to declare signals or shared variables inside processes.
A process is a loop in which the statements are executed from top to bottom. After the last statement is executed, execution will continue with the first statement. The loop can be suspended and resumed with wait statements. When the next statement to be executed is a wait statement, the process suspends its execution until the wait condition is met.
The sensitivity list is optional and contains a list of signals to which the process is sensitive. A change of a value of one of these signals causes the suspended process to resume. A sensitivity list is equivalent to wait on sensitivity_list at the end of the process.
A postponed process runs when all other processes have completed, at the end of a simulation. Their main use is to perform timing or functional checks, based on the 'steady-state' values of signals.
Counter: process (Clk, Reset) variable Increment: integer := 1; begin if Reset = '0' then Q <= (others => '0'); elsif rising_edge(Clk) then if Count = '1' then Q <= Q + Increment; end if; end if; end process;
Concurrent statement, Sequential statement, Sensitivity list, Wait