EmbDev.net

Forum: FPGA, VHDL & Verilog read data from file


Author: Abdallah      (Company: Home) (my_name)
Posted on:

Rate this post
0 useful
not useful
peace !

please! I'm coding for image processing, what I nead is read 
data(integer) from file (txt,xml or dat) to implemente the code in the 
board, the file is generated from matlab
Q1- what type of file should I use
Q2- does the txt file solve the problem( for simulation it's ok but the 
question is for the implementation)
Q3- could you advice me for some books or links

Thank you very much....peace

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Abdallah      wrote:
> what I nead is read data(integer) from file (txt,xml or dat) to
> implemente the code in the board
Did I get this right: you want to read from a file on a FPGA hardware? 
On what kind of media do you want to access this file? USB? SD card? 
CompactFlash?

: Edited by Moderator
Author: Abdallah      (Company: Home) (my_name)
Posted on:

Rate this post
0 useful
not useful
Lothar Miller wrote:

> Did I get this right: you want to read from a file on a FPGA hardware?
yes, that's exacty what should I do ;in fact I have to read data from 
file ( data are values of image pixel, this file is generated from code 
MATLAB) and then I will test these values to other values already known.

by the way the code is included in preject of palm hand recognition, so 
any advices or suggestion would be greatly appreciated .

> On what kind of media do you want to access this file? USB? SD card?
> CompactFlash?

from USB

thanks for your response...peace

: Edited by User
Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Abdallah      wrote:
>> On what kind of media do you want to access this file? USB? SD card?
>> CompactFlash?
> from USB
Then you will have to implement a USB Host Controller on your FPGA. 
After that you will need a Mass Storage Device driver to access some 
kind of File Sytem. All in all this is an extremely demanding task to be 
solved when you want to do that all completely with a HDL like Verilog 
or VHDL.

One way can be to use some softcore CPU and do only the signal 
processing in real hardware...

> by the way the code is included in preject of palm hand recognition, so
> any advices or suggestion would be greatly appreciated .
And why do you need to read data from a file in realtime here?

Abdallah      wrote:
> Q2- does the txt file solve the problem( for simulation it's ok but the
> question is for the implementation)
I'm not sure about what your actual problem is...  :-/

Author: Abdallah      (Company: Home) (my_name)
Posted on:

Rate this post
0 useful
not useful
Lothar Miller wrote:

> And why do you need to read data from a file in realtime here?

because I'm building an embedded system for security access based on 
palm hand, to open the door for those who the system recognize them.

> I'm not sure about what your actual problem is...  :-/
the problem is: do the board accept reading from .txt file??
far as I know is .txt file used only for simulation, I want to confirm 
the information

Author: Marius S. (lupin)
Posted on:

Rate this post
0 useful
not useful
If you use the VHDL file operators (std.textio etc) then it's just for 
simulation.

To read a file for synthesis you have to design some interface to some 
kind of memory and read the file from the memory.

Author: Abdallah      (Company: Home) (my_name)
Posted on:

Rate this post
0 useful
not useful
Marius S. wrote:
> If you use the VHDL file operators (std.textio etc) then it's just for
> simulation.
that's right, I used std.textio but I want for synthesis, thatks for the 
advice

> To read a file for synthesis you have to design some interface to some
> kind of memory and read the file from the memory.
I'm obliged to use the RAM, as I know it needs an Interface or some 
think like that..... Could you please guide me to some reference and 
index some keywords  that I need to make this project.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.