Re: gEDA-user: Looking for tips to debug Icarus Verilog

2009-04-09 Thread Larry Doolittle
Patrick-

On Thu, Apr 09, 2009 at 08:23:55AM -0400, Patrick Doyle wrote:
 I tried firing up gdb on iverilog, but that doesn't do much good, as
 iverilog is simply the driver program.  Is there a howto one can point
 me at for debugging iverilog?

see email from Steve Tue, 05 Jun 2007 12:33:19 -0700

~/lib/ivl/ivl -v -Ctgt-stub/stub.conf -Cgo.conf -Pa.pf -Na.net -- $VERILOG

gdb ~/lib/ivl/ivl
run -v -Ctgt-stub/stub.conf -Cgo.conf -Pa.pf -Na.net -- $VERILOG

---
2008-11-12

~/lib/ivl/ivl -v -Cgo.conf  -Pa.pf -Na.net -- $VERILOG

$ cat go.conf
generation:3.0
sys_func:vpi/system.sft
warnings:implicit
debug:eval_tree
debug:elaborate
out:a.out
ivlpp:/home/ldoolitt/lib/ivl/ivlpp -D__ICARUS__ -L
sys_func:system.sft
$ 

YMMV. HTH.

  - Larry


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Looking for tips to debug Icarus Verilog

2009-04-09 Thread Patrick Doyle
For those of you who might be interested... I found the bug in my
verilog code that was triggering the crash.  I had a spelling mistake
in one of my nets that resulted in a net being implicitly declared.
Personally, I don't think that this should trigger a crash of the
compiler (and perhaps it doesn't on other systems), but I'm past my
current hurdle.

I guess I'm looking for recommendations as to what I should do next.
Some ideas that come to mind are:

1) Add a page to the iverilog wiki outlining some tips for debugging
iverilog (such as the use of the -v flag, the use of the
IVERILOG_ICONFIG environment variable, the importance of spelling
IVERILOG_ICONFIG correctly, etc...)  If such information already
exists somewhere, then I missed it, and I probably don't need to
replicate it.

2) Continue to debug ivl to determine why this particular assertion is
triggered when this particular net is implicitly defined when running
ivl on my particular machine.  From what I've seen of the code so far,
there will be a fairly steep learning curve associated with figuring
this out, but I am probably up to the task (although the time
commitment is somewhat scary.)

3) Send some combination of my current verilog code and/or the
intermediate files to somebody else to see if the problem can be
replicated on another platform.  Ideally that somebody would be
intimately familiar with the code and would be able to spot the bug in
less than 5 minutes (assuming that it is reproducible).

4) Narrow my code down to the barest minimum set of code that
reproduces the crash and try steps 2 or 3.

Any suggestions?

--wpd


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Looking for tips to debug Icarus Verilog

2009-04-09 Thread Larry Doolittle
Patrick -

On Thu, Apr 09, 2009 at 10:01:06AM -0400, Patrick Doyle wrote:
 For those of you who might be interested... I found the bug in my
 verilog code that was triggering the crash.  I had a spelling mistake
 in one of my nets that resulted in a net being implicitly declared.
 Personally, I don't think that this should trigger a crash of the
 compiler (and perhaps it doesn't on other systems), but I'm past my
 current hurdle.

If the compiler crashes, it has a bug, and you should report it.

 1) Add a page to the iverilog wiki outlining some tips for debugging
 iverilog (such as the use of the -v flag, the use of the
 IVERILOG_ICONFIG environment variable, the importance of spelling
 IVERILOG_ICONFIG correctly, etc...)  If such information already
 exists somewhere, then I missed it, and I probably don't need to
 replicate it.

That's a good idea, go for it.

 4) Narrow my code down to the barest minimum set of code that
 reproduces the crash and try steps 2 or 3.

Maintainers always appreciate it if you can put some time into
this step.

 3) Send some combination of my current verilog code and/or the
 intermediate files to somebody else to see if the problem can be
 replicated on another platform.  Ideally that somebody would be
 intimately familiar with the code and would be able to spot the bug in
 less than 5 minutes (assuming that it is reproducible).

The best place to post your code is on the Sourceforge/Icarus bug tracker.
http://sourceforge.net/tracker/?atid=775997group_id=149850func=browse

   - Larry


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user