Home > Community > Forums > Functional Verification > gdb debugging a Systemverilog DPI (shared library) that is run from ncsim

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 gdb debugging a Systemverilog DPI (shared library) that is run from ncsim 

Last post Mon, Jun 4 2012 6:10 AM by ravi999. 2 replies.
Started by cubicle82 16 Feb 2011 01:12 PM. Topic has 2 replies and 4380 views
Page 1 of 1 (3 items)
Sort Posts:
  • Wed, Feb 16 2011 1:12 PM

    • cubicle82
    • Top 500 Contributor
    • Joined on Tue, Jan 27 2009
    • Aliso Viejo, CA
    • Posts 21
    • Points 360
    gdb debugging a Systemverilog DPI (shared library) that is run from ncsim Reply

    We have a C++ model that interfaces to our Systemverilog sim environmen through Systemverilog DPI.

    Currently, debugging inside the C++ model is a non-interactive process -- after a failure is noted in a logfile, we make a 'bes-guess' as to where it came from, and then add vpi printf() statements to the C++ model, re-compile and re-run.

     This is probably more of a general C++ debugging question, but is there a way or tutorial guide on how to attach a gdb process (spwaned from Eclipse IDE) to the ncsim simulator, to give me debug-visibility/controllability into the C++ model?

     

    • Post Points: 20
  • Wed, Feb 16 2011 1:17 PM

    • TAM1
    • Top 75 Contributor
    • Joined on Thu, Jul 17 2008
    • HOME, PA
    • Posts 83
    • Points 1,105
    Re: gdb debugging a Systemverilog DPI (shared library) that is run from ncsim Reply

    If you are using "irun", you can simply put "-gdb" on the command line.

    irun -gdb -f filelist.f ...

    It will bring up gdb, do some setup in the debugger and fire off ncsim. It will set a breakpoint that stops the simulation after all of the shared-libraries (that it knows about) have been loaded, so everything should be there for you to set breakpoints in your model and continue.

    • Post Points: 20
  • Mon, Jun 4 2012 6:10 AM

    • ravi999
    • Not Ranked
    • Joined on Wed, Apr 1 2009
    • Posts 6
    • Points 60
    Re: gdb debugging a Systemverilog DPI (shared library) that is run from ncsim Reply

    Hi,

    I am new to cadence ncsc_run. 

    Is there any tutorial example for using gdb with ncsc_run and simvision. Especially from docs in tool installation path.

    I want to understand how ncsc_run and gdb interact with each other (like passing arguments using +systemc_args and where those argument goes)

    thanks

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by cubicle82 at 16 Feb 2011 01:12 PM. Topic has 2 replies.