FPGA Groups

FPGA Groups (http://www.fpgacentral.com/group/index.php)
-   FPGA (http://www.fpgacentral.com/group/forumdisplay.php?f=14)
-   -   Error: (vsim-3341) Cannot open file (http://www.fpgacentral.com/group/showthread.php?t=51171)

Henning Bahr 01-13-2004 01:17 PM

Error: (vsim-3341) Cannot open file
 
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

Mike Treseler 01-13-2004 05:41 PM

Re: Error: (vsim-3341) Cannot open file
 
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



All times are GMT +1. The time now is 11:53 AM.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved