フィルターのクリア

Simulink multirate scheduling and task preemption

6 ビュー (過去 30 日間)
MTA
MTA 2012 年 8 月 29 日
Hi
After I suspected that for some reason Simulink is not preempting lower priority (longer timesample) for a higher priority (shorter time sample) I've built a simple simulink model that reproduce the thing. It has:
1- some computation demanding operation (I'm using optflow) that will take about 150 ms of execution. This operation is performed at a rate of 1Hz
2- an C s-function that acts as a RTC synchronization. simply it delay the execution by the amount needed to run the sim with rtc. I'm using linux clock and sleep services. This s-function outputs the number of missed RTC sync points, so if everything is alright this output should always be zero. This s-function is executed at rate of 10Hz
I noticed that whenever the optflow is running the rtc sync s-function misses a sync point because the simulink scheduler has not preempted the (150 ms) executing task to catch the (100ms) time tick
I've tried the previous simulation in normal/accelerator/rapid accelerator and external mode with multi-tasking chosen in the configuration parameters and I'm getting the exact same result while according to: http://www.mathworks.co.uk/products/simulink-coder/description5.html and http://www.mathworks.co.uk/help/toolbox/rtw/ug/f996849.html the coder should procude a code that handles the preemption properly to catch all time samples.
I appreciate if someone points out what I'm I missing
Kind regards,
Mohamad

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by