I am trying to use "Deploy Neural Network Regression Model to FPGA/ASIC Platform" example

1 回表示 (過去 30 日間)
Chanakya Hingu
Chanakya Hingu 2024 年 4 月 4 日
回答済み: Kiran Kintali 2024 年 4 月 8 日
On following the instruction I am getting the following error
" Parameter 'X_MAX' in 'slexFPGAPredictFixedPointExample/Subsystem/de- normalize/MATLAB Function'has been marked as tunable, but not defined as a Simulink.Parameter object. For HDL Code generation, either define the parameter as non-tunable or define the tunable parameter as a Simulink.Parameter with 'ExportedGlobal' storage class."
now sure how to fix the error.
  1 件のコメント
Manikanta Aditya
Manikanta Aditya 2024 年 4 月 4 日
The error message you’re seeing is indicating that the parameter ‘X_MAX’ in your Simulink model has been marked as tunable, but it hasn’t been defined as a Simulink.Parameter object. For HDL code generation, parameters that are marked as tunable need to be defined as Simulink.Parameter objects with ‘ExportedGlobal’ storage class.
Here’s how you can define ‘X_MAX’ as a Simulink.Parameter object:
X_MAX = Simulink.Parameter;
X_MAX.Value = your_value; % replace 'your_value' with the actual value for X_MAX
X_MAX.CoderInfo.StorageClass = 'ExportedGlobal';
After defining ‘X_MAX’ as above, you can use it in your Simulink model. If ‘X_MAX’ should not be tunable, you can simply assign the value to ‘X_MAX’ in your MATLAB workspace:
Then, in your Simulink model, you can use ‘X_MAX’ directly.

サインインしてコメントする。

回答 (1 件)

Kiran Kintali
Kiran Kintali 2024 年 4 月 8 日
Are you running into issues trying this example? What release of MATLAB are you currently using? Thanks.

カテゴリ

Help Center および File ExchangeSensor Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by