5 Threads found on edaboard.com: Readline Vhdl
As said, do multiple reads per line.
readline ( my_file , current_line ) ;
read ( current_line , incoming_pixel1 ) ;
read ( current_line , incoming_pixel2 ) ;
read ( current_line , incoming_pixel3 ) ;
You won't need to ask if you reviewed the description of textio package in vhdl LRM.
PLD, SPLD, GAL, CPLD, FPGA Design :: 07-19-2016 09:11 :: FvM :: Replies: 17 :: Views: 289
the readline(file, line) procedure reads an entire line from a text file. You then use read(dest, line) to extract elements from that line.
- - - Updated - - -
Or, to make our lives a little easier, post the code that doesnt work and ask some good questions.
PLD, SPLD, GAL, CPLD, FPGA Design :: 01-02-2014 04:00 :: TrickyDicky :: Replies: 12 :: Views: 720
there is no way to do this easily in vhdl. vhdl is not set up to do File io nicely other than text.
What file are you trying to read? For every file you can use the ENDFILE() function to see if you have reached the end of a file:
while not ENDFILE(my_file) loop
You could use this lo
PLD, SPLD, GAL, CPLD, FPGA Design :: 06-17-2011 10:33 :: TrickyDicky :: Replies: 2 :: Views: 1668
Ill assume each value is stored on a seperate line:
type some_array_t is array(integer range <>) of integer;
signal ar : some_array_t(0 to 99); --could be a varaible
--inside a process
file f : text open read_mode is "my_file.txt";
variable inline : line;
for i in ar'range loop
PLD, SPLD, GAL, CPLD, FPGA Design :: 06-03-2011 09:08 :: TrickyDicky :: Replies: 13 :: Views: 3781
i think u have missed the "readline" function before read function...
Check the below link
PLD, SPLD, GAL, CPLD, FPGA Design :: 07-28-2009 01:56 :: shanmugaveld :: Replies: 12 :: Views: 12693