フィルターのクリア

Can't generate Simulink model from Simulink function block

1 回表示 (過去 30 日間)
Abhishek
Abhishek 2023 年 6 月 29 日
コメント済み: Kiran Kintali 2023 年 6 月 29 日
I was using HDL code generation , for making a generated model for my Simulink model containing a Matlab function block, but in the generated model , there is the same function block , is there a way it can be converted to a Simulink block version?.

採用された回答

Shubh Pareek
Shubh Pareek 2023 年 6 月 29 日
From what I understood you can't see the Simulink version of your Function Block ,
Try this method ,right click on your function block and on HDL Code properties set architechture as MATLAB datapath and then try to make the generated model .
I hope this helps with your query .
  2 件のコメント
Abhishek
Abhishek 2023 年 6 月 29 日
Thanks @Shubh Pareek it worked .
Kiran Kintali
Kiran Kintali 2023 年 6 月 29 日
Select HDL Block Properties on MATLAB Function Block and choose MATLAB Datapath architecture. If the MATLAB code is data path compliant it can be expanded to Simulink blocks in the generated model. During code generation the the contents of the MATLAB Code are optimized with the rest of the Simulink blocks. For example you do resource sharing of multipliers within MATLAB Block with Multiply blocks in Simulink.

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

その他の回答 (1 件)

Kiran Kintali
Kiran Kintali 2023 年 6 月 29 日
You can convert a subset of MATLAB code into Simulink blocks in the generated model when in DataPath optimization mode.
Why Use MATLAB Datapath Architecture?
HDL code generation for a MATLAB Function block supports two HDL architectures: MATLAB Function and MATLAB Datapath. Specify the HDL Architecture in the HDL Block Properties dialog box of the MATLAB Function block.
Use the MATLAB Datapath architecture to:
  • Model complex fixed-point and floating-point MATLAB algorithms inside MATLAB Function blocks and interface this algorithm with other Simulink blocks in your model.
  • Improve area and timing of your design significantly by optimizing the algorithm inside the MATLAB Function block and across the MATLAB Function block boundary with other Simulink blocks in your model.
The MATLAB Datapath architecture is the default setting for MATLAB Function blocks with floating-point types. By enabling this architecture for fixed-point operations, you can use various optimizations that include:
  • Hierarchy flattening
  • Resource sharing and streaming
  • Clock-rate pipelining
  • Adaptive pipelining
  • Distributed pipelining
  • Critical path estimation

カテゴリ

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

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by