Forever

LRM §9.6.

Forever executes one or more statements in an indefinite loop.

Syntax:

forever
  statement

Description:

The forever continuously repeats the statement. It should include timing controls or be able to disable itself, otherwise it may loop infinitely and hangs the simulation.

The statements must be enclosed in a begin-end or fork-join block if more than one statement is to be executed.

Example:

initial
begin : Clock
  Clk = 0;
  forever 
    #50 Clk = !Clk;
end

See also:

Disable, For, Repeat, While