Pulse Generator For HDL conversion!

조회 수: 12 (최근 30일)
Ben Fayçal
Ben Fayçal 2021년 5월 6일
편집: Kiran Kintali 2021년 5월 15일
Hello;
I want to use simulink HDL coder workflow to generate vhdl code for a block that contains a MATLAB function triggered with a pulse generator (as a clock), but when i try to generate, it says that the pulse generator isn't supported for HDL ! so is there any solution or alternative to generate hdl for a triggered matlab function ??
Also if i try to generate the HDL code for the second sub-system (not including pulse generator but MATLAB function only), it gives me the following error:
The top design unit selected for HDL code generation may not be inside a triggered subsystem.
Is there any solution for this problem please?
  댓글 수: 3
Ben Fayçal
Ben Fayçal 2021년 5월 6일
편집: Ben Fayçal 2021년 5월 6일
Thank you for the answer sir; i have found a solution to this the problem, but it seems that there are others with the trigger:
-All ports of an enabled/triggered subsystem must have the same sample rate for HDL code generation.
-Subsystem output port 'Out1' must have an initial value of 0 for HDL code generation when in a subsystem with a Trigger, Enable, or Action port.
Is there any solution for that ? or can i make the function work in another way without using a clock and a trigger? which means for example triggering it from the script itself?
Bharath Venkataraman
Bharath Venkataraman 2021년 5월 7일
편집: Bharath Venkataraman 2021년 5월 7일
Yes, the requirements for a triggered subsystem are as you mention.
I do wonder if you need the trigger at all. Can you for example, try to model this without a trigger, and rather with enable/valid signals which run the appropriate logic? Here is an example of how to user valid in/out for model the system.

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

채택된 답변

Kiran Kintali
Kiran Kintali 2021년 5월 15일
편집: Kiran Kintali 2021년 5월 15일
>> When i try to generate code, HDL Coder says that the pulse generator isn't supported for HDL !
You can build pulse generator logic using basic blocks such as these and generate HDL Code.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by