Block

LRM §9.1.

The block statement is used to group together concurrent statements in an architecture.

Syntax:

block_label: block [ ( guard_condition ) ] [ is ] 
  [ generic; [ generic_map; ] ] 
  [ port; [ port_map; ] ] 
  [ block_declarations ] 
begin 
  concurrent_statements 
end block [ block_label ]; 

Description:

The block statement groups concurrent statements in an architecture. The two main purposes for using blocks are: improve readability of the specification and to disable some signals by using the guarded expression (see Guarded).

The block statement is organisational only - the use of a block does not directly affect the execution of a simulation model.

The purpose of the port map and generic map statements is to map signals and other objects declared outside of the block into the ports and generic parameters that have been declared inside of the block, respectively. This construct, however, has only a small practical importance.

The block declarations are local to the block and are not visible outside it.

Example:

signal P, Q, R: std_logic;
...
level1: block
  port(A, B: in std_logic;
       C: out std_logic);
  port map(A => P, B => Q, C => R); 
begin 
  C <= A and B;
end block level1;

Notes:

See also:

Concurrent statement, Guarded, Signal assignment