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, 53 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 

Formal methods in verification flow
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Verification Guild Forum Index -> Assertions
View previous topic :: View next topic  
Author Message
alexg
Senior
Senior


Joined: Jan 07, 2004
Posts: 586
Location: Ottawa

PostPosted: Thu Jul 29, 2004 9:41 pm    Post subject: Formal methods in verification flow Reply with quote

The following statistics is copied from J.Cooley's DVCON trip report
(http://www.deepchip.com/items/dvcon04-10.html):

"What do you think about "bug hunters" like 0-in, Jasper,
@HDL, RealIntent, Averant, or Synopsys Magellan (Ketchum)?
Does your company use such tools?"

don't use : ################################### 70%
0-in : ####### 14%
Jasper : ## 5%
Synopsys Magellan : ## 5%
RealIntent Verix : # 4%
Averant Solidify : # 3%
@HDL : # 2%
Cadence BlackTie : 1%

As we see, after about 5 years from introduction of commercial formal model checking tools, only 30% of verification engineers are using them.

There is also another posting from ESNUG:
http://www.deepchip.com/items/0430-08.html

where anon user complains about Synopsys inability to fit it's own formal verification tool into it's own verification flow.

It would be interesting to get more opinions on this topic.

Regards,
Alexander Gnusin
Back to top
View user's profile Send e-mail
ncr
Junior
Junior


Joined: Jan 06, 2004
Posts: 5
Location: Bangalore, India

PostPosted: Fri Jul 30, 2004 2:19 am    Post subject: Reply with quote

I have been using several of these tools for the past few years. In my opinion not
many of these tools are mature enough to be used on a large scale design.

-ncr
Back to top
View user's profile Visit poster's website
alexg
Senior
Senior


Joined: Jan 07, 2004
Posts: 586
Location: Ottawa

PostPosted: Fri Jul 30, 2004 9:29 pm    Post subject: Reply with quote

Design size is serious limitation, and formal tool vendors realize that. So, some of them present formal tools as a powerful verification means for block-level (not chip-level) verification, where design size is more affordable.
However, 70% of users still prefer to run verification without the formal tools. The reasons for that, IMHO, may be:
1. Difficulties to formulate assertions
2. Problems with setting and trusting block-level constraints, developed to prove block-level assertions
3. Design size: block-level size is still large for the formal tools
4. Block level verification is not really popular comparing to the chip-level one.
5. Dynamic verification, enhanced with assertions, stimilus randomization and functional coverage, is sufficient enough.

Is it correct?

-Alex
Back to top
View user's profile Send e-mail
confused
Senior
Senior


Joined: Jan 09, 2004
Posts: 185

PostPosted: Sat Jul 31, 2004 7:42 am    Post subject: Reply with quote

ncr wrote:
I have been using several of these tools for the past few years. In my opinion not
many of these tools are mature enough to be used on a large scale design.


If 30% of verification engineers use them, the Synopsys position disclosed in http://www.deepchip.com/items/0430-08.html seems a bit too pessimistic. That position looks more reasonable if many in the 30% feel what ncr stated above, and it is more justified by the reasons provided by Alex. When the designs are too complex for dynamic verification, the design size problem can be more serious for formal tools. These explain why these tools are not as successful as formal equivalence checkers.

Considering all these, these tools have done very well comparing to cycle-based simulators. There must be some reasons that people became "fans" of formal tools like Magellan. Only because they do not know as much as ncr and Alex do?
Back to top
View user's profile
daveola
Senior
Senior


Joined: Jan 16, 2004
Posts: 12
Location: San Francisco, CA

PostPosted: Sun Aug 01, 2004 3:41 am    Post subject: Reply with quote

alexg wrote:
However, 70% of users still prefer to run verification without the formal tools. The reasons for that, IMHO, may be:...


My take is that the number one reason is lack of understanding/training.

It takes a bit of work to learn about and understand formal tools, but the results can be enormous. I switched to formal tools for block verification, and once I got around the learning curve the results were massive.
_________________
DaveSource Consulting
http://DaveSource.com/
Back to top
View user's profile Visit poster's website
alexg
Senior
Senior


Joined: Jan 07, 2004
Posts: 586
Location: Ottawa

PostPosted: Thu Aug 05, 2004 3:52 pm    Post subject: Reply with quote

Quote:
There must be some reasons that people became "fans" of formal tools like Magellan. Only because they do not know as much as ncr and Alex do?


Even for "fans", I still believe that it would be a good idea to have realistic expectations about the technology and it's capabilites.

Here is a dilemma:
Formal tools provide Complete confidence that given property is true (in a case we also have complete confidence about constraints we set to verify it). However, formal methods suffer from state explosion problem which limits size of design and clock cycles. In most cases, formal methods fail to check the datapath (including for example packet CRC calculation), being more robust checking control logic such as arbiters.

Dynamic simulation, on the other hand, does not provide Complete confidence that given property is true. Such methods as randomization + functional coverage may significantly increase this confidence, but still not to that level as formal tools provide. However, there are no limitations on design size & simulation time as formal tools have.

I strongly believe that formal languages must be used once writing Specification documents, and formal tools - once writing implementation code. These are the excellent means to help designers to verify low-level features of design blocks and to help chip architects to validate the partial model of the system before implementing it.
For verification engineers, however, there are some problems associated with formal tools usage. Verification plan, written based on Design Spec, usually does not contain those low-level features designers are targeting. More high-level features, specified in the verification plan, require more design size and time to be executed. Many of them correspond to the datapath or the mix of datapath and control logic, making formal verification of these features almost impossible.

So, Formal tools cannot replace dynamic verification and in most cases cannot even reduce the efforts for the dynamic Testbench creation. Limitations of the formal tools also require from verification engineer to take white-box approach and dig into the low-level design logic, which seems to me as not the best choice for verification methodology.

Comments? Thanks.
Back to top
View user's profile Send e-mail
confused
Senior
Senior


Joined: Jan 09, 2004
Posts: 185

PostPosted: Sat Aug 07, 2004 7:50 am    Post subject: Reply with quote

alexg wrote:

So, Formal tools cannot replace dynamic verification and in most cases cannot even reduce the efforts for the dynamic Testbench creation. Limitations of the formal tools also require from verification engineer to take white-box approach and dig into the low-level design logic, which seems to me as not the best choice for verification methodology.

There seem some solid reasons that formal tools do not work well for testbench-based verification. How about assertion-based verification?

Here, I classified verification into assertion-based and testbench-based. I am not sure what this classification implies. Are they alternatives to each other or complementary?

With assertions, formal tools' disadvantages seem less critical. I am not sure why. Perhaps assertion-based verification itself plays less critical roles than testbench-based verification. This seems the reality now. I wonder how much the importance of assertion-based verification can grow. A reason to use assertions is to get more applications of formal tools, but there are other reasons. The importance of all these reasons depends on whether testbench-based verification is good enough. Then it becomes very much philosophical.
Back to top
View user's profile
alexg
Senior
Senior


Joined: Jan 07, 2004
Posts: 586
Location: Ottawa

PostPosted: Sun Aug 08, 2004 6:21 pm    Post subject: Reply with quote

Quote:
Here, I classified verification into assertion-based and testbench-based


Does it mean that "assertion-based" is white-box verification and "testbench-based" is black-box one? In other words, how verification engineers treats the DUT?
In my opinion, verification engineers cannot treat DUT as a White Box since they don't know much (and probably shouldn't want to know much) about DUT implementation logic. Usually, they are interested in DUT interface signals, internal buses, some of block interface signals, registers, important state machines and FIFO pointers. The interest to monitor/check/cover these signals stems from the Chip Design Spec or Verification Plan and not from communication with designers. So, Verification Engineer have only choise between Black-box and preferably Grey-box verification approach.
On the other hand, designer, who implements some important low-level features, may be interested to know that these feature never fail. Only designers have this unique ability to define and implement checks for these features, because usually they are not documented in the Chip Spec. Since these features are also not included into Verification plan, their checks doesn't have measurable influence on the whole verification task.
Formal tools usually target verification of such low-level RTL features. Definitely, it allows to find some deep bugs, making RTL code to be more functionally robust. However, this will not have much influence on the regular verification process - from Verification plan, and up to the TestBench and tests creation.

In any case, I believe it is very important to turn "grey-box" to the reasonably measured and checked "white-box" with designer's help.
Formal tools (used preferably by designers) may also catch some deep bugs which verification engineers may miss.
Back to top
View user's profile Send e-mail
Darren
Senior
Senior


Joined: Jan 06, 2004
Posts: 32
Location: Bristol, England

PostPosted: Wed Aug 11, 2004 3:58 am    Post subject: Reply with quote

Firstly, there is a problem with the statistics in the ESNUG report - it doesn't allow you to reply if you use something else. I use an in-house tool called GateProp which was originally developed by Siemens, and as formal tools go, it's excellent.

Formal verification is necessary for block level verification, and I believe that it compliments random verification very nicely, and I would refer you to a paper written by Mike Bartley, Tim Blackmore and myself, published at DAC 2002, which compares directed, random and formal approaches on a bus bridge. Yes, formal verification is constrained by the size of design it can handle, and the need to define a legal start state. We solved some of this by always starting from reset. This limited us to exploring the state within 15 cycles of reset, but this proved deep enough. The formal tool found the extreme corner cases which would have been very difficult to hit randomly (or simply taken a lot of simulation), and the random tool enabled us to find the easy bugs quickly to enable the formal tool to explore the design properly. If the random tool hadn't been used, the formal tool would have found the same bugs, and it often did, but usually with scenarios so bizarre that working out what was the root cause was often difficult. The random tool tended to find slightly simpler entry routes to the problem.

In addition, you can use the formal tool to prove that you have really fixed a bug found randomly. If a bug is found with the random tool, the designer changes the design to "fix" it. You re-run your random test with the same seed, and the test passes. Have you really fixed the bug, or have you moved the entry point to some other place? Have you fixed all of the entry points? If you can write a property to describe the bug, you can then use the formal tool to prove that you have fixed the bug in all cases.

Assertions
Assertions should be both black box and white box - not either/or. Assertions should be considered in 2 parts.

Black box - these should be written by verification engineers from reviewing the specification. The specification should describe all of the interfaces and interface behaviours, and it is this that the verification engineer should be hoping to check without recourse to the internals of the design.

White box - these should initially be written by the designer, and should aim to describe the intent behind what the designer has implemented. They should capture any assumptions that the designer has made (such as block x will always assert signal z after signal y), and any particularly complex areas of the design. These assertions help to increase the observability of the design during debug (if an assertion fires, it's a great way to pinpoint the failure with more exactness, rather than tracing back from the outputs, if the failure even makes it that far), and document assumptions that were made.

Once the initial test plan has been implemented, then the verification engineer can perhaps start developing white-box assertions to check the design based on the knowledge gained so far. However, performing white-box assertion verification before then could perhaps influence the verification engineer to test what has been implemented, rather than what was specified.

Assertions don't have to be written from scratch - you can re-use your formal environment at this point. To get the formal environment correct, you typically have to describe the legal behaviour which the formal environment can subject your DUT to. These are assumptions about the inputs. Each of these assumptions can be coded up as assertions within your design. This has additional benefits - not only do you get additional assertions to check your design, but you are also verifying the correctness of your formal environment.

This approach can be of particular benefit when testing modules which are particularly complex. It may be the case that you have to overconstrain the inputs of your module in order for the formal verification to be able to reach a sufficient state depth. In these cases, you can take the property you are using and code it as an assertion within your HDL, or within your random verification environment. You can then run the same property in the normal system. In this way we found bugs within the design which we couldn't hit in the formal tool (the state space had been reduced to make the problem manageable), but could randomly. In addition, the property pin-pointed the failure location - the failure took 100s of clock cycles to make it to the visible outputs of our processor, but the property immediately pin-pointed the interface at which the failure occurred.


Formal verification is NOT as difficult as people make out, and to a large extent I blame the EDA vendors themselves, and the conference circuit. At DAC, sessions on formal verification aren't really about formal verification - they are about the mathematical techniques used within the tools themselves. You don't need to know this. After all, you don't need to understand the optimisation techniques used within your simulator in order to use it. You don't need a PHD in mathematics either - I don't have one. The languages used by the tools themselves are usally quite simple once learnt, and the best example I can give is when I used our inhouse tool for the first time. Our expert showed me the language, and how to construct a property. Within half an hour I had found my first bug within the design. Formal tools can be very easy to use - it is up to the vendors to make this clearer. Having people on DAC panels (as at DAC last year) saying that you need huge teams and one very smart person to use it does the field a huge disservice. On the block discussed in the paper mentioned above, we had a team of three. It worked wonderfully.
Back to top
View user's profile Send e-mail
confused
Senior
Senior


Joined: Jan 09, 2004
Posts: 185

PostPosted: Thu Aug 12, 2004 7:18 pm    Post subject: Reply with quote

Darren wrote:
Yes, formal verification is constrained by the size of design it can handle, and the need to define a legal start state. We solved some of this by always starting from reset. This limited us to exploring the state within 15 cycles of reset, but this proved deep enough.

I wonder whether most design blocks can be well verified within 15 cycles.

Darren wrote:
It may be the case that you have to overconstrain the inputs of your module in order for the formal verification to be able to reach a sufficient state depth. In these cases, you can take the property you are using and code it as an assertion within your HDL, or within your random verification environment. You can then run the same property in the normal system. In this way we found bugs within the design which we couldn't hit in the formal tool (the state space had been reduced to make the problem manageable), but could randomly.

So, people sometimes are supposed to only partially rely on formal verification. When to give up on fully relying on formal verification? Intel peopleat last year's DAC used "decomposition strategies" because the team's mission does not include any simulation at all. Other people can give up too soon or too much (so that they hardly rely on formal verification). It sounds even trickier than what I read in DAC papers.
Back to top
View user's profile
Darren
Senior
Senior


Joined: Jan 06, 2004
Posts: 32
Location: Bristol, England

PostPosted: Mon Aug 16, 2004 9:41 am    Post subject: Reply with quote

Doing the formal verification isn't so difficult - it is the size of the problem you are trying to prove. The more state there is in a design, the more difficult it is to exhaustively prove everything. In the case I mentioned above where we took the property and used it dynamically, the extra couple of signals which were checked dynamically and were constrained in the formal environment were enough to cause the state space to explode.

There are ways around this. You can try to make your properties simpler and prove subsets, and then inherit the proof upwards. But not all things can be reduced this way. Secondly, you can define all of the legal states. This prevents the formal tool from starting in illegal states and then getting false positives, but is difficult to do for any design of moderate size. The Averant tool Solidify attempts to do this, and uses the illegal states it finds as a constraint, but the resulting proof speed wasn't any better than the tool we normally use which doesn't do this.

I don't believe we can yet rely on formal verification to fully verify blocks. However it is a useful addition to the verification armoury. You need to work out where it can be best applied given the cost/benefit of introducing it. We have found it extremely good at handling bus bridges, which have limited pipeline depths internally. It can be more difficult to apply to processor blocks. Mind you, the European Union has just sponsored a group to verify formally a processor to prove formal techniques, and they claim it can be done in two years. But then this team has experts in it who write the tools, so they are far better at it than I.........
Back to top
View user's profile Send e-mail
tblackmore
Senior
Senior


Joined: Jan 23, 2004
Posts: 43
Location: Bristol, England

PostPosted: Mon Aug 23, 2004 4:06 am    Post subject: Reply with quote

I think it may be worth differentiating between formal verification and semi-formal verification.

Semi-formal verification (a.k.a. dynamic formal verification and amplified simulation, amongst other names no doubt) starts from a known state and proves a property holds for as many clock cyles as possible from this known state (the number of clock cycles being the proof-radius of the property). The start state can be the reset state, or it can be a state read in from a simulation trace. The proof-radius depends both on the complexity of the block and the complexity of the property - so it may be 15 cycles as Darren mentioned above for the most complex properties on complex designs, and it may be a good deal more. Also the capability of reading in states from simulations means that the bug does not have to be findable within 15 cycles from reset - although it would probably surprise people familiar with only simulation just how many bugs can be forced to become manifest within 15 cycles from reset by a formal tool.

Formal verification attempts to prove a property holds for all time. The most feasible way to do this is to start from a 'generic' start state. This then describes relationships between the inputs and registers of the design algebraically. Since currently available formal tools cannot determine all of these relationships for even a reasonably complex block it is normally necessary to do this manually. This makes the task much more difficult than semi-formal verification but it is still tractable. As Darren says a complete modern processor design is currently being formally verified, although I think the estimated time is something over three man years and the project is being sponsored by the German government. I wonder if this investment is suggestive of a difference in attitude towards fromal verification between Europe and the rest of the world, with Europe being ahead in this instance. A contentious viewpoint no doubt.

From my experience over the last four years, semi-formal verification is a powerful way to find bugs. It can be applied to any block whose interfaces are understood (and preferably documented) - whether these interfaces are standard busses or an internal interface in a processor. It is a relatively easy way into formal verification, although possibly requires a certain mindset to be utilised to its full potential (but does not require a Ph.D. in Maths). Formal verification is more than just a way to find bugs - it actually verifies rather than 'falsifies' a design. In the absence of formal engines capable of a full reachable state analysis of a design it is at present an 'assisted code review' and requires a good deal of mental effort. Idon't think that this is a good reason not to use it though.
Back to top
View user's profile
confused
Senior
Senior


Joined: Jan 09, 2004
Posts: 185

PostPosted: Mon Aug 23, 2004 10:07 pm    Post subject: Reply with quote

It seems safe to assume that all verification tools are helpful. It is also generally good to assume that the exhaustive verification of a modern design is not practical (though it might be different for some special projects). Even Intel only formally verifies some parts of its processors.

For small blocks, the "old fashioned" approach is to manually provide input waves for some typical scenarios and visually inspect the circiut behavior. Most RTL classes are probably still taught this way. These blocks can likely be exhaustive verified, but many managers do not have enough schedule time or tool budget for most of their engineers to do so. If such "old fashioned" simulation is not solid enough, more solid verification is done after integrating all blocks together.

For the whole chip or very big blocks, more serious verification is done with a testbench for each group of typical scenarios. Now, there is no way to exhautively verify the whole thing. Assertions / properties / semi-formal tools are all helpful. However, they hardly reduce any testbench / simulation work, and it is hard to tell how much assertion / property / semi-formal effort is enough. Therefore, these "new things" become just "above and beyond" or extra credits.

I wonder why the above situation would not become typical in the industry.
Back to top
View user's profile
tblackmore
Senior
Senior


Joined: Jan 23, 2004
Posts: 43
Location: Bristol, England

PostPosted: Tue Aug 24, 2004 3:51 am    Post subject: Reply with quote

Quote:
However, they hardly reduce any testbench / simulation work, and it is hard to tell how much assertion / property / semi-formal effort is enough. Therefore, these "new things" become just "above and beyond" or extra credits.


Whether or not assertions and semi-formal verification reduce simulation work is probably quite project dependent. It may be hard to measure how much functional coverage they give, and hence how much simulation they can save, and it would be interesting to hear about how these techniques have been employed to reduce simulation effort. Formal verification is quite different though. It really can replace simulation altogether at block level.

However, even given that assertions and semi-formal verification do not reduce simulation effort, it doesn't follow that they are "above and beyond". Having a large confidence in the correct functionality of each of the blocks used on a chip is essential. If a chip has 10 blocks, then 99% confidence in each block multiplies up to 90% confidence in the chip, whereas 95% confidence in each block results in only 60% confidence at chip-level (not including integration issues). So verifying each block as completely as possible is absolutely essential. This is especially true when the block may be re-used, and so is particularly important for third party IP. It may not be necessary to use formal techniques on each block (although I'd say assertions on each block, to be checked during simulation, were pretty much a given), but formal techniques should be used where they are likely to give the best return for time - difficult blocks, or blocks whose correct functionality is essential, or indeed blocks intended for re-use.

How much formal and/or semi-formal verification is carried out probably depends on how seriously a company takes its verification. But I think that they are becoming more than just a nice-to-have and form an essential part of a verification strategy aimed at producing chips that are right first time.
Back to top
View user's profile
confused
Senior
Senior


Joined: Jan 09, 2004
Posts: 185

PostPosted: Wed Aug 25, 2004 6:21 am    Post subject: Reply with quote

tblackmore wrote:

Formal verification is quite different though. It really can replace simulation altogether at block level.

This is theoretically true, but I do not know how practical it is.

Everybody can learn to use formal verification tools to verify some properties, and everybody can learn to write some properties. However, there is a difference between verifying some properties and verifying a block.

There are many difficulties to assure that the correctness of the properties is equivalent to the correctness of the block. (1) The properties cannot be too complex to formally verify. (2) The correctness of a block is traditionally not formally and completely defined. (3) The complete definition of a block's correctness involves assumptions about its neighbors. (4) It can be challenging to completely prove the equivalence between the set of properties and the formal definition of the block's correctness.

There can be other difficulties. I wonder how people handle these issues if they do not just rely on code review, the least formal kind of verification. I am not sure a normal PhD in Math can handle this. Though any engineer can do this for very small blocks (gates, adders, etc.), it seems impractical if the design has to be divided into 10,000 blocks. It seems fine if a chip can be formally verified as 10 blocks. How about 300 blocks?

Of course, it can still replace simulation even if the block's correctness is not completely verified. Then the issue becomes how thorough the 2 approaches are and how costly they are. As people do not do the exact same thing with any of the approaches, I do not see any objective ground to compare them. Therefore, different people will make different decisions without being able to convince each other.
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Verification Guild Forum Index -> Assertions All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can 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.538 Seconds