MATLAB: Do I receive a data dependency violation error in the model with an asynchronously triggered subsystem in Simulink 7.2 (R2008b)

asyncasynchronousdatadependencyinterruptprioritysimulinksubsystemtasktriggeredviolationvxworks

A model containing two subsystems that are asynchronously triggered by a VxWorks Interrupt block will throw a data dependency violation error although I included rate transition blocks.
Data dependency violation due to use of function-call or action subsystem. The loop can be traversed in the forward direction by following the red lines and in the backward direction by following the blue lines. Green lines indicate overlapping forward and backward paths in the loop. See Subsystem Examples in the Simulink library for valid and invalid examples of function-call and action subsystems.
The attached model (untitled_pec800_1.mdl) illustrates the issue.

Best Answer

The occurrence of this error depends on the sorting order and asynchronous tasks associated with the subsystems. When two subsystems are triggered by the same asynchronous interrupt block, they share the same sorting order. When the Simulink task priority values entered in the VxWorks interrupt block's dialog are in ascending order and the rate transition block between the two subsystems is of form 'High to Low' the data dependency violation will occur because the direct feedthrough flag of the rate transition block is true.
To work around this issue:
1. Set the Simulink task priorities of the Async Interrupt block in descending order. See attached model workaround_pec800_1.mdl
2. Uncheck the option ‘Synchronize the data transfer of the task with the caller task’ of the Task Sync block. See the attached model workaround_pec800_2.mdl
3. Uncheck the option 'Ensure data integrity' for the rate transition block between the 2 subsystems. See the attached model workaround_pec800_3.mdl
Also, note that this is not an issue that occurs only due to asynchronous support. A single rate model without any asynchronous blocks may have the same problem. See the attached modelA_singelRate_Example.mdl