Loop Blocks

Define the work that repeats.

Explore loop components and their documented control behavior. Follow the interface requirements before adding repetition to a model.

Loop Control Block Models


Real_Do_Param

RealDoParam

File: general_blocks/Loops/Loop_real_param.sim
Description
The model generates an REAL Do Loop from initial_value to final_value ,
each time incrementing by step_amount. After the begin input is enabled the first loop
index (initial_value) will be placed on the index output. The model waits for the ready input to
be enabled before adding the step_amount to the previous index value to get the next index value.
The new index value is placed on the index output port. This continues until the next index value is
greater than the value of the final_value parameter. When this is detected, done output is enabled instead
of the index output.
Ports

Input Ports

  • begin     Data Type: TRIGGER
  • ready     Data Type: TRIGGER

Output Ports

  • index    Data Type: REAL
  • done     Data Type: TRIGGER

Parameters

  • initial_value    Data Type: INTEGER
  • final_value     Data Type: INTEGER
  • step_amount   Data Type: INTEGER

Real_Do

RealDo

File: general_blocks/Loops/Loop_real.sim
Description
The model generates an REAL Do Loop from initial value to final value,
each time incrementing by step. The model begins a loop after receiving initial,
final, and step. It puts out the initial value on the index output. The model waits for the readyinput to
be enabled before adding the step value to the previous index value to get the next index value.
This continues until the next index value is greater than the value of the final input. When this is
detected, done output is enabled instead of the index output.
Ports

Input Ports

  • initial       Data Type: REAL
  • final        Data Type: REAL
  • step        Data Type: REAL
  • ready     Data Type: REAL

Output Ports

  • index    Data Type: REAL
  • done     Data Type: TRIGGER

Parameters

  • none

Int_Do_Param

IntDoParam

File: general_blocks/Loops/Loop_param.sim
Description
The model generates an INTEGER Do Loop from initial_value to final_value,
each time incrementing by step_amount. After the begin input is enabled the first loop
index (initial_value) will be placed on the index output. The model waits for the ready input to
be enabled before adding the step_amount to the previous index value to get the next index value.
The new index value is placed on the index output port. This continues until the next index value is
greater than the value of the final_value parameter. When this is detected, done output is enabled instead
of the index output.
Ports

Input Ports

  • begin     Data Type: TRIGGER
  • ready     Data Type: TRIGGER

Output Ports

  • index    Data Type: INTEGER
  • done     Data Type: TRIGGER

Parameters

  • initial_value = 0      Data Type: INTEGER
  • final_value = 10     Data Type: INTEGER
  • step_amount = 1    Data Type: INTEGER

Int_Do

IntDo

File: general_blocks/Loops/Loop_integer.sim
Description
The model generates an INTEGER Do Loop from initial value to final value,
each time incrementing by step. The model begins a loop after receiving initial,
final, and step. It puts out the initial value on the index output. The model waits for the readyinput to
be enabled before adding the step value to the previous index value to get the next index value.
This continues until the next index value is greater than the value of the final input. When this is
detected, done output is enabled instead of the index output.
Ports

Input Ports

  • initial       Data Type: INTEGER
  • final        Data Type: INTEGER
  • step        Data Type: INTEGER
  • ready     Data Type: TRIGGER

Output Ports

  • index    Data Type: INTEGER
  • done     Data Type: TRIGGER

Parameters

  • none

Int_Do_1_N

IntDo1N

File: general_blocks/Loops/Loop_1_N_integer.sim
Description
The model generates an INTEGER Do Loop with values from 1 to N (inclusive) and an increment of +1. The final value of the loop, N, is the input to the model which initiates the loop. After the final value N input is enabled, the first loop index(1) will be placed on the index output. The model waits for the ready input to be enabled before placing the next value of the loop on the index output port. When the loop is complete, the done output is enabled.
Ports

Input Ports

  • N       Data Type: INTEGER
  • ready  Data Type: TRIGGER

Output Ports

  • index    Data Type: INTEGER
  • done     Data Type: TRIGGER

Parameters

  • none

Int_Do_0_Nminus1

IntDo0Nmin

File: general_blocks/Loops/Loop_0_N-1_integer.sim
Description:
The model generates an INTEGER Do Loop with values from 0 to (N-1)
(inclusive) and an increment of +1. The input N is the input tp this model
which initiates the loop. After the N input is enabled, the first loop index(0)
will be placed on the index output. The model waits for the ready input to
be enabled before placing the next value of the loop on the index output port.
When the loop is complete, the done output is enabled.
Ports

Input Ports

  • N       Data Type: INTEGER
  • ready  Data Type: TRIGGER

Output Ports

  • index    Data Type: INTEGER
  • done     Data Type: TRIGGER

Parameters

  • none

This page is an editorial rewrite of source documentation. Historical status, availability, and platform notes are not independently verified for a current release. Technical examples are reference material, not a live simulator.