Documentation

Function-Call Split

Provide junction for splitting function-call signal

  • Library:
  • Ports & Subsystems

Description

The Function-Call Split block allows a function-call signal to branch and connect to several function-call subsystems or function-call models.

A Function-Call Split outputs multiple function-call signals to create multiple branches from a single function-call signal. In some cases, when you use this block, you do not need the function-call initiator to create multiple function-call signals to invoke a set of function-call subsystems or function-call models.

The function-call subsystem or function-call model connected to the output port of the Function-Call Split block that is marked with a dot execute before the subsystems or models connected to other output ports. If data dependencies between subsystems or models do not support the specified execution order, the Function-Call Split block returns an error. To eliminate this error, consider selecting the Latch input for feedback signals of function-call subsystem outputs parameter on one or more Inport blocks of the function-call subsystems models involved in a data-dependency loop. Selecting this option delays the corresponding input signal, thereby eliminating the data-dependency loop.

For a model to contain Function-Call Split blocks, you must set the following diagnostic to error: Model Configuration Parameters > Diagnostics > Connectivity > Invalid function-call connection.

If you select the model menu option Display > Blocks > Sorted Execution Order, then the execution order of function-call subsystems connected to branches of a given function-call signal appears on the blocks . Each subsystem has an execution order of the form s:[B#] where # is a number that ranges from 0 to one less than the total number of subsystems or models connected to branches of a given signal. The subsystems execute in ascending order based on this number.

The Function-Call Split block supports Signal Label Propagation.

The following model shows how to apply the Latch input for feedback signals of function-call subsystem outputs parameter to work around a data-dependency error caused by using a Function-Call Split block. By turning this parameter on in the f1 subsystem Inport block, the Function-Call Split block ignores the data dependency of signal b. The block breaks the loop of data dependencies between subsystems f1 and g1. The model achieves the behavior of consistently calling f1 to execute before g1. For a given execution step, subsystem f1 uses the g1 output computed at the previous execution step.

Limitations

The Function-Call Split block has these limitations:

  • All function-call subsystems and models connected to a given function-call signal must reside within the same nonvirtual layer of the model hierarchy.

  • You cannot connect branched function-call subsystems or models and their children directly back to the function-call initiator.

  • Function-call subsystems and models connected to branches of a function-call signal cannot have multiple (muxed) initiators.

  • A Function-Call Split block cannot have its input from a signal with multiple function-call elements.

Ports

Input

expand all

A Function-Call Generator block or a Stateflow®chart can provide function-call signals.

Output

expand all

Function-call signal connected to a function-call subsystem or function-call model.

Parameters

expand all

Select block icon shape.

Settings

distinctive

Rectangular block icon.

round

Circular block icon.

Programmatic Use

Parameter: IconShape
Type: character vector
Value: 'distinctive' | 'round'
Default: 'distinctive'

Specify number of function-call signal output ports.

Settings

2

Two function-call signal output ports.

integer

Integer number

Programmatic Use

Parameter: NumOutputPorts
Type: character vector
Value: '2' | '<integer>'
Default: '2'

Select the order of output ports with respect to which port provides a function-call first.

Settings

default

Top port provides function-call signal first.

reverse

Bottom port provides function-call signal first.

Programmatic Use

Parameter: OutputPortLayout
Type: character vector
Value: 'default' | 'reverse'
Default: 'default'

Introduced in R2010a

Was this topic helpful?