loop


Synopsis


module loop {
int+read+write  reset;
int+read+write  run;
int+read  cycle;
int+read  start_val;
int+read  end_val;
int+read  incr;
};

Description

loop iterates an operation. For example, you could use a loop object to control the movement of an object in your application; this could be as simple as controlling the movement of a slider, or as complex as continuously looping a 3D animation.

Input ports

The loop object contains the following parameters that you can use to control the iteration:

reset

When set to 1, resets the count subobject to the value of the start_val subobject. This value is reset to 0 right after it is changed.

run

When set to 1, completes an iteration of the loop. It is reset to 0 when the loop is finished.

cycle

If set to 1, iterates the loop continuously.

start_val

Indicates the starting value of the iteration.

end_val

Indicates the ending value of the iteration.

incr

Indicates the interval at which to count from the starting value to the ending value.

Output ports

The loop object contains these other subobjects that indicate the progress of the iteration:

done

If set to 1, indicates that an iteration of the loop completed.

count

Indicates the current value between the starting value and ending value.