Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Synthesizing Matlab code to FPGA

Status
Not open for further replies.

rectifier

Member level 5
Member level 5
Joined
Jun 4, 2005
Messages
90
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,905
Hey guys, I want to ask if it is possible to synthesize the matlab code to FPGA?
 

verilog code rectifier

MathWorks offers HDL coders for Simulink and filter design. I haven't seen anything for M files.
https://www.mathworks.com/access/helpdesk/help/toolbox/slhdlcoder/
https://www.mathworks.com/access/helpdesk/help/toolbox/hdlfilter/

Also see Xilinx System Generator for DSP, and Altera DSP Builder.
**broken link removed**
https://www.altera.com/products/software/products/dsp/dsp-builder.html

This may be useful - I know nothing about it:
https://www.xilinx.com/ise/dsp_design_prod/acceldsp/index.htm
 

iir implementation in acceldsp

This is a very meaningful things. it can simplify the design process of system. I hope who can give some example to understand it easily.
 

mathlab to fpga

Hey guys, has someone done this before. I need an urgent help with this. If anyone has done it, please kindly post the steps to do so.
 
matlab on fpga

hi all,
i have tried by using matlab;s FDA tools for generating VHDL code however, it isn't compatible with ALTERA quartus..
it shows various error..
Have you guys heard there is another software call OneOverT by tyder. ltd it is a powerful tools which can generate VHDL code by filter response..
wish to hear from you guys soon
 

acceldsp quantizer c++

Did you examine the VHDL code to see what was causing the error messages? Maybe there's an easy fix.

Be sure you haven't done something silly, such as requesting floating-point arithmetic (that's the default).


rectifier, which "steps" are you referring to? Do you have software that you are trying to learn?
 

matlab fdatool user guide pdf

Actually I tried to download system generator but there was a problem. So, could you guys suggest another software? Or, can we directly use Matlab only without having to use additional software?
 

matlab csd

How to obtain C source code for AVR or 8051 after tuning my control task ?
 

matlab fda hdl error

What went wrong with your System Generator download? You need to login before downloading demos, but registration is free.

Those two MATLAB HDL Coders are already included on the MATLAB installation disks. To install them you need the product license codes from MathWorks. Or maybe you can download demo versions:
https://www.mathworks.com/web_downloads/download_trials.html

avr_guru, I think you posted your question to the wrong place!
 

acceldsp simple filter introduction

Hi rectifier
The problem is not in the generated code bcos i have done it and is working fine.
I am using Xilinx 7.1i.
The problem may be bcos the FPGA tool u r using is an older version.
try downloading a newer version of any fpga tool and try it should work
 

fda tools user matlab

FROM ECHO
{Did you examine the VHDL code to see what was causing the error messages? Maybe there's an easy fix.

Be sure you haven't done something silly, such as requesting floating-point arithmetic (that's the default).


rectifier, which "steps" are you referring to? Do you have software that you are trying to learn?}

Im using altera quatus 2 to compile the code generated from matlab r14 sp2 however it shows various errors

i have try many times but the code couldnt be sythesizable by quartus 2 however it could compiled by modelsim

need helps
 

fda tools download matlab

is it the $signed error???if verilog
VHDL should work fine
remember as echo told u might have done simple mistakes.
try this
fdatool
design the filter
quantize it to no of bits u want(16 in 16 out by default)
targets-->generate hdl
select VHDL(by default)
it should work
 

matlab code to fpga

rectifier said:
Hey guys, I want to ask if it is possible to synthesize the matlab code to FPGA?

For Xilinx FPGA you can use AccelDSP.
 

Re: Matlab to FPGA

rsinivas,

have you try the matlab to generated VHDL code and successfully implement to ALTERA devices?
coz it is multiple error and i attach the code for you to see..
the code i have attached can you help me to synthesize by quartus..
 

Matlab to FPGA

Hi lawrence_idol, your VHDL filter contains floating-point arithmetic. That won't synthesize with any _Altera or Xilinx tools. You must tell MATLAB's fdatool to generate integer fixed-point arithmetic. Look for a "quantization parameters" button.
 

Re: Matlab to FPGA

dear echo,

really thanks for your rapid reply. i really appreciate that.. :)
i would try to synthesize by your comment..
do you have any research paper/ study regarding to fix point and floating point arithmetic??
i would be great to have that for me..
thx
best regards always.
 

Re: Matlab to FPGA

I don't know any specific books or papers, but try a Google search for "fixed point" "signal processing"
https://www.google.com/search?q="fixed+point"+"signal+processing"&btnG=Search

Google finds a huge number of hits. Near the top I see a paper that could be a helpful introduction:
"Migrating Signal Processing Applications From Floating-Point to Fixed-Point" by Barberis and Shah:
**broken link removed**

Also try searching MATLAB's and Altera's web sites for similar keywords. You will probably find helpful application notes.

Good luck!
 

Re: Matlab to FPGA

hi lawrence
as echo told u should quantize it before u generate HDL.just follow the steps i told u.
one more thing ur filter is of order 51 so it has 50 mul's and 50 add's
make sure ur FPGA supports it.pls do let me know the efiiciency of the code cos i am using verilog and we can get a comparison of which is better.
regarding float to fixed see fdatoolbox and filter design hdl coder user guide they are good concerned with filters only

check this it may help u
 

Re: Matlab to FPGA

Hi!

I have been given the task of converting MATLAB code to FPGA using AccelDSP.
So far not much progress has been made. The expectation is that anything that can be written in MATLAB can be converted i.e state machines, function(sine wave) generators etc.

I am thinking that only a small subset is synthesizable if it of the form:
signal samples in ->some function-> converted samples out (i.e. a filter!)

Does anyone know if anything other than functions on digital signals is possible.

Regards,
Al vdb
 

Re: Matlab to FPGA

hi rsrinivas & echo,

Thanks for the solution both u guys providing.. it really helps..
the VHDL code which generate from matlab is synthesizable by ALTERA quartus 2, however, it has more than 512 warning of the Fann in problem for just a minimal 4th order FIR equiripple low pass filter
and the total LE usage is 21% of FLEX 10K which i dont know is efficiency or not...
do you guys know how to design a FIR filter manually by just designing a simple FIR block diagram and manually convert into VHDL programming then download to the target device and run it..
i wonder wat outcome it would be, and the problem we facing?
thanks
and wish to hear for you guys soon
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top