Modelsim 6.2a EE crashes on recursive subroutine

H

Hubble

Hi all,

I used Modelsim 6.0c for a testbench and am now supposed to switch to
Modelsim 6.2a. My testbench consides a file reader module, which is
able to include other files. For this, I am using a procedure "scan"
which has a string parameter.

The body of scan readas the scafile line by line. If a line contains
"INC filename", scan calls inc_command which calls scan recursively and
includes the file.

AFAIK, this is a common technique. However, on Modulsim 6.2a ("vcom
-93"), the compiler crashes saying "segmentation fault". It seems to
read everything, pauses before the end and then faults leaving a _lock
file. Modelsim 6.0c did run perfectly. I tried "-O0" with no luck.

The outline of the module is as follows:

Scanfile_P: process
procedure scan(filename: string) is

file scanfile: text is filename;
variable args: tbs_dynarray; -- argument list
...
procedure inc_command(...)
begin
...
scan(f); -- recursion
...
end;

begin
if (...) then
writecommand(...);
elsif (...) then
inc_command(...);
end if;
end;
begin
scan(G_SCANFILE); -- G_SCANFILE is a generic
end -- Scanfile_P;


Hubble.
 
S

Simon Heinzle

You probably set the break condition wrong and your subroutine is recursing
infinitely. (Therefore resulting in a stack overflow at some time)

I noticed similar problems with infinite loops like

while i < 10 loop
-- do something
-- but don't increment i
end loop;

where Modelsim just hangs.

Best,
Simon
 
S

Simon Heinzle

Sorry, I missed the note that it runs correctly with 6.0 but not with 6.2...
forget my previous post.

Simon
 
H

Hans

Hi Hubble,

IMHO Modelsim 6.2a is very flaky and I also had several crashes up to a
point that I re-installed 6.1f again. This might not be surprising given
that 6.2a is the first major upgrade and contains a lot of extra stuff.

One thing I did notice is that vopt seems to be the cause of a lot of issues
so try using -novopt (assuming you have this option in your EE version?),

Hans
www.ht-lab.com
 
H

Hubble

Hans said:
Hi Hubble,

IMHO Modelsim 6.2a is very flaky and I also had several crashes up to a
point that I re-installed 6.1f again. This might not be surprising given
that 6.2a is the first major upgrade and contains a lot of extra stuff.

One thing I did notice is that vopt seems to be the cause of a lot of issues
so try using -novopt (assuming you have this option in your EE version?),

Hans
www.ht-lab.com

Thanks Hans. However -novopt did not help.

Hubble
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top