Home > Community > Forums > Functional Verification > Overloading $error in SVA under 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: *

 Overloading $error in SVA under NCSIM 

Last post Sat, Mar 3 2007 8:34 AM by archive. 6 replies.
Started by archive 03 Mar 2007 08:34 AM. Topic has 6 replies and 2590 views
Page 1 of 1 (7 items)
Sort Posts:
  • Sat, Mar 3 2007 8:34 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Overloading $error in SVA under NCSIM Reply

    Referring to recent thread on www.verificationguild.com, topic:

    Assertion failures and pass/fail status


    Adam asked:

    -------
    Any word from Cadence on the ability to substitute your own $error() routine ?

    This definitely would be nice.
    -----

    I know that atleast one other vendor allows it easily. What about NC? Or is there any other easier way to keep a count of all SVA errors and declare PASS/FAIL at the end? How does URM handle this? This is a very common problem as many  RTL engineers write assertions and it is hard to ask them to keep following a standard action-block syntax. Also with IPs etc. it is nearly impossible to guarantee this.

    So it will be really useful to have the SVA errors accounting to simulation PASS/FAIL.

    Any advice on this will be appreciated.

    Thanks
    Ajeetha, CVC
    www.noveldv.com


    Originally posted in cdnusers.org by ajeetha
    • Post Points: 0
  • Tue, Mar 6 2007 7:13 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Overloading $error in SVA under NCSIM Reply

    You can use the 'assert -summary' TCL command to get a summary of assertion errors.

    assert -summary ...Print summary report of assertion statistics.
    -byfailure..............Sort summary by number of failures.
    -byname.................Sort summary by property name.
    -final..................Defer summary report until the end of simulation.
    -redirect ....Print the summary output to the file called "".


    Originally posted in cdnusers.org by tpylant
    • Post Points: 0
  • Wed, Mar 7 2007 1:36 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Overloading $error in SVA under NCSIM Reply

    Posted By tpylant on 3/06/2007 7:13 PM
    You can use the 'assert -summary' TCL command to get a summary of assertion errors.

    assert -summary ...Print summary report of assertion statistics.
    -byfailure..............Sort summary by number of failures.
    -byname.................Sort summary by property name.
    -final..................Defer summary report until the end of simulation.
    -redirect ....Print the summary output to the file called "".

    Thanks, but this would not be the easiest solutions for few reasons:

    1. I still have to figure out hard on how to get this to do an "error count" that's easily visible under testbench code. Imagine some thing like the dut_error() call in E/Specman. It is fantastic as it gets us a single point contact for all errors. I remember a team member integrating that to OVL errors long back.

    2. Typically enabling TCL means degrade in run time performance - not ideal for regressions. For instance I can't run simple: "ncelab my_top", ncsim my_top. I will require -access R (May be WC as well).

    Any better ideas? Given that Specman is now part of NC/CDN, I'm quite sure you guys can do an integration to dut_error like stuff. Verisity guys knew "what's verification" and they paid attention to every sensible verification requirement! Perhaps that's the start-up mindset!


    Thanks
    Ajeetha, CVC
    www.noveldv.com


    Originally posted in cdnusers.org by ajeetha
    • Post Points: 0
  • Wed, Mar 7 2007 7:11 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Overloading $error in SVA under NCSIM Reply

    The way that we suggest in the URM is to use the included `DUT_ERROR macro. This macro displays an error message and increments an error counter. Depending on the severity level passed as an argument decides whether the simulation continues or stops.

    The DUT_ERROR macro and error handling tasks are contained in a urm_util package that is included with the IPCM install.

    Tim


    Originally posted in cdnusers.org by tpylant
    • Post Points: 0
  • Wed, Mar 7 2007 7:31 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Overloading $error in SVA under NCSIM Reply

    Posted By tpylant on 3/07/2007 7:11 AM
    The way that we suggest in the URM is to use the included `DUT_ERROR macro. This macro displays an error message and increments an error counter. Depending on the severity level passed as an argument decides whether the simulation continues or stops.

    The DUT_ERROR macro and error handling tasks are contained in a urm_util package that is included with the IPCM install.

    Tim
    Tim,
         That goes back to the starting of this thread (in vguild) - not every RTL engineer is willing to add DUT_ERROR in action block! If so how do we handle that? That's why I suggested overloading $error.

    Ajeetha, CVC
    www.noveldv.com


    Originally posted in cdnusers.org by ajeetha
    • Post Points: 0
  • Wed, Mar 7 2007 7:43 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Overloading $error in SVA under NCSIM Reply

    I don't understand the difference between calling $error and calling `DUT_ERROR:

    assert(error_cond) $error;

    vs.

    assert(error_cond) `DUT_ERROR;



    Tim


    Originally posted in cdnusers.org by tpylant
    • Post Points: 0
  • Wed, Mar 7 2007 8:01 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Overloading $error in SVA under NCSIM Reply

    Posted By tpylant on 3/07/2007 7:43 AM
    I don't understand the difference between calling $error and calling `DUT_ERROR:

    assert(error_cond) $error;

    vs.

    assert(error_cond) `DUT_ERROR;



    Tim

    The difference is that SV LRM demands that $error is implicitly called when an assertion fails, so with:

      assert (error_cond);

    Tool should implicitly call $error.

    Regards
    Ajeetha, CVC
    www.noveldv.com


    Originally posted in cdnusers.org by ajeetha
    • Post Points: 0
Page 1 of 1 (7 items)
Sort Posts:
Started by archive at 03 Mar 2007 08:34 AM. Topic has 6 replies.