Abstract:
A mechanism in a block diagram environment allows the modeling of an execution behavior of a block in a block diagram, where a user selects the execution behavior from a plurality of functions related to the block diagram and where the execution behavior of the block is performed when at least one model variable associated with the block satisfies a user-specified condition is disclosed. States and other internal data in the designated block are initialized upon the satisfaction of the user-specified condition. The illustrative embodiment of the present invention also allows the internal data to be reset upon the ending of the event, such as the modeled introduction or withdrawal of power. The execution behavior may be suspended and resumed multiple times during the simulation in response to multiple occurrences of the specified event. The present invention also allows for selected data to be exempt from the reset process so that the selected data is non-volatile.
Abstract:
A device may receive function information that describes a caller element that calls a called element that is separate from the caller element. The function information may identify a name or reference of the called element, a passed input, and a passed output. The passed input may be provided by the caller element to the called element, and the passed output may be received by the caller element from the called element. The caller element may be associated with a caller model, and the called element may be associated with a called model. The device may identify the called element, and may execute the caller element in a simulation environment. Execution of the caller element may cause execution of the called element without causing execution of an entirety of the called model. The device may receive the passed output from the called element based on executing the called element.
Abstract:
A device may generate code for a caller element of a first graphical model and a called element of a second graphical model by generating a first function and a second function. The first function may represent an interface between the caller element and the called element. The first function may include a first input argument corresponding to an input variable and a first output argument corresponding to an output variable. The second function may represent an underlying function of the called element. The underlying function may include the input variable passed from the caller element and the output variable. The underlying function may further include an internal input variable and an internal output variable. The second function may include second input arguments corresponding to the input variable and the internal input variable, and may include second output arguments corresponding to the output variable and the internal output variables.