![]() |
![]() |
The null statement explicitly states that no action is required. It 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 following example shows a typical use of the null statement. The corresponding circuit design is shown in the figure following the example.
entity example5 31 is
port(
signal CONTROL: INTEGER range 0 to 7;
signal A: in BIT;
signal Z: out BIT
);
end example5 31;
architecture behave of example 5 31 is
begin
process (CONTROL, A)
begin
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;
end process;
end behave;