- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try check connectivity diagnostics in configuration parameter of simulink file for 'treat bus signal as vector' and set it to error.
or explicity put BusToVector.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- try check connectivity diagnostics in configuration parameter of simulink file for 'treat bus signal as vector' and set it to error. or explicity put BusToVector. --- Quote End --- HI alex,Thanks for the reply I will check it and see if it works.Did you see the model in attached file please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes but i have no new version of Matlab as you. there is only one function for me. and the code inside simulink file differs from posted.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page