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.

Converting Matlab files to VHDL files

Status
Not open for further replies.

ragabs

Full Member level 1
Joined
Jun 28, 2005
Messages
97
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,111
Dear friends

is there any tool to convert automatically from matlab files(m file)into vhdl file(vhd).

thanx for help
 

bpu

Junior Member level 3
Joined
Jul 30, 2005
Messages
31
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,286
Activity points
1,593
matlab to vhdl

it's impossible. in MATLAB7 you can to implement the filters on vhdl only. and you can to test your design on vhdl in MATLAB with the external tool (ModelSim or Aldec)
 

emonn

Newbie level 1
Joined
Aug 1, 2005
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
Re: matlab to vhdl

Impossible? What about this product : **broken link removed**
I have not tried though, but I am very interested. Does someone have more details on this?
 

Santa

Member level 4
Joined
May 17, 2001
Messages
71
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
840
Re: matlab to vhdl

You have also Xilinx's System Generator. Test algorithms in Matlab then
implement them in Xilinx FPGAs. I don't know if intermediate files are HDL or EDIF.
 

eltonjohn

Advanced Member level 4
Joined
Feb 22, 2002
Messages
1,435
Helped
64
Reputation
126
Reaction score
28
Trophy points
1,328
Activity points
16,326
Re: matlab to vhdl

OK .. SIT DOWN PLEASE .. MATLAB IS A VERY SIMPLE SEQUENTIAL LANGUAGE AND VHDL IS A COMPLICATED (STRONGLY TYPED) PARALLEL LANGUAGE .SO WHATEVER CONVERTER FROM ONE TO THE OTHER HAS TO DEAL WITH THIS ASPECTS SO IS NOT REALLY A CONVERTER OR A TRANSLATOR BUT A SYNTHESIS TOOL .. IT TURNS OUT THAT ACCELCHIP IS A PRODUCT THAT ORIGINATED AS A MATLAB COMPILER IN A UNIVERSITY .
BUT IS NOT AS MAGIC AS IT MAY SEEM .THE REASON IS THAT MATLAB THE PRODUCT RELIES A LOT ON LIBRARIES NOT WRITTEN IN MATLAB LANGUAGE BUT IN C++ FOR THE SAKE OF SPEED .SO THERE IS NOT EVEN MATLAB CODE AVALAIBLE .ON EXAMPLE IS THE ftt() function . SO HOW TO CONVERT TO VHDL SOMETHING THAT IS NOT EVEN WRITTEN IN MATLAB. WELL IS JUST IMPLEMENT THE EQUIVALENT IN ACCELCHIP AS LIBRARIES .BUT .HOW TO IMPLEMENT ALL THE HUGE AMOUNT OF FUNCTIONS OF MATLAB ...WELL THIS WILL TAKE YEARS
SO IF YOU GO AND SEE THE ACCELCHIP LIBRARIES( SOLD SEPARATLY LOTS OF $$$) .YOU WILL SEE ALL THAT CAN BE DONE WITH MATLAB LANGAUGE SO FAR

CHEERS
 

swahlah

Full Member level 2
Joined
Mar 24, 2005
Messages
141
Helped
23
Reputation
46
Reaction score
7
Trophy points
1,298
Activity points
3,010
Re: matlab to vhdl

I dont think that matlab to vhdl conversion is useful because the design methodolgy of VHDL is very tough and parallel.
Matlab is aimed for testing and simulation while VHDL is a a hardware descriptive language and it also depends how a particular synthesizer looks your vhdl code.

-Best regards
 

eltonjohn

Advanced Member level 4
Joined
Feb 22, 2002
Messages
1,435
Helped
64
Reputation
126
Reaction score
28
Trophy points
1,328
Activity points
16,326
Re: matlab to vhdl

VHDL was not designed to be a just an electronic hardware description language ,the proof is that there not even the basic notion of register..Is mostly used nowdays as as a HARDWARE DESCRIPTION LANGUAGE .VHDL was designed to be a general purpose simulation language ..It is posible to simulate all kinds of systems .mechanical ,pneumatic ..but today is mostly used in electronic hardware .. but it was not conceived directly to do just that .
 

ganlubbq

Newbie level 4
Joined
Jun 28, 2005
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,332
Re: matlab to vhdl

it is not suitable for hardware design using tools for matlab to vhdl.
although there is some tools to do it.
hardware design is completely different from arithmetic research.
 

swahlah

Full Member level 2
Joined
Mar 24, 2005
Messages
141
Helped
23
Reputation
46
Reaction score
7
Trophy points
1,298
Activity points
3,010
Re: matlab to vhdl

I think there is some confusion between people.
work in Verilog and VHDL is very different and the key is the design methodology of hardware which requires great skill of desing models and digital logic and every data flow and register is costly.
-Regards
 

arnab

Newbie level 1
Joined
Aug 12, 2005
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
Re: matlab to vhdl

Hello dear friends, I am in a student project of building a conversion utility to perform code conversion from MATLAB to VHDL. I have so far figured out to make
from .mdl to .rtw by real time workshop and then from .rtw to C code by the target language compiler using the .tlc files.

But I don't know why the C code is not get compiled and executed by the 'mbuild' command. Any suggestion how to run a C code in MATLAB.

What are the conversion utilities available so far for this project? Have any reference they are doing it! Please don't refer the PDF thesis and all those theoretical things. I need a practical way out.

Are all the blocks in MATLAB convertible in VHDL ? I don't think so. What do you think?

Please refer me if any C to VHDL conversion utility are known to you.

Bye bye. I'll be grateful to get any valuable information or suggestion from you.
 

geconom

Full Member level 3
Joined
Feb 12, 2002
Messages
179
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,298
Activity points
1,461
Re: matlab to vhdl

For C->VHDL you can check **broken link removed**
 

swahlah

Full Member level 2
Joined
Mar 24, 2005
Messages
141
Helped
23
Reputation
46
Reaction score
7
Trophy points
1,298
Activity points
3,010
Re: matlab to vhdl

Well but this tool will only work for code conversion and in context of performance it may not be of any use because the basic Ideolgy behind the VHDL or VERILOG is not the coding logic but the Design logic, data flow, delays, etc. and if someone considers all these in MATLAB too then may be conversion will help but why will anyone do all this in his Matlab code..............

-Regards
 

Bob_C

Member level 2
Joined
Dec 23, 2003
Messages
43
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
UK
Activity points
280
matlab to vhdl

See Tyder (www.tyder.com)

Their software generates VHDL for filters, FFTs etc....

ONEoverT Digital Filter Designer and Tyd-IP Code Generator
It is very reasonably priced and very good.

Bob
 

SkyHigh

Advanced Member level 1
Joined
Jan 13, 2005
Messages
432
Helped
79
Reputation
158
Reaction score
27
Trophy points
1,308
Activity points
7,319
Re: matlab to vhdl

ragabs,

I have personally tried running a design in VHDL using ModalSim v5.x, and testing my design on Matlab on (1) a image processing project and (2) an audio processing project in the past.

I don't think there is yet a conversion tool from Matlab to VHDL that is readily available in the market. But I think there could be some in-house tools in some companies that does this.

I have heard of a way from old friends in the ASIC industry. What they did was actually modifying the C lang statements in your .c file and implement them in the Process statement in .vhd to maintain the sequential nature, not unless you want some concurrent statements which in fact doesn't happen in C.


Additional viewpoint
============

I am seeing biased judgement against VHDL. That's not a very ethical to make, especially in engineering practices.

First and foremost, VHDL and Verilog works with some abstraction levels in common, although VHDL targets more of the system level abstraction and Verilog more to the circuit level abstraction.

I need to highlight the fact that both VHDL and Verilog originated from the USA, although USA seems to prefer imparting Verilog whereas Europe prefers VHDL.

Take note that the IEEE Circuits and Systems Society has its mainstream beginning to change side from Verilog to VHDL in the recent years being the fact Verilog is very much detached from high-level support because system architecture is shifting towards CONVERGING high and low.

I have also seen IEEE members, who are hardcore Verilog, mainly from the USA, beginning to soften in the past years when VHDL is seeing importance from the developments made in Europe and Asia Far East, especially when it comes to development of EDA CAD tools, modelling tools, synthesis tools, high-level language capatibility etc. VHDL is perhaps the only HDL we use or know that can bridge the gap between low level circuit and high level languages.

So I guess it is time not to bring in personal judgement against VHDL, despite this is a long American tradition wherever I go. I always hear discriminating opinions when my friends and I go to conferences in the States. I know the Americans seem to dislike VHDL very much.

Well... Both VHDL and Verilog are languages to help us solve problems in engineering, not something for us to argue over. That's my opinion to uphold ethical engineering practices.

One thing to note. It is an established fact that VHDL is harder to master than Verilog, based on statistics made in engineering education. Many academic professors also told me that students learn Verilog better than VHDL. So don't complain about VHDL when you cannot master it. If so many engineers can handle VHDL, why can't you? You just need to spend more time to learn it well. Not blaming it.
 

louisnells

Full Member level 4
Joined
May 8, 2006
Messages
209
Helped
19
Reputation
38
Reaction score
8
Trophy points
1,298
Activity points
3,019
Re: matlab to vhdl

Its possible to convert matlab code to Verilog or VHDL.
Actually you can design systems directly from Matlab. For that you have to use tools like System Generator for DSP or AccelDSP from Xilinx. System generator works with Simulink.
Its also possible to use HDL designs with MatLab. Thats too is done via System Generator & Simulink.
Xilinx is actually referring these tools for DSP implementations.

Try this link
https://www.xilinx.com/products/design_resources/design_tool/index.htm
**broken link removed**
https://www.xilinx.com/ise/dsp_design_prod/acceldsp/index.htm
 

Daneshgar

Junior Member level 2
Joined
Nov 11, 2003
Messages
22
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Iran
Activity points
387
matlab to vhdl

Never!!!
Domain of VHDL is in Digital Electronic but MATLAB m files heve very large usage almost in any field of science.So It is impossible to convert form m file to VHDL.
But Simulink have facilities to generate VHDL code for some application.In addition you can use Link for Modelsim® Toolbax to simulation VHDL code form MATLAB.
aslo MATLAB and Simulink have facilities for FPGA design.
 

alzomor

Advanced Member level 2
Joined
Jun 9, 2005
Messages
678
Helped
39
Reputation
78
Reaction score
8
Trophy points
1,298
Location
Cairo
Activity points
6,418
Re: matlab to vhdl

Hi

Check the attached file

Salam
Hossam Alzomor
www(.)i-g(.)org
 

alexadmin

Junior Member level 2
Joined
Jun 15, 2007
Messages
24
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,281
Location
Russia
Activity points
1,398
Re: matlab to vhdl

At least three tools exist for the current time that can link Matlab models and HDL implementation. These are Xilinx System Generator (it was described above), Altera DSP Builde (altera.com) and Simulink HDL Coder (it is included iin the last versions of Matlab). Whole of them support m-functions with limited capabilities.
 

rajsrikanth

Full Member level 2
Joined
Apr 19, 2006
Messages
130
Helped
12
Reputation
24
Reaction score
4
Trophy points
1,298
Location
Hyderabad
Activity points
1,947
Re: matlab to vhdl

use acceldsp tool provided by xilinx. which u have to purchase seperately.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top