HDL Coder error when converting m-code to System Generator Black Box

2 ビュー (過去 30 日間)
Hac
Hac 2013 年 8 月 29 日
Everything went fine from fixed-point conversion until post code generation tasks where the console shows following errors:
### Begin Verilog Code Generation ### Working on PLL_HDL_CODER_FixPt as PLL_HDL_CODER_FixPt.v ### Generating Resource Utilization Report resource_report.html Error occurred when running post codegeneration tasks Error: failed to run post code generation tasks: MATLAB:builtins:BadDataType In 'hdlcoder:matlabhdlcoder:porttypeforXSG', data type supplied is incorrect for parameter {2}.
I guess Xilinx System Generator doesn't accept data type provided by HDL Coder. And by the way, where is parameter {2}? To be honest, Matlab console and error tracing are rather ambiguous to me.
PS: Sorry for duplicating this question (the other one is in Newsgroup). However, I believe that this is where I will got the appropriate answer.

採用された回答

Yongfeng
Yongfeng 2013 年 8 月 29 日
The message is indeed vague and will be improved.
HDL Coder can't turn a MATLAB design into a System Generator blackbox, because at least one port is of data type that doesn't meet the following requirements:
  1. The data type at port must be scalar.
  2. The data type at port must be either fixed point or Boolean.
  3. xlType doesn't allow negative value for binary point.
  4. xlType doesn't allow binary point position greater than word-size.

その他の回答 (1 件)

Hac
Hac 2013 年 9 月 3 日
I have resolved the problem and successfully converted the m-code to System Generator black box. However, the results are different from fixed-point simulation. All of the output values are NaN, which is very strange to me. I guess the initialization is incorrect leading to some NaNs leak out and infect the result. Also, test bench for simutaling HDL code on ISIM cannot be created. Any idea on how to deal with this trouble, guys?

カテゴリ

Help Center および File ExchangeHDL Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by