필터 지우기
필터 지우기

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
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 CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by