フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to make generated code from stateflow charts deterministic(e.g execute same amount of time every timestep) to get worst case execution time (WCET)?

1 回表示 (過去 30 日間)
Artyom
Artyom 2019 年 12 月 16 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi there. Many of us deploy automatically generated code from Stateflow charts on real-time targets.
Usually this code is executed on periodical basis - e.g. every couple of milliseconds the step() function is called, which runs through the chart states, transitions and functions and finaly exits.
I found that the time it takes to run one step on my real-time target is highly undeterministic - e.g. it varies in very wide range and highly depends on what states are currently active in chart, which transitions are checked end executed at this step,system operation mode etc. So it's hard to estimate really worst case execution time to make sure, that there is no overrun possible. In my application I would prefer to have long but deterministic execution time against fast, but undeterministic time.
I know that in Simulink it's possible to disable some optimizations to get more deterministic simulink model execution - e.g. it possible to generate code, which execute both conditional branches even if there is a switch at the end which selects just one result out of two. Is there something similar in Stateflow? For example execute all states even if they are not active?
I really would like to know the worst case execution time, even if it would be just theoretical value to be 100% sure. Otherwise I never know and need to profile the code execution under different conditions which would take much longer time.
Thanks for hints

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by