02-28-2019 08:27 AM
i want to read four files .txt in my testbench.this files have in each line 16 bits .
i have converted image to txt file to be read read in my testbench but when i simulate , the errors shows:
at 14.000 ps: Error: READ(STD_ULOGIC_VECTOR) Error: Character '
Error at 14.000 ps: Textio read:: called on empty string or lineat 14.000 ps: Error:
Also when i try to replace read by
" & L.all & "'"; its show just the first bits in each line .how i can solved this errors
02-28-2019 01:09 PM
Not sure what you're doing, but your text file contains a load of 0s. So each line only contains a single bit. If your SLV is 16 bits, it will cause and error as it is expecting 16 bits per line.
03-01-2019 02:22 AM
but my file contains 16 bits per line? the problem is that i transform image under matlab with the pixels coded in 16 bits and i recorded these binary values in txt file .can you give example of file txt that have 16 bits per lines because i think im confused now .thanks
03-01-2019 02:28 AM
Your text has a single bit per line. Your text file looks like this:
0 0 0 0 0 0 0 0
You need 16 bits per line, either as binary:
0000000000000000 0000000000000000 0000101011001010 ..... etc
or hex (if you use the hread procedure)
0000 0000 0ACA .... etc
03-01-2019 02:59 AM
thank you for your time , here I confused all the text files are as you say 16 bits per lines, I already import a file W.txt and in the testbench reads only the first bits, its possible there is an error in the file elements a carachtere or something else
03-01-2019 03:10 AM
Your posts are very confusing. W.txt only has 1 bit per line, which is maybe why your testbench only reads in 1 bit. Not 16 bits per line.
Without seeing your code and text file you are using, I can only confirm that what you have posted has only 1 bit per line.