Forum Discussion
Matlab code to verilog
Hi there,
Is there a compiler which can convert Matlab code directly in to VHDL/verilog format so to implement the code directly in to FPGA? I am trying to write codes on MATLAB and would like to convert the code in to verilog format so to make my life easier.:) thnks22 Replies
- Altera_Forum
Honored Contributor
thanks for the instant reply Amilcar,
I went through the Altera website you provided the link for and also downloaded the DSP builder add-on but is there any tutorial or examples that I could try replicating in simulink or matlab and implement it directly on to my Altera FPGA so to get better understanding of the code and mechanic. I basically learn better by following examples that can be implemented. :) - Altera_Forum
Honored Contributor
I already posted a link to tools and docs on this thread. Did you read it ?
What did you not understand ? - Altera_Forum
Honored Contributor
thanks everyone, but I have a problem, actually I am new to FPGA, verilog and have average knowledge of matlab, simulink but I am trying to implement Digital signal processing technique on to a FPGA, I have searched online but can't seemed to get a tutorial on how exactly do I implement DSP technique on to a FPGA.
Could some one suggest me a good website or book which can teach me how to implement DSP technique on to an FPGA using simulink or matlab or even labview.... Right now I am trying to implement a simple noise cancellation technique compose of Sinusoid wave+chirp and by using a low pass filter I am trying to minimized the output to get the desired output in simulink and later I would like to implement this on to my Altera FPGA board could someone provide me such simple example, I would be very grateful - Altera_Forum
Honored Contributor
Matlab has a tool called mcc (matlab c compiler), available with some versions. It produces C or C++ or exe from m files. It excludes graphic functions(available at extra cost). type help mcc
- Altera_Forum
Honored Contributor
HI again.....could you guys tell me how do I convert matlab code to C...I have been search for quite sometime and hasn't been able to find any way to convert matlab to C
- Altera_Forum
Honored Contributor
Hi Irtiq
thanks for the info - Altera_Forum
Honored Contributor
Thanks a lot saurabraj
I give it a try.....:) I came across this site from Northwestern university: ece.northwestern.edu/cpdc/Match/Match.html and they have managed to make a compiler which converts the matlab code to verilog/VHDL but I can't seem to contact them..... I thought you guess would be interested in this..... - Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
Thanks saurabraj
That would help I guess.... I will posts as soon as I get this working but will I be able to find conversion software for verilog too because I am just a beginner and verilog is what I am learning now..... - Altera_Forum
Honored Contributor
Yes it is possible to convert, there is 2 process for this,
1) the schematic can be drawn in Simulink and using the function makehdl() in MATLAB, the schematic can be converted to vhdl coding. u can refer the matlab help... 2) consider the option of converting Matlab to C and C to VHDL as there are several (fairly reliable) converters on the market for this.