Verification Guild
A Community of Verification Professionals

 Create an AccountHome | Calendar | Downloads | FAQ | Links | Site Admin | Your Account  

Login
Nickname

Password

Security Code: Security Code
Type Security Code
BACKWARD

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Modules
· Home
· Downloads
· FAQ
· Feedback
· Recommend Us
· Web Links
· Your Account

Advertising

Who's Online
There are currently, 64 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

  
Verification Guild: Forums

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile  ProfileDigest    Log inLog in 

Assertion failures and pass/fail status

 
Post new topic   Reply to topic    Verification Guild Forum Index -> Main
View previous topic :: View next topic  
Author Message
PaulZ
Newbie
Newbie


Joined: Feb 21, 2007
Posts: 4

PostPosted: Wed Feb 21, 2007 4:49 pm    Post subject: I feel your pain Reply with quote

I’m also not finding an easy way to assign the number of assertion failures into a verilog variable using Cadence’s IUS. The main purpose for this is to add the assertion error count into our single verilog exit task to determine if the simulation passed or failed. Having a single true test pass or fail statement would save the possibility of somebody misreading “TEST PASS” when actually the test failed for an assertion early in the simulation. This would also help keep our simple regression reporting scripts from changing (e.g. tail sim.log | grep “TEST PASS”).

How do other people handle reporting assertion error summary in regressions and simulation logs? Does VCS give access to the assertion error count in verilog?

We have explored some ideas, each with pros and cons.
1) Increment a global assertion failed counter in the else action block “else global_assertion_fail_count++;”
Con: All testbenches using IP with these assertions require the global variable.
Con: Can not guarantee every designer will adhere to this methodology when using assertions –It’s hard enough to get them to use them in the first place.
Con: Can not guarantee newly acquired IP follows this convention.
2) On every failure, stop the sim and increment a TCL assertion error counter, and run the sim again.
Con: exit sim will now need to be in TCL – not portable to every simulator.
3) Print long assertion summary list either before or after exit task which has the total error count
Con: You still get a TEST PASS message even though you really failed.
Back to top
View user's profile
hemanth
Senior
Senior


Joined: Aug 16, 2004
Posts: 93
Location: Bangalore

PostPosted: Wed Feb 21, 2007 11:45 pm    Post subject: Reply with quote

I am not sure I understand your question properly but why dont you just terminate the simulation on an assertion failure and print out the one which failed. Isnt this much easier?

Thanks,
Hemanth
Back to top
View user's profile
Ajeetha
Senior
Senior


Joined: Mar 29, 2004
Posts: 424
Location: Bengaluru, India

PostPosted: Thu Feb 22, 2007 10:07 am    Post subject: Reply with quote

Hi,
Some thing similar came up a while ago, search in this forum, see:

http://www.verificationguild.com/modules.php?name=Forums&file=viewtopic&t=1059
http://www.verificationguild.com/modules.php?name=Forums&file=viewtopic&t=1280
http://www.verificationguild.com/modules.php?name=Forums&file=viewtopic&t=1228

One of the approaches suggested there is via TCL, something that you
already sort of ruled out, but AFAIK all 3 major vendors can do that
for you - but enabling run time TCL means compromising on performance
in general, so I wouldn't do this for regressions.

The other is one into SystemC - may not be needed here in this topic.

The approach of VMM_LOG is the natural way to go, but just as you
mentioned - it is hard to maintain that every assertion shall follow
that.

One other, elegant solution will be to be able to customize the SVA's
$error. I know in VCS one can do this quite easily, see:
http://www.deepchip.com/items/0344-13.html

Given that it is PLI/VPI, hopefully other vendors allow this as well.

It is such a common problem and am surprised there is no straight
forward solution, a wake up call to all EDA Vendors claiming "Complete
Verification" perhaps? This is really where users spend too much time
unnecessarily, clearly EDA tools can do a better helping hand here.

HTH,
Ajeetha, CVC
www.noveldv.com
_________________
Ajeetha Kumari,
CVC Pvt Ltd. http://www.cvcblr.com
* A Pragmatic Approach to VMM Adoption http://www.systemverilog.us/
* SystemVerilog Assertions Handbook
* Using PSL/Sugar
Back to top
View user's profile Visit poster's website
PaulZ
Newbie
Newbie


Joined: Feb 21, 2007
Posts: 4

PostPosted: Mon Feb 26, 2007 10:35 am    Post subject: Reply with quote

hemanth wrote:
I am not sure I understand your question properly but why dont you just terminate the simulation on an assertion failure and print out the one which failed. Isnt this much easier?


This is a very good point and half of engineers I polled here agree with you.

I would like to give a choice to my coworkers to allow them to immediately end the sim on the first assertion error or continue with the simulation to debug other issues not related to an assertion. It also may be beneficial to list all of the assertion errors in one run and debug them all as opposed to rerunning a long simulation only being able to debug one error at a time.

A compromise can usually be found with a option switch -I just get to pick the default setting.

-PaulZ


Last edited by PaulZ on Mon Feb 26, 2007 10:57 am; edited 1 time in total
Back to top
View user's profile
PaulZ
Newbie
Newbie


Joined: Feb 21, 2007
Posts: 4

PostPosted: Mon Feb 26, 2007 10:51 am    Post subject: Reply with quote

Ajeetha wrote:
Hi,

One other, elegant solution will be to be able to customize the SVA's
$error. I know in VCS one can do this quite easily, see:
http://www.deepchip.com/items/0344-13.html

Given that it is PLI/VPI, hopefully other vendors allow this as well.


Many thanks for your reply -lot's of info.

I agree that $error would be the most elegant solution next to the EDA industry providing a seemless one. Unfortunately, I have not had any success finding documentation into modifing $error in Cadence's IUS. I just started a ticket with Cadence and hopefully they can come through for me.

My selected solution in the mean time is to break on every assertion error, execute a tcl script to increment a error_count, and continue with the simulation. At the end of the simulation, or max error count (max error count can be set to 1), I go to tcl and print "TEST PASS/FAIL" based on error count. The legacy pass_fail task would assert one final assertion error if any other functional failures where encountered.

I feel this solution (along with your $error modification method) will allow me to bring in external IP that does not use VMM or a in-house assertion error action block convention.

-PaulZ
Back to top
View user's profile
Adam
Industry Expert
Industry Expert


Joined: Jun 01, 2004
Posts: 159

PostPosted: Fri Mar 02, 2007 6:53 pm    Post subject: Reply with quote

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

This definitely would be nice. Too bad the industry seems to be moving to
general language approaches that require a lot to make the error.
_________________
Adam Krolnik
Director of Design Verification
Verisilicon Inc.
Plano TX. 75074
Co-author "Assertion-Based Design", "Creating Assertion-Based IP"
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Verification Guild Forum Index -> Main All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Verification Guild © 2006 Janick Bergeron
Web site engine's code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.162 Seconds