Velocity Reviews

Velocity Reviews (
-   VHDL (
-   -   read input file in vhdl ! (

charko 05-19-2010 08:28 AM

read input file in vhdl !
Hi! I am new for the vhdl and i want to know how i can test reading input file.
I write this code to read an input file but i don't have idea to write a test bench for the simulation.
Thank you for your help!

NB: Sorry for my bad english!

You can find following the code vhdl for reading input file :
library std;
use std.textio.all;

entity lecture is end;

architecture arch of lecture is
read_imput_file : process
variable inline: line;
variable character_variable:character;
variable end_of_line: boolean ;
file myfile: text is "data.txt";
while not endfile(myfile ) loop -- tant qu'on a pas la fin du fichier on fait une boucle
readline(myfile,inline); -- on lit tout le fichier
--end_of_line is EOLN Boolean flag
while end_of_line loop -- tant qu'on atteint la fin du fichier
end loop;
end loop;
wait; -- ne rien faire lorsque c'est fini
end process read_imput_file;
end arch;

charko 05-19-2010 12:28 PM

hi everybody!

Please can you help, i want to know how i can write a vhdl code for binary file.
Thank you very munch!


All times are GMT. The time now is 09:18 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.