How to solve "unsupported unbounded loop structure" error when generate hdl code from stateflow

2 次查看(过去 30 天)
The error information is :
Found an unsupported unbounded loop structure. This loop may be user
written or automatically generated due to the use of specific vector
expressions or functions. For more information on unsupported loop
structures, please refer to the documentation.
I have encountered this problem once, and I followed this solution How can I work around unbounded loops when .... It worked!
But recently I encountered again. This time it differs from the previous. The error information doesn't give the error poistion such as "transmission xxx". I have checked, the stateflow doesn't have an loop condition contains two variables. So I think the problem is "automatically generated due to the use of specific vector expressions or functions".
I deleted something and generated again. By repeat this action, I targeted the error in a array inside a loop.
As the image show, when I delete the "mf_pool[mf_num]=MFT[i]", the error disappeared. After some further test, I found it is because the use of array in the left of "=".
Now, how can I solve problem? I don't found many information on the internet, neither does the matlab help doc. Any information is appreciate!

回答(2 个)

Huang
Huang 2014-5-18
is anybody know something

Tim McBrayer
Tim McBrayer 2014-5-19
How many times is your loop going to execute? If you can't answer that by examining the state chart (and you can't), then the loop is unbounded. Your conditional transition [MFT(i) > 0] is likely the problem one. Loops are turned into repeated sets of hardware; if the loop is unbounded, HDL Coder can't determine how many times to repeat the hardware.
  1 个评论
Huang
Huang 2014-5-20
This one is too complex. I simplified it to an easy model. You can see and download it here . In the easy model, it is certained that it loops 5 times at most, but it still report the same error "unsupported unbounded loop structure". I do some test further. There are two variable in the model, one local, one output. when i delete the output one, the error disappear. This is the most weird thing.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by