how to convert mfile to vhdl code with out similink model

1 view (last 30 days)
is mcode block useful to convert of mfile, is the mcode block support the wavread command

Accepted Answer

Tim McBrayer
Tim McBrayer on 16 Dec 2013
HDL Coder has supported HDL code generation from MATLAB code since R2012a. However, it does not and will never support the wavread function. The reading of any external file needs to be done by your testbench code. Supporting a complex command like wavread implies a filesystem on external storage, and high-level synthesis to perform external file IO in hardware.
HDL Coder has many image processing demos where the testbench reads an image and passes it into the hardware design. Audio processing is very simpler with this technique. I suggest you study the demos to understand this approach.
  2 Comments
run moves
run moves on 23 Dec 2013
thank you very much sir for your immediate response.. my problem in hdl code generation is that while we are running Recursive Least Square (RLS) demo noise cancellation. we could not able to generate HDL (Tools->HDL Coder-> Generate HDL). We are getting errors summary --> ERROS FROM HDLSHARED:HDLSHARED:SIMULINKFRONTEND:REPORT ISSUES:FRONTENDERROS and 1.rls1/RLS FILTER/Frame-Based RLS Filter/Update/Stabilize /in Matrices are not supported in this release. 2.rls1/RLS FILTER/Frame-Based RLS Filter/Update/Stabilize /sum2 3.rls1/RLS FILTER/Frame-Based RLS Filter/Update/Stabilize /conj1 ... We couldn`t able to figure out the problem. Kindly please suggest us to rectify our errors. Thank you in advance.
Tim McBrayer
Tim McBrayer on 30 Dec 2013
The relevant part of the error message is:
rls1/RLS FILTER/Frame-Based RLS Filter/Update/Stabilize /in:
Matrices are not supported in this release.
The named signal is a matrix; it has some dimensions MxN. HDL Coder does not support matrices in general, although that is being improved. You will need to convert the data type to either N Mx1, or M 1xN, vectors.

Sign in to comment.

More Answers (2)

megha billure
megha billure on 11 Mar 2016
i have matlab 2013a. To learn HDL coder, i tried same example given here i.e 'mlhdlc_sfir.m'. but i am getting error in conversion of floating point to fixed point. can you please help me with, the where problem may be. i am getting error while build like Error in Float2FixedConverter>buildDesign at 1699
Error in Float2FixedManager>buildFloatingPointCode at 102 is there installation problem or what..?
  1 Comment
Kiran Kintali
Kiran Kintali on 20 May 2020
I wonder if you need a C compiler installed in 13a to build mex files. can you try "mex -setup"? Thanks.

Sign in to comment.


Sara Chillali
Sara Chillali on 20 May 2020
matrices are not supported in this release hdl generete code problemme??

Tags

Products

Community Treasure Hunt

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

Start Hunting!