Error: (vsim-3341) Cannot open file

H

Henning Bahr

Guest
Hi there!
I'm getting the following error when I'm simulating with Modelsim:

# ** Error: (vsim-3341) Cannot open file "outDataFile.txt". File is
already open.
# Time: 4993405 ns Iteration: 1 Instance: /testbench/dut

Simulating the same design with NCSim works out fine. The file
"outDataFile.txt" is correctly written. But why is Modelsim refusing
this?
The following part is the code for the file I/O:

file_open (outDataFile,"outDataFile.txt" , write_mode);
for i in memory_matrix'range loop
data_file:=memory_matrix(i);
hwrite (outline,data_file);
writeline (outDataFile, outline);
end loop;
file_close (outDataFile);

I have set a breakpoint at the first line. It appears that the error
occurs already at the very first time this statement is invoked. There
is no other file_open command in the model. Why does Modelsim think
this file already open?

Thanks in advance for your help.
Henning
 
Henning Bahr wrote:
Hi there!
I'm getting the following error when I'm simulating with Modelsim:

# ** Error: (vsim-3341) Cannot open file "outDataFile.txt". File is
already open.
# Time: 4993405 ns Iteration: 1 Instance: /testbench/dut

Simulating the same design with NCSim works out fine. The file
"outDataFile.txt" is correctly written. But why is Modelsim refusing
this?
Maybe your file declaration says "open".

-- Mike Treseler
 

Welcome to EDABoard.com

Sponsor

Back
Top