Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Little problem with HDL Coder

Subject: Little problem with HDL Coder

From: Ste_ee

Date: 10 Nov, 2013 22:28:48

Message: 1 of 2

Hi all, i have this part of my function that must to be converted to vhdl, but hdl coder tell me "variable size matrix non supported" about these 4 rows:


 R_re(k,k+1:4) = Q_re(:,k).'*Arr(:,k+1:4) - ((Q_im(:,k).')*-1)*Ai(:,k+1:4);
 R_im(k,k+1:4) = Q_re(:,k).'*Ai(:,k+1:4) + ((Q_im(:,k).')*-1)*Arr(:,k+1:4);
    
Arr(:,k+1:4) = Arr(:,k+1:4) - (Q_re(:,k)*R_re(k,k+1:4) -Q_im(:,k)*R_im(k,k+1:4));
Ai(:,k+1:4) = Ai(:,k+1:4) - (Q_re(:,k)*R_im(k,k+1:4) +Q_im(:,k)*R_re(k,k+1:4));

The transpose function is supported, the multiplication too...what is wrong??
Colon operator??

Subject: Little problem with HDL Coder

From: Tim McBrayer

Date: 11 Nov, 2013 13:34:48

Message: 2 of 2

On 11/10/13 17:28, Ste_ee wrote:
> Hi all, i have this part of my function that must to be converted to vhdl, but hdl coder tell me "variable size matrix non supported" about these 4 rows:
>
>
> R_re(k,k+1:4) = Q_re(:,k).'*Arr(:,k+1:4) - ((Q_im(:,k).')*-1)*Ai(:,k+1:4);
> R_im(k,k+1:4) = Q_re(:,k).'*Ai(:,k+1:4) + ((Q_im(:,k).')*-1)*Arr(:,k+1:4);
>
> Arr(:,k+1:4) = Arr(:,k+1:4) - (Q_re(:,k)*R_re(k,k+1:4) -Q_im(:,k)*R_im(k,k+1:4));
> Ai(:,k+1:4) = Ai(:,k+1:4) - (Q_re(:,k)*R_im(k,k+1:4) +Q_im(:,k)*R_re(k,k+1:4));
>
> The transpose function is supported, the multiplication too...what is wrong??
> Colon operator??

How big is R_re(k, k+1:4)? It depends upon the value of 'k'. The length of the 2nd
dimension can not be determined statically. Thus, this is a variable size matrix, which is
not supported.

Regards,
--
Tim McBrayer
MathWorks

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us