Error in HDL Workflow Advisor - Stateflow - Build Illegal Data Access ... 'Execute at Initialization' Must be Enabled

조회 수: 3 (최근 30일)
I am attempting to build an Encoder Counter Reader using Simulink, Stateflow to implement on a Zedboard using HDL Coder in Matlab 2014a. At Step 3.2 in the HDL Workflow Advisor I get the following error:
  • Error: HDL code generation from Stateflow failed: Stateflow:Build Illegal data access or computation detected for the chart given that 'Execute At Initialization' must be enabled. See above errors more information. Stateflow HDL code generation failed for chart 'EncoderRead/Channel A Interrupt' (#42).
I ran 'hdlsetup EncoderRead' and I have "Execute at Initialization" checked in the Model Explorer for my state charts.
Anyone have any pointers on what I am doing wrong here? The Simulink Model is below.

답변 (4개)

David Walter
David Walter 2014년 10월 18일
So, adding a boolean enable port to my charts, with idle states triggered by the enable signal seemed to have fixed the error.

Li Qian
Li Qian 2018년 10월 24일
Hi, ich found a general Solution for this Problem. Wenn you combine a chart from Stateflow with HDL-Code, the "en" aktion of the first State in the State Machine is not allowed to receive the Value from the Simulinkmodell outside of the Chart. That means that for the initialization using "en" in the first State, for example: en: a=Parameter, the Parameter muss be defined inside of the chart, Wenn not, the error mentioned above comes up. :)

Li Qian
Li Qian 2018년 10월 22일
Hi, I have the same Problem. Could you show me your Project?
  댓글 수: 1
Dave Walter
Dave Walter 2018년 10월 22일
Sorry, I don't have access to this project anymore. But I did post the solution for what worked in my case above.

댓글을 달려면 로그인하십시오.

Li Qian
Li Qian 2018년 10월 22일


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