next up previous contents
Next: Loops Up: Basic concepts Previous: Wires and registers   Contents

Wait statements

The only statement that takes time in SV is the wait statement. A statement of the form
  wait(cond)
causes a delay until the condition cond is true, but always delays at least one time unit. Thus, wait(1) always waits exactly one time unit. For example,
wire x;

always
  begin
    x = 0;
    wait(1);
    x = 1;
  end
results in the observed sequence of values 0,1,0,1,...for x. Note that a new iteration of an always block begins exactly one time unit after the previous iteration terminates.

2003-01-07