Problems encountered when converting simulink model including look-up table to hdl code

I want to use hdl coder to make a dds (Direct Digital Synthesis). The screenshot of the simulink model is as follows. The simulation waveform is correct. I can get sine waves with different frequencies by changing the step size. However, when I check the model compatibility before converting to HDl, the following error occurs, so my model cannot be converted to hdl code.
Error:Internal Error: Evaluation of validate function on class hdldefaults.LookupTableND failed with the error message: MATLAB:badsubscript: Index exceeds matrix dimensions.
The error message means indexes go beyond the scope of the lookup table, but I can't figure out. And if I remove the lookup table and replace it with a constant module, I get the same error message.
the simulink model is attached and I use matlab 2015a, please offer me some help.

 採用された回答

stozaki
stozaki 2020 年 3 月 7 日

1 投票

please try to use my modified model.

1 件のコメント

tau lee
tau lee 2020 年 3 月 7 日
thank you for your help, hdl code is converted successfully!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCode Generation についてさらに検索

製品

質問済み:

2020 年 3 月 7 日

コメント済み:

2020 年 3 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by