Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - VHDL'87: avoiding FATAL ERROR when "Failed to open VHDL file" occurs

 
Thread Tools Search this Thread
Old 09-04-2007, 12:38 PM   #1
Default VHDL'87: avoiding FATAL ERROR when "Failed to open VHDL file" occurs


Hi all,

i think a simulation environment should be able to cope with new input
files without collapsing, just because there is an optional input file
missing.
EVEN IF VHDL'87 is indeed VERY POOR as far as file handling is
concerned
(the line
file stimulus: TEXT is in "optionalstuff.dat";
always leads to a FATAL error in case the file is missing)

does anyone know a way to avoid the "file not found" bug?

maybe some Modelsim setting?

thanx
sean



sigwalt@gmx.net
  Reply With Quote
Old 09-04-2007, 09:17 PM   #2
Jonathan Bromley
 
Posts: n/a
Default Re: VHDL'87: avoiding FATAL ERROR when "Failed to open VHDL file" occurs
On Tue, 04 Sep 2007 04:38:29 -0700, wrote:

>i think a simulation environment should be able to cope with new input
>files without collapsing, just because there is an optional input file
>missing.
>EVEN IF VHDL'87 is indeed VERY POOR as far as file handling is
>concerned


Stop futzing around with VHDL-87's ghastly file arrangements and
use VHDL-93 style instead. It's only slightly better, but at
least it offers you the chance to recover gracefully from a
file-open failure.

Not that you can do much about it. VHDL conspicuously lacks
any way to investigate or explore the host file system, so
if you can't open the file you wanted, there's little chance
of getting VHDL to find the file somewhere else.

The right solution is to hard-code the filenames in your
VHDL sim, then wrap the simulation in a Tcl script that
carefully puts the right files in the right places for the
simulation (and moves any output files from their hard-coded
places to somewhere more useful once the sim is done).
Tcl is very good indeed at messing with the host file system
to find files, create directories, invent unique filenames
based on the system date and time, and so forth. VHDL
(any flavour) is useless for such things.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK

http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.


Jonathan Bromley
  Reply With Quote
Old 09-04-2007, 10:06 PM   #3
kenm
 
Posts: n/a
Default Re: VHDL'87: avoiding FATAL ERROR when "Failed to open VHDL file" occurs
On Sep 4, 12:38 pm, sigw...@gmx.net wrote:
> Hi all,
>
> i think a simulation environment should be able to cope with new input
> files without collapsing, just because there is an optional input file
> missing.
> EVEN IF VHDL'87 is indeed VERY POOR as far as file handling is
> concerned
> (the line
> file stimulus: TEXT is in "optionalstuff.dat";
> always leads to a FATAL error in case the file is missing)
>
> does anyone know a way to avoid the "file not found" bug?
>
> maybe some Modelsim setting?
>
> thanx
> sean


Hi Sean,

The "-absentisempty" option on the "vsim" command in ModelSim will do
what you need.

e.g. vsim -absentisempty top_level_of_your_design

It will actually behave as if the file is present, but empty, which is
probably the best way to handle this.

Cheers,

Ken Morrow,
Morrow Electronics Limited, UK
www.morro.co.uk
(website still under construction after change of ISP)

Email address is invalid. Delete the letter after my first name for
the real address.




kenm
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL'87: avoiding that "file not found" leads to fatal error sigwalt Hardware 0 09-04-2007 11:30 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46