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.

convert matlab code to vhdl code

Status
Not open for further replies.

vivo_m

Member level 3
Joined
May 15, 2011
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,903
hello every body


i want to convert matlab code to vhdl one.. any idea how can i do this

actually this code reads video information and calculate mean , std. dev. and covarience for each frame and pass this parameters to vhdl component
i'm doing this separately
run matlab code --> save the mention params in file --> then read this file within vhdl component
now i want to do the whole system using vhdl

any idea how can i do this...
any help plzzzzzz...


thanks alot..
i tried to used si
 

is this for synthesis or just testbenching?
 

so far for simulation and synthesis later one if possible
 

well first there is HDL coder from Mathworks

But if that fails (as it might, as only a subset of simulink blocks and embedded M can be converted), you'll have to hand code it Im afraid.
 

yss this is what i'm afraid of too....

i don't know how to read video using vhdl
i don't know how to extract info about its frame using vhdl
i don't know how to deal with memory (write or read from memo) using vhdl...
:((((

any idea how can i do this plzzzzzzzz
 

best thing to do is extract all the information in matlab into text files. Then its easy to read the data into a VHDL test bench.
For synthesis, you would never read a file on the FPGA, but send the data over some communication link.
 

ysss.. i already 've did this step..
now i want to make all of the component using vhdl..

it seems its tooo hard that's why i'm requesting allll of ur help

any idea how to overcome this plzzzzzz

thanks alot..
 

you're not clear on exactly what you want. Write some code and come back here for help
 

i can't understand ...


i've clarified what i want to do in my 1st post.. and also my lack knowledge on "how to read video", "how to extract info about its frame" and "how to deal with memory (write or read from memo) using vhdl".. ur suggestion of reading from file was my work arround to overcome this..
but now i've to implement the whole application using vhdl and give-up reading file...

that's what i've asked to help in for...
what is not clear with that...

what code you want me to post... the matlab one or the vhdl one reading from the file or that i'ven't implemented yet cause i don't know how to do...
 

The questions you've asked are very broad. You havent specified exactly what you're trying to do. For example - where is the video? how do you expect to stream the data into the FPGA? what do you need a memory for?

These are just some of the questions I have. You have not specified what you want properly.
 

actually i don't know and i don't have any answer for these questions.. i've no idea what to do.. or from where to start

i don't know what do you mean by where is the video... it is on my hard disk (not live streaming).. i don't have any expectation on streaming the data as i don't know any thing about that.. for the memory.. i've been told that i should deal with memory to read the video as it will be save as addresses for its pixels... and i don't even understand how to do this...
i'm in a very big trouble... :((

actually i need a VERY BIG help to even understand how it would be implemented.. :(((

any idea plzzzzzzz
 
Last edited:

You could store the video as a ROM on the FPGA, but you would have to store it as raw data and you wouldnt be able to store a very big video. Thats why streaming it via some method is usually the best. Have a look into RS232. It is a simple protocol with plenty of IP cores around on the internet.
 

would you please clarify why do i need that???
 

need what? you need some way of playing video data through your FPGA.
 

i can't understand...

forget about fpga at this moment..

how to do this using vhdl..
its enough for me to simulate the application written vhdl at the begining, then think of how it's being synthesised

i don't know what to do or even how to begin.. :((
 

You should be thinking about synthesis from the beginning. Its very easy to write a load of VHDL code that you cannot synthesise, so you spend twice as long creating the code.
Do you need it on an FPGA in the end or not?
 

i will not download it on any kit but i need to run it at the end on a synthesis tool to know its frequency...
 

transfer the matlab code into vhdl codes line by line... that`s what I`ve done for the last 3 weeks... it`s so boring....
sometimes a single line of matlab code costs me several hours to write hundreds lines of vhdl code...
 

OMG...

is there any alternative naught plzzz...
 

OMG...

is there any alternative naught plzzz...

Nope, unless you've written the matlab code thinking about the FPGA design from the beginning. It can be very easy to write simple matlab that take hundreds of lines of VHDL to reproduce (for loops, for example). If you dont understand the logic in the first place, you're going to have a big job on your hands.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top