Putting It All Together: Using Formal Verification In Real Life Erik Seligman CS 510, Lecture 19, March 2009.

Slides:



Advertisements
Similar presentations
1 IP-Based System-on-Chip Design 2002 IP Reuse Hardening via Embedded Sugar Assertions Erich Marschner 1, Bernard Deadman 2, Grant Martin 1 1 Cadence Design.
Advertisements

Using Formal Verification to Replace Mainstream Simulation Erik Seligman Intel Brandon Smith Intel
© Copyright 2013 Xilinx. How to Kill 4 Birds with 1 Stone: Using Formal Verification to Validate Legal Configurations, Find Design Bugs, and Improve Testbench.
Hub The Only Co-Simulation Tool of Its Kind on the Market The Only Co-Simulation Tool of Its Kind on the Market.
The Design Process, RTL, Netlists, and Verilog
Handling Complexity in FEV Erik Seligman CS 510, Lecture 6, January 2009.
Clock Domain Crossing (CDC)
CS 510 Lecture 16: Verification Case Studies: Evolution From SVA 2005 to SVA 2009 Adapted from DVCon 2009 paper by Eduard Cerny 1, Surrendra Dudani 1,
Introduction to Formal Property Verification (FPV)
FPV For Design Exploration Erik Seligman CS 510, Lecture 11, February 2009.
System Integration Verification and Validation
Systematic method for capturing “design intent” of Clock Domain Crossing (CDC) logic in constraints Ramesh Rajagopalan Cisco Systems.
Automated Method Eliminates X Bugs in RTL and Gates Kai-hui Chang, Yen-ting Liu and Chris Browy.
Xiushan Feng* ASIC Verification Nvidia Corporation Automatic Verification of Dependency 1 TM Jayanta Bhadra
Timing Override Verification (TOV) Erik Seligman CS 510, Lecture 18, March 2009.
1 Speed, Drunkenness, and the Wall Does High Level Design/ESL Make Sense? Kris Konigsfeld Sr. Principal Engineer Oregon CPU Architecture Intel Corporation.
Implementing Rule Checking Early in the Design Cycle to Reduce Design Iterations and Verification Time Kent Moffat DesignAnalyst Product Manager Mentor.
Leveraging Assertion Based Verification by using Magellan Michal Cayzer.
On-the-fly Synthesis of Multi-Clock SVA Jiang Long Andrew Seawright Paparao Kavalipati IWLS’ 2008.
The Future of Formal: Academic, IC, EDA, and Software Perspectives Ziyad Hanna VP of Research and Chief Architect Jasper Design Automation Ziyad Hanna.
The Design Process Outline Goal Reading Design Domain Design Flow
Design For Verification Synopsys Inc, April 2003.
1 Assertion Based Verification 2 The Design and Verification Gap  The number of transistors on a chip increases approximately 58% per year, according.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
Illinois Institute of Technology
Logic Design Outline –Logic Design –Schematic Capture –Logic Simulation –Logic Synthesis –Technology Mapping –Logic Verification Goal –Understand logic.
Chapter 1 Principles of Programming and Software Engineering.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Implementation. We we came from… Planning Analysis Design Implementation Identify Problem/Value. Feasibility Analysis. Project Management. Understand.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Introduction to Software Testing
User Centered Design Lecture # 5 Gabriel Spitz.
Churning the Most Out of IP-XACT for Superior Design Quality Ayon Dey Lead Engineer, TI Anshuman Nayak Senior Product Director, Atrenta Samantak Chakrabarti.
VerificationTechniques for Macro Blocks (IP) Overview Inspection as Verification Adversarial Testing Testbench Design Timing Verification.
Copyright © 2004 by Doulos Ltd. All Rights Reserved Experiences of a PSL Educator John Aynsley, Technical Director.
Streamline Verification Process with Formal Property Verification to Meet Highly Compressed Design Cycle Prosenjit Chatterjee, nVIDIA Corporation.
TM Efficient IP Design flow for Low-Power High-Level Synthesis Quick & Accurate Power Analysis and Optimization Flow JAN Asher Berkovitz Yaniv.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
ON LINE TEST GENERATION AND ANALYSIS R. Šeinauskas Kaunas University of Technology LITHUANIA.
Classics Of FPV Erik Seligman CS 510, Lecture 10, January 2009.
ASIC/FPGA design flow. FPGA Design Flow Detailed (RTL) Design Detailed (RTL) Design Ideas (Specifications) Design Ideas (Specifications) Device Programming.
1 Integration Verification: Re-Create or Re-Use? Nick Gatherer Trident Digital Systems.
Some Course Info Jean-Michel Chabloz. Main idea This is a course on writing efficient testbenches Very lab-centric course: –You are supposed to learn.
The First in GPON Verification Classic Mistakes Verification Leadership Seminar Racheli Ganot FlexLight Networks.
1 Hybrid-Formal Coverage Convergence Dan Benua Synopsys Verification Group January 18, 2010.
Lach1MAPLD 2005/241 Accessible Formal Verification for Safety-Critical FPGA Design John Lach, Scott Bingham, Carl Elks, Travis Lenhart Charles L. Brown.
© 2006 Synopsys, Inc. (1) CONFIDENTIAL Simulation and Formal Verification: What is the Synergy? Carl Pixley Disclaimer: These opinions are mine alone and.
Business Trends and Design Methodologies for IP Reuse Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan, R.O.C {
Unique Methodology. Highest Coverage. Fastest Time to Market. Formal Verification in the Industry: a 2020 Vision VIGYAN SINGHAL Oski Technology.
Assertions Jean-Michel Chabloz. Assertions basic Idea We assert that a certain “thing” should be true. –If it is true, fine –If it is false, then we get.
CHAPTER 8 Developing Hard Macros The topics are: Overview Hard macro design issues Hard macro design process Physical design for hard macros Block integration.
ECE-C662 Lecture 2 Prawat Nagvajara
© Copyright Alvarion Ltd. SVA Dafna Senderovich Jan 2006.
Evaluating Requirements
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
FEV And Netlists Erik Seligman CS 510, Lecture 5, January 2009.
Equivalence checking Prof Shobha Vasudevan ECE 598SV.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Cookie-cutter properties to assist non Formal experts Bin Xue.
Introduction to System Verilog Assertions
Digital System Verification
Alon Flaisher Alon Gluska Eli Singerman Intel Corporation
Introduction to Software Testing
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
FEV’s Greatest Bloopers: False Positives in Formal Equivalence
Using Formal Coverage Analyzer for Code Coverage improvement
Cool FPV Tricks: Reaching Deep Bounds With Not-Quite-Formal Methods
Presentation transcript:

Putting It All Together: Using Formal Verification In Real Life Erik Seligman CS 510, Lecture 19, March 2009

Agenda  Motivation  FEV Advice  Assertion-Based Verification  FPV Advice  CDC & TOV  Conclusions

Agenda  Motivation  FEV Advice  Assertion-Based Verification  FPV Advice  CDC & TOV  Conclusions

Motivation  Class has examined formal tools  But if you adopt a tool, will it be used? Common mistake: ‘toss over wall’ to team Sometimes hard for naïve user Sometimes easy to misuse tools  Need to think about plans & methods Plan from beginning for FV success Be aware of changes of mindset Be aware of dangers of tool misuse

Simulation: spot coverage of design space Review From Lecture 1

Formal Verification (ideal case): full coverage of design space Simulation: spot coverage of design space Review From Lecture 1

Formal Verification (ideal case): full coverage of design space Simulation: spot coverage of design space Review From Lecture 1 Formal Verification (real life): full coverage in some areas

Agenda  Motivation  FEV Advice  Assertion-Based Verification  FPV Advice  CDC & TOV  Conclusions

Is FEV ‘Automatic’?  Well-accepted on design teams  Key to ensuring correct validation overall Main validation target == RTL But silicon better represented by netlist So need to make sure RTL==netlist  Opportunities in other areas RTL-RTL, netlist-netlist incremental checks  But are there dangers?

Remember FEV Challenges  Not-quite-state-matching elements Scan, minor retiming, clock gating, …  Opportunities for ‘Bloopers’ Unchecked constraints Conflicting constraints Blackbox and library confusion Unreachable points Obscure tool behaviors (multi-drive handling)

FEV Advice  Plan for FEV from beginning Have overall view of chip FEV & find holes  Teams should have central FEV expert Know how to handle state-matching variation Understand tool quirks Understand complexity techniques  FEV runs should be saved & auditable Always audit logs before tapeout

Agenda  Motivation  FEV Advice  Assertion-Based Verification  FPV Advice  CDC & TOV  Conclusions

Assertions: Part of the Design Process  Define standard assertion note // Assertion a123: Check for legal grants;  Designer adds: spec, testplans, RTL Assertion idea != interrupt thought flow  Assertion expert role Scripts to collect assertion notes Help designer implement/focus  Assertions: casual & easy Pitfall: Avoid requirements seen as penalty –“Must eventually prove X% formally”

“Free” Assertions  Reuse blocks  standard assertions Intel chipset group: form for std FSM Tool creates RTL template + assertions, covers –FSM never stuck –All states reachable  Assertion packages with IP building blocks AMBA, PCI asserts from vendors? Develop asserts for internal standards

Encouraging Useful Assertions  Focus on high-level intent Assertions = “executable comments” Add insight to design –Micro-assert on a couple of RTL lines less useful  Don’t be afraid of some modeling code Auxiliary calculations / wires are fine –Provide `ifdef to exclude from synthesis Full reference models in areas of concern Smaller “shadow models” often very useful

“Shadow Model” Example (PCIE) Link/Transaction Layer Interface (RTL under test) DWORD 1 DWORD 2 DWORD 3 TRANSACTION Not full ref model, but enables good asserts End of transaction  commit within n cycles FV found serious chipset bugs missed in sims! Shadow Model: transaction end?

Challenges Of SVA  Assertion languages like SVA often too general Designed by PhDs to cover all cases Provide building blocks, not designer tools Average designer has hands full  Examples of SVA gotchas Glitch dangers or b) assert (a != b); Sequences vs triggering assert property (a ##1 b); assert property (a |=> b); Operator definitions assert property (s1 and s2); assert property (s1 intersect s2);

Solution: Assertion Libraries  Don’t require use of ‘raw’ SVA  Provide library encapsulating common situations  Improves usability & readability

Popular Library Solution: OVL assert_always #(`OVL_ERROR,`OVL_ASSERT,“Bogus grant") a1(clk, reset_n, req||!grant);  Each assert is a cleanly defined module Implementation uses SVA at core  Good, but still room for improvement Modules can’t be used in SV procedures All arguments need to be typed Need to explicitly specify clk/rst Combo asserts can still glitch if misused

Need For Assertion Locality clk) begin … if (foo) begin … if (bar) begin … … v1 <= messy_function(b,c,d,e,f); // want assertion on v1 here … … end … end … end // OVL assertion on v1 has to go here!

Improved SVA Libraries `ASSERT_VERIFY(req||!gnt,clk,rst) `ERR_MSG(“Bogus grant”);  Macro version: improvements over OVL Macro can be placed in procedural code Arguments can be any type (even property)  Most Intel projects moved to macro library  IEEE p providing SVA extensions Checkers, inferred clks, LTL, etc. Will enable fully parsed library with same benefits

Agenda  Motivation  FEV Advice  Assertion-Based Verification  FPV Advice  CDC & TOV  Conclusions

Effective Formal Property Verification: Prerequisites  Include FV in testplans Part of validation, NOT out-of-band ‘extra’ Pick good FV battles: – Size OK, many corner cases, reasonable design Decide on goals: bug hunting or full proofs?  FV by model expert FV reveals obscure corner cases Need deep understanding  Cover points need to be in place Describe typical “interesting” situations Help judge FV env effectiveness

Preparing The FV Infrastructure  FV is different for a simulation team “Plug & Play?”– sort of, but watch details…  Choose highly usable tools Main FV debug activity: analyze counterexample –Counterexample = waveform violating assertions –Fancy debug: Wave views, what-if, multi-cex? Same assertions in FV and simulation  Project-specific glue Wrapper scripts based on simulation env Set up default clock/reset config

Starting FV On A Design  Initial runs are a feasibility test Complexity of FV hard to predict –Not proportional to transistor count –Small arithmetic can be very hard! If time/memory explodes, reconsider –Lower hierarchy? –Blackbox/prune parts of model?  Also, look early at cover point proofs FV tool hits each cover point? Cover point not reachable  overconstrained! –Important quality check –Repeat after new assumptions added

Assumption Creation Loop: Majority of FV Time  Mindset change from sim; prepare team! Early runs have many false negatives  More assumptions == more interesting CEX Interesting bugs not found on first run Several rounds of assumes  deep traces Be sure to check assumptions too, in simulation or FV Analyze Failures Run FV Add Assumes

Assumption Count Exploding?– Don’t Give Up Yet  Possible bad choice of boundary Effectively reimplementing neighbor block?  Consider increasing hierarchy level Add upper level & many blackboxes?  Also consider simplifying problem Only cover certain modes –Example: PCIE: prove for x16, not x4, x8? Restrict data –Will one nonzero bus bit test most major logic? –Are fully general packet payloads needed?

Example: FV too hard? MPE0 MRA1 MRA0 MPE1 MPE = Memory Protocol Engine MRA = Memory Read Arbiter

Correct Hierarchy Makes FV Easy MPE0 MRA1 MRA0 MPE1 MSB

Complexity Issues (Time,Memory)  As mentioned before, hard to predict Issue may appear after adding assumptions  Various strategies available Try running at lower hierarchy Consider blackboxing or freeing logic Restrict modes or data Reduce size of parameterized elements Intelligent pruning  Eventually may need to waive Again, don’t give up too soon FV of partial design space still useful!

Bounded vs Full Proofs  Which of these do you need? “Assertion can NEVER be violated” “Assertion can never be violated by any possible simulation of length up to ”  Bounded proof usually easier for tools Use cover point proofs to judge good bound Bound == lengths of interesting scenarios Some coverage lost vs full proofs –But often at point of diminishing ROI  Consider modifying starting state Fill queue at start of proof…? Targeted cover point proof as starting state for next FPV run

Consider FPV At Various Project Phases  Early design Excellent tool to understand RTL modules Allows what-if experiments at any hier level  Validation Include in validation plans Can greatly improve coverage of design –Complete coverage of some subspace!  Late bugs / Post-silicon Use FPV (guided by cover points) to replicate unexpected errors “Heroic” FPV effort may be justified –If late error found that was missed by other methods

Agenda  Motivation  FEV Advice  Assertion-Based Verification  FPV Advice  CDC & TOV  Conclusions

CDC & TOV  Niche techniques using formal methods Small, specialized problems But huge impact from avoiding bugs! –Failures create intermittent silicon issues  Understand opportunities & apply! Know your CDC tools, use effectively –Set parameters to minimize false positives Have plan for TOV verification –Even without CAD tool, can create assertions –Check assertions in sim if FPV too hard

Agenda  Motivation  FEV Advice  Assertion-Based Verification  FPV Advice  CDC & TOV  Conclusions

Conclusions  Formal Verification techniques have reached maturity Usable by non-PhDs Usable by design engineers  Significant opportunities for ROI Complete coverage of part of design space Like running exponential number of tests  Be ready for the opportunities! Enhance maturity of FEV usage Understand Assertions, FPV, CDC, TOV –Introduce to design team when applicable Don’t be scared off by usage models –Different from current methods, but not really that hard

References / Further Reading  8&EntryID= &EntryID=19314    gman.pdf gman.pdf 