필터 지우기
필터 지우기

Error using Matlab HDL Coder

조회 수: 16 (최근 30일)
Jamil Hayder
Jamil Hayder 2015년 12월 8일
답변: Juan Valverde 2016년 2월 15일
Hi, Can some one please help out.Thanks. I am trying to convert below code to VHDL using HDL Coder but getting error. The HDL Coder Block file is also attached .Please can you have a look on it and see whats the mistake in block diagram.
x1=[1 2 3 4 5 6 7 8 9];
x2=[3 4 5 6 7 8 9 2 1];
n=length(x1);
xc=zeros(2*n-1,1);
for i=1:2*n-1
if(i>n)
j1=1;
k1=2*n-i;
j2=i-n+1;
k2=n;
else
j1=n-i+1;
k1=n;
j2=1;
k2=i;
end
xc(i)=sum(conj(x1(j1:k1)).*x2(j2:k2));
end
xc=flipud(xc);
Error:
Cannot connect to model 'prc4'; please try Update Diagram (Ctrl-D).
Error due to multiple causes.
Errors occurred during parsing of MATLAB function 'MATLAB Function'(#24)
Error in port widths or dimensions. Output port 1 of 'prc4/MATLAB Function/u' is a one dimensional vector with 1 elements.
Can some please help me out what could be the reason of this error.

답변 (1개)

Juan Valverde
Juan Valverde 2016년 2월 15일
Hello,
Re-Check data types and ports. Use fix point and be sure that all calculations can be represented by the data types you selected for the model.

카테고리

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