Error while converting a sine pwm block in simulink to verilog code using HDL coder.

1 回表示 (過去 30 日間)
I have simulated a sine pwm block in simulink. It is working perfectly and I want to convert it into verilog code using HDL workflow Adviser. The following error message came:
Failed: Running Check Block Compatibility failed.
Warning: Cannot find the implementation for block 'pwm1703/Subsystem/Sine Wave'.
I have used the sine wave block from source library in the simulink. I have used sine sawtooth (signal generator) compare method to generate the sine pwm.
Any idea what is going wrong?

採用された回答

Tim McBrayer
Tim McBrayer 2013 年 3 月 21 日
The sine wave block is not supported by HDL Coder. You can see all the blocks supported by HDL Coder by running the MATLAB command 'hdllib'.
That said, there are two supported methods for computing the sine in HDL Coder. The first is to use the Simulink->Math Operations->Trigonometric Function block. This block will compute the sine using a CORDIC algorithm. You can control the number of iterations, which allows you to choose between size/speed and accuracy.
The other way of implementing the sine function in HDL Coder is to use a lookup table containing the precomputed sine wave of desired resolution and scaling. You can save chip area by having your table represent only one quadrant, and mapping this as appropriate.
  1 件のコメント
Roy Francis
Roy Francis 2013 年 3 月 22 日
Thanks for the answer I will try it out.
Thanks & Regards,
Roy

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

その他の回答 (0 件)

コミュニティ

カテゴリ

Help Center および File ExchangeCode Generation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by