Block is a concurrent statement used to represent a portion of a design.  Block statements may also include an optional Guard feature which allows the user to disable signal drivers within the block when a specified Guard condition is false.

 

A block statement includes—in this order—the following:

 

(1)  block label,

(2)  the reserved word "block",

(3)  optionally, a Boolean guard expression (for example, TESTCOUNT<5),

(4)  a block header, which specifies the interface of the block with its environment,

(5)  a block declarations section,

(6)  the reserved word "begin",

(7)  the block statements, and

(8)  the reserved words "end block", optionally followed by the block label (which, if used, must be the same as the block label in (1) ).

 

When a guard expression is used, a signal driver can be disabled by inserting the reserved word "guarded" at the beginning of the right side of the signal driver statement.  For example, based on the example in (3) above, the block statement:

 

  SAMPLE <= guarded D;

 

will cause the signal SAMPLE to take on the value of D only when TESTCOUNT<5.  Otherwise, no action on that assignment statement will be taken.

 

Example

    TESTPARITY: block

        signal Atmp,Btmp;  -- Local signals

    begin

        Atmp <= gen_parity(A);

        Btmp <= gen_parity(B);

        ParityEQ <= ‘1’ when Atmp = Btmp else ‘0’;

    end block TESTPARITY;

 

LRM

    9.1

 

See also

image\diamond.gif  Guarded

image\diamond.gif  Blocks