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.

file error in testbench code

Status
Not open for further replies.

pratika

Newbie level 4
Newbie level 4
Joined
Apr 14, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
45
hi
I write a simple testbench code in questasim in which the inputs are reading with the file but some error is there like this
** Error: (vsim-7) Failed to open VHDL file "C:/input.txt" in rb mode.
#
# No such file or directory. (errno = ENOENT).can u please help me in solving this error
 

make sure your directory in which file is there , having read/write permission , if you are working in windows , you can check by right click , if working in linux then use "chmod 555 <dirname> "

check for the file permission also ... file should have read permission, and make sure you have write correct name.
 

does the file exist? putting it on the root would seem an odd place to put the input file.
 

hi
I write a simple testbench code in questasim in which the inputs are reading with the file but some error is there like this
** Error: (vsim-7) Failed to open VHDL file "C:/input.txt" in rb mode.
#
# No such file or directory. (errno = ENOENT).can u please help me in solving this error

how to check for read/write permission?
 

it might be possible your file path getting overridden , you can check modelsim.ini file, or put your file in same directory where you are having .v files , and then update the path and try to compile it.
 
What path have you given in your code under:
"file my_input : TEXT open READ_MODE is " ? Is it "C:/input.txt" ? Since it is looking for the file in C directory and could not find it there.
It is good to place the input file in your Project folder and give correct path name completely in your code.
 

What path have you given in your code under:
"file my_input : TEXT open READ_MODE is " ? Is it "C:/input.txt" ? Since it is looking for the file in C directory and could not find it there.
It is good to place the input file in your Project folder and give correct path name completely in your code.

file FI:TEXT open READ_MODE is "C:/input.txt";

- - - Updated - - -

try to put it somewhere other than the c:\
how?can u please tell me?
 

try "C:\input.txt" ;

change slash .. you have used "/" instead of "\" :)

let me know if this work ...

- - - Updated - - -

"/" is used in unix dir system , "\" used to navigate files in windows ..
 
how?can u please tell me?

Go to my computer - navigate to the c:\, then copy the file and move it elsewhere. Then modify the path in the VHDL

"/" works just fine in modelsim as it uses a unix like envirnment.
 

try "C:\input.txt" ;

change slash .. you have used "/" instead of "\" :)

let me know if this work ...

- - - Updated - - -

"/" is used in unix dir system , "\" used to navigate files in windows ..

vsim -voptargs=+acc work.tb_top
# can't read "VoptStartup(VoptOptimize:method)": no such element in array
what does it mean/

- - - Updated - - -

try "C:\input.txt" ;

change slash .. you have used "/" instead of "\" :)

let me know if this work ...

- - - Updated - - -

"/" is used in unix dir system , "\" used to navigate files in windows ..

the same file error is showing
 

its showing the same error

- - - Updated - - -

I hve attached the file
 

Attachments

  • file text.txt
    560 bytes · Views: 94

and what about input.txt?

- - - Updated - - -

PS. this is not the testbench, just a small snippet.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top