필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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 CenterFile Exchange에서 HDL Coder에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by