Previous

Null Statements

The null statement explicitly states that no action is required. The null statement is often used in case statements because all choices must be covered, even if some of the choices are ignored. The syntax follows.

null;

The example below shows a typical use of the null statement. The resulting circuit is shown in the figure following the example.

signal CONTROL: INTEGER range 0 to 7;
signal A, Z: BIT; 
...
Z <= A;
   
case CONTROL is      
     when 0 | 7 =>      -- If 0 or 7, then invert A
          Z <= not A;
     when others =>
          null;            -- If not 0 or 7, then do nothing
end case;

Figure 6.13 Circuit for null Statement

Next