SlideShare a Scribd company logo
1 of 24
Download to read offline
Managing Deployment of SVA
      in your Project

         Raj Dayal
DVClub: RTP, North Carolina
     June 20th, 2007
Raj Dayal
Raj is currently working for Qualcomm Corp. Processor
Solutions Group in Cary , NC where he is responsible for
Processor Verification, tools and Methodologies development.

Prior to joining Qualcomm, Raj held a number of Design and Verification Team Lead positions at
         Ivivity ( Storage Processor startup in Atlanta), Verification Manager.
         Vitesse Semiconductor – ( Internet Traffic Management QoS - startup
         Orologic) Verification Lead.
         Broadband Technologies – ( Fiber to Curb SONET Framer), Lead Design
         Engineer
         Avant! (now Synopsys) – CAD Tools Developer.
         IBM PC Company in RTP Area – Device Driver Development.

Raj worked as an ASIC Design Engineer in IBM Interconnect Division in Mid Hudson Valley,
upstate New York.

Raj has lectured a few courses in C Programming and LAN in Wake County Community College.

Raj received his MSEE from Syracuse University and BSEE from NJ Institute of Technology.
Agenda
Why Assertions ?
– Effectiveness
– Why it is not used ?
Deployment Recommendations
Effectiveness
Key Issues Addressed
Summary
SVA Assertions
A piece of verification code used to check a
property
– correct/illegal behavior
– assumptions/constraints
– coverage goals

Examples:
     Interface A must follow the AMBA AXI protocol
     Bus B must be one-hot
     The FIFO must never overflow
     I want to see back-to-back reads/writes
     Write will follow read by 3 cycles
Assertions for Reuse
Use Assertions as a focal point of Specification

                                                       Reuse
                        Assertions
 Assertions




                           Block A                     Add assertions at interfaces
                                                       between blocks and at chip
                                                       interface. Those assertions are
                      Assertions                       useful at block level and are reused
                                                       at chip level and from one project
                                                       to another.
                             Assertions
 Assertions




              Block B                     Block C      Dynamically check the validity in
                                                       simulation
                                                       Analyze/prove the validity formally
              Assertions                  Assertions
                                                       Utilize coverage metrics linking back
                                                       to specification
                                                       It is a white box method of
                                                       verification.
              Block         ➠ Chip
Productivity Gain of Using
                                 Assertions
                  9
                               Productivity Gain
                  8
Bugs Found
Number of




                  7                                            Directed

                  6
                  5                                            Cover Properties
 properties hit
 Cover




                  4
                  3                                            Assertions with
                                                               Cover Properties
                  2
                  1
                  0
                      1    3   5       7       9   11   Time
Assertions Benefits
Assertions describe intended specification unambiguously
Assertions reused across a broad range of verification tools
 – Simulation -- Coverage – Testbench -- Formal
Makes debug more efficient
 – Flags errors immediately
Major Benefits of SVA we observed in our project.
1. error detection and reduced debug time due to observability
2. improved integration of modules, units, cores because of built-in self-
checking
3. improved communication between Designers, Verification Engineers and
architects.
4. Better Documentation - helped clarify and define all assumptions and various
ways to interpret specifications up front.
5. Use of SVA covers helped us achieve functional coverage goals.
6. Use of SVA covers guided us to find holes early on and direct our random
generation tool to hit those areas.
Why SVA is not used
          40

          30
Percent




          20

          10

           0
                EXCUSES

               Not Enough TIME
               RTL Hard to Read
               SVA not Synthesizable
               Slow Down Simulation
               It's not my Job
Management of Assertions
Testbench includes –
– Scorpion Design includes inline assertions imbedded in the design as
  well assertion in an external file.
      All core design has inline SVA assertions imbedded in the RTL.
      All interface SVA assertions are coded in external file for maximum re-use
      between block to unit to core to chip.
– Ability to select part of Assertions in the design during compile time.
– Ability to turn off All Assertions at run-time.
– Ability to turn off an individual Assertion at run-time.
– Ability to control how the test should end when assertion fires, number
  of cycles to continue running so enough waveform dump is captured for
  further debugging.
– Ability to control the message generated by Functional coverage.
      One can get a report stating which functional scenarios were hit and how
      many times.
      One can get cycle count when the last assertion was hit so simulation time is
      not wasted during regression time.
      Reactive testbench features are utilized to automatically turn-off coverage
      when threshold is reached for scenarios.
      For random environment, coveragehole script will analyze ( hundreds of
      tests) and report which scenarios are not covered.
Deployment Recommendation 1
 ????? Who should Write Assertions ????


                System
                            Designers
               Engineers


                    Verification
                     Engineers

 ANSWER - All of them.
 Training is a Must
 Invest in your design/verification Engineers to have proper training in
 Assertion language usage that will increase productivity throughout.
Deployment Recommendation 2
 Use `ifdef project_core_sva
          SVA Code
     `endif
Use `ifdef project_Interfacename_sva          Core
         SVA Code
    `endif

                                       Unit          Block
Use `ifdef project_blockname_sva
         SVA Code
    `endif

Use +define+project_blockname_sva+
  with your favorite Simulator
Controlling Assertions
                                         – Use of $assertkill or
             $assertoff                    $assertoff(0)

$asserton                 $assertkill    always @(rst_n)
                                         if (!rst_n) $assertkill;
               SVA
                                         else $asserton;

throughout                 Disable iff



             $plusargs
Deployment Recommendation 4
Allow for change
 – Assertion not valid or out of date.
 – Testbench should allow disabling an assertion
   at run-time by name
 – $assertoff(hierarchical.name.assertname);
 – Use a $plusarg to pass the string and if
   simulator supports $assertoff ( string)
Deployment Recommendation 5
Naming conventions and Guidelines
 – Always give a meaningful name to the
   assertion label. It will help identify exactly
   what is wrong and can be assigned quickly to
   the right person for debugging.
 – Write cover properties for all the functional
   scenarios you want to cover.
 – Use project_name_assert_or_cover_label to
   avoid name pollution with other groups.
 – Always try to constrain unbounded.
Deployment Recommendation 6
                                           Assertion Density ( assert and
      SIM time Vs Number                   cover)
                                            – In Scorpion we have about 1000
         of Assertions                        asserts embedded in RTL and
                                              about 3700 cover properties that
                                              cover the design. For more depth
            600                               we have about 400,000 cover
                                              properties that go into more
Time ( In
Seconds)




            400                               details.
                                            – Using directed tests and some
            200                               random tests we can hit these
                                              cover properties which gives us a
                                              good feedback about the assertion
             0                                density.
                  1    4     7     10 13    – The guideline here is to limit the
                                              number of assertions to less than
                      # of Covers ( In        5000 that are compiled in the
                                              simulation model and the
                        Thousands)            performance hit on simulation is
                                              minimum.
                           Build    Run
Actual compile and run-times
Deployment Recommendation 7
Managing the test finish when                              string mymsg;
                                                                  mymsg;

assertion fires.                                           l2i_a23a: assert property( @(posedge Clk)
                                                                                                Clk)
                                                                   !reset && RLDNxtCycle |-> ##1 !l2iRLDFirstCycle_Q)
                                                           else
                                                              begin
 –   SVA allows calling a task when assertion fires.
     Always call your own task where you can add                $swrite(mymsg, " %m ASSERT::At time of failure,
                                                                 swrite( mymsg,
                                                                     RLDNxtCycle is %d, l2iRLDFirstCycle_Q
     how many cycles it should continue running                      s %d", $sampled( RLDNxtCycle),
                                                                            $sampled( RLDNxtCycle),
     after the assertion fires for proper waveform                   $sampled(l2iRLDFirstCycle_Q));
                                                                     $sampled(l2iRLDFirstCycle_Q));
     dumping etc.
 –   In the Example we call assertFailDisplayMsg(
                              assertFailDisplayMsg(           assertFailDisplayMsg("l2i_a23a", mymsg);
                                                              assertFailDisplayMsg("l2i_a23a", mymsg);
     assertName, AssertMsg) as action task where
     assertName, AssertMsg)                                 end
     we pass the name of the assertion and any
     comment we want to display on the standard
     output.                                                –     $swrite is Verilog 2000 built-in function which
                                                                                          built-
 –   In the common task called by all negative                    behaves exactly same as sprintf in C and it
     assertions, one can have control over what to                prints the message in a string.
     do which includes                                      –     %m -à will get expanded to the full
           How man cycles to wait before ending the sim.
                                                    sim.          hierarchical name of the module.
           Ignore the assertion firings                           ( scorpion_tb.scorpion_top.cpu.iu.iu_l2i )
           Generate other database information for post     –     $sampled() will give you the value of signal
           processing tools such as regression
           management.                                            when the assertion fired and not the current
                                                                  one.
Deployment Recommendation 8
Managing the log files.

 – Running in a random environment when coverage
   hits are dumped can generate a lot of large log files
   and overflow you storage space. Look to control the
   ways assertion firings are reported and learn the
   simulator options to minimize the size.
 – Print the simulation build information, seed and cycles
   run in the log file for easier debugging and replay.
Deployment Recommendation 9
Validating Assertions by inserting faults
 – Add a capability to inject errors to verify that
   your checkers and assertions are active and
   catching faults.
 – This will help build quality in your testbench.
Deployment Recommendation 10
Create a library of Assertions commonly
used on your project.
Use SVA checker library by adding your
company wrappers around so it works
with different simulators.
Deployment cost of Assertions
Low effort
    Write all checks for X’s and Z’s.
    protocol operation (relationships, order, response, one-hot, etc)
    unknown values for control (at any time) and data (during transfers)
    over/underflow (FIFOs, stacks, buffers, shift registers, etc)
    legal state acquisition and transitions (Finite State Machines)

Medium effort
    data integrity (FIFOs, shared memories )

High effort
    full functionality of complex bus protocol (e.g. AMBA, PCI, AXI)

Not Worthwhile
    Computation like CRC, checksum etc
    Data order of instructions or packets
Key Issues Addressed
Simulator Support
Industry Standard
Mixed Language – Verilog, VHDL
Training – Easy to Learn
Debuggers Support
Developing Verification Environment
– Managing Assertions
– Managing Coverage
– Simulation Tool Capacity, Performance and maturity.
Summary
SystemVerilog Assertions enable true assertion-based
verification and reduce overall verification schedule.
For more effective deployment of SVA use the following
techniques.
– Training for the whole team as SVA is a team effort.
– Naming convention and coding guidelines.
– Control to enable and disable assertions at compile/run time.
– Partitioning the SVA asserts and covers as wide and deep to
  cope with the capacity of the simulators.
– Having a good unified coverage database.
– Having enough hooks in the testbench to generate data for post
  processing tools and replay, reporting, and coverage closure.
– Validating your SVA by having capability of inserting faults.
References
IEEE 1800-2005 System Verilog Language
Reference Manual
    IEEE 2005 ISBN 0-7381-4811-3
System Verilog Assertion Handbook
    Ben Cohen 2005 ISBN:0-9705394-7-9

More Related Content

What's hot

Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consult
Tomas Riha
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
Michael Palotas
 
10 Lessons learned in test automation
10 Lessons learned in test automation10 Lessons learned in test automation
10 Lessons learned in test automation
Romania Testing
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
viswaug
 

What's hot (20)

An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
 
Mobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CDMobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CD
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 
Continuous Integration (CI) - An effective development practice
Continuous Integration (CI) - An effective development practiceContinuous Integration (CI) - An effective development practice
Continuous Integration (CI) - An effective development practice
 
Software reengineering for Developers
Software reengineering for DevelopersSoftware reengineering for Developers
Software reengineering for Developers
 
The Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineThe Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the Pipeline
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consult
 
Rash
RashRash
Rash
 
Continuous integration with Jenkins
Continuous integration with JenkinsContinuous integration with Jenkins
Continuous integration with Jenkins
 
Elements of a Test Framework
Elements of a Test FrameworkElements of a Test Framework
Elements of a Test Framework
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
The Evolution of Agile - Continuous Delivery - Extending Agile out to Product...
The Evolution of Agile - Continuous Delivery - Extending Agile out to Product...The Evolution of Agile - Continuous Delivery - Extending Agile out to Product...
The Evolution of Agile - Continuous Delivery - Extending Agile out to Product...
 
Refactoring legacy code driven by tests - ITA
Refactoring legacy code driven by tests -  ITARefactoring legacy code driven by tests -  ITA
Refactoring legacy code driven by tests - ITA
 
10 Lessons learned in test automation
10 Lessons learned in test automation10 Lessons learned in test automation
10 Lessons learned in test automation
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 

Similar to Managing Deployment of SVA in Your Project

Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing Fundamentals
Richard Paul
 
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVCUpgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
FPGA Central
 
Testing in an Open Source Middleware Platform Space The WSO2 Way.
Testing in an Open Source Middleware Platform Space  The WSO2 Way.Testing in an Open Source Middleware Platform Space  The WSO2 Way.
Testing in an Open Source Middleware Platform Space The WSO2 Way.
WSO2
 
Using PSL for Assertions and Coverage at Analog Devices
Using PSL for Assertions and Coverage at Analog DevicesUsing PSL for Assertions and Coverage at Analog Devices
Using PSL for Assertions and Coverage at Analog Devices
DVClub
 
Cisco Base Environment Overview
Cisco Base Environment OverviewCisco Base Environment Overview
Cisco Base Environment Overview
DVClub
 

Similar to Managing Deployment of SVA in Your Project (20)

Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and SubversionBeyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
 
Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing Fundamentals
 
Nijanthan
NijanthanNijanthan
Nijanthan
 
system verilog
system verilogsystem verilog
system verilog
 
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
 
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVCUpgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
 
Lafauci dv club oct 2006
Lafauci dv club oct 2006Lafauci dv club oct 2006
Lafauci dv club oct 2006
 
2012 04 Analysis Techniques for Mobile OS Security
2012 04 Analysis Techniques for Mobile OS Security2012 04 Analysis Techniques for Mobile OS Security
2012 04 Analysis Techniques for Mobile OS Security
 
End to End immutable infrastructure testing
End to End immutable infrastructure testingEnd to End immutable infrastructure testing
End to End immutable infrastructure testing
 
Systematic Model based Testing with Coverage Analysis
Systematic Model based Testing with Coverage AnalysisSystematic Model based Testing with Coverage Analysis
Systematic Model based Testing with Coverage Analysis
 
Testing in an Open Source Middleware Platform Space The WSO2 Way.
Testing in an Open Source Middleware Platform Space  The WSO2 Way.Testing in an Open Source Middleware Platform Space  The WSO2 Way.
Testing in an Open Source Middleware Platform Space The WSO2 Way.
 
Kl assertions 081705
Kl assertions 081705Kl assertions 081705
Kl assertions 081705
 
Larson assertions 081705
Larson assertions 081705Larson assertions 081705
Larson assertions 081705
 
Using PSL for Assertions and Coverage at Analog Devices
Using PSL for Assertions and Coverage at Analog DevicesUsing PSL for Assertions and Coverage at Analog Devices
Using PSL for Assertions and Coverage at Analog Devices
 
Sva.pdf
Sva.pdfSva.pdf
Sva.pdf
 
Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...
 
Alcatel-Lucent Cloud: Network Functions Virtualization - The New Virtual Real...
Alcatel-Lucent Cloud: Network Functions Virtualization - The New Virtual Real...Alcatel-Lucent Cloud: Network Functions Virtualization - The New Virtual Real...
Alcatel-Lucent Cloud: Network Functions Virtualization - The New Virtual Real...
 
Cisco Base Environment Overview
Cisco Base Environment OverviewCisco Base Environment Overview
Cisco Base Environment Overview
 
Zhang rtp q307
Zhang rtp q307Zhang rtp q307
Zhang rtp q307
 
Lokesh_Resume_2016
Lokesh_Resume_2016Lokesh_Resume_2016
Lokesh_Resume_2016
 

More from DVClub

Intel Xeon Pre-Silicon Validation: Introduction and Challenges
Intel Xeon Pre-Silicon Validation: Introduction and ChallengesIntel Xeon Pre-Silicon Validation: Introduction and Challenges
Intel Xeon Pre-Silicon Validation: Introduction and Challenges
DVClub
 
Verification of Graphics ASICs (Part II)
Verification of Graphics ASICs (Part II)Verification of Graphics ASICs (Part II)
Verification of Graphics ASICs (Part II)
DVClub
 
Verification of Graphics ASICs (Part I)
Verification of Graphics ASICs (Part I)Verification of Graphics ASICs (Part I)
Verification of Graphics ASICs (Part I)
DVClub
 
Stop Writing Assertions! Efficient Verification Methodology
Stop Writing Assertions! Efficient Verification MethodologyStop Writing Assertions! Efficient Verification Methodology
Stop Writing Assertions! Efficient Verification Methodology
DVClub
 
Validating Next Generation CPUs
Validating Next Generation CPUsValidating Next Generation CPUs
Validating Next Generation CPUs
DVClub
 
Verification Automation Using IPXACT
Verification Automation Using IPXACTVerification Automation Using IPXACT
Verification Automation Using IPXACT
DVClub
 
Validation and Design in a Small Team Environment
Validation and Design in a Small Team EnvironmentValidation and Design in a Small Team Environment
Validation and Design in a Small Team Environment
DVClub
 
Trends in Mixed Signal Validation
Trends in Mixed Signal ValidationTrends in Mixed Signal Validation
Trends in Mixed Signal Validation
DVClub
 
Verification In A Global Design Community
Verification In A Global Design CommunityVerification In A Global Design Community
Verification In A Global Design Community
DVClub
 
Design Verification Using SystemC
Design Verification Using SystemCDesign Verification Using SystemC
Design Verification Using SystemC
DVClub
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-Express
DVClub
 
Efficiency Through Methodology
Efficiency Through MethodologyEfficiency Through Methodology
Efficiency Through Methodology
DVClub
 
Pre-Si Verification for Post-Si Validation
Pre-Si Verification for Post-Si ValidationPre-Si Verification for Post-Si Validation
Pre-Si Verification for Post-Si Validation
DVClub
 
OpenSPARC T1 Processor
OpenSPARC T1 ProcessorOpenSPARC T1 Processor
OpenSPARC T1 Processor
DVClub
 
Intel Atom Processor Pre-Silicon Verification Experience
Intel Atom Processor Pre-Silicon Verification ExperienceIntel Atom Processor Pre-Silicon Verification Experience
Intel Atom Processor Pre-Silicon Verification Experience
DVClub
 
Using Assertions in AMS Verification
Using Assertions in AMS VerificationUsing Assertions in AMS Verification
Using Assertions in AMS Verification
DVClub
 
Low-Power Design and Verification
Low-Power Design and VerificationLow-Power Design and Verification
Low-Power Design and Verification
DVClub
 
UVM Update: Register Package
UVM Update: Register PackageUVM Update: Register Package
UVM Update: Register Package
DVClub
 
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
DVClub
 
Verification of Wireless SoCs: No Longer in the Dark Ages
Verification of Wireless SoCs: No Longer in the Dark AgesVerification of Wireless SoCs: No Longer in the Dark Ages
Verification of Wireless SoCs: No Longer in the Dark Ages
DVClub
 

More from DVClub (20)

Intel Xeon Pre-Silicon Validation: Introduction and Challenges
Intel Xeon Pre-Silicon Validation: Introduction and ChallengesIntel Xeon Pre-Silicon Validation: Introduction and Challenges
Intel Xeon Pre-Silicon Validation: Introduction and Challenges
 
Verification of Graphics ASICs (Part II)
Verification of Graphics ASICs (Part II)Verification of Graphics ASICs (Part II)
Verification of Graphics ASICs (Part II)
 
Verification of Graphics ASICs (Part I)
Verification of Graphics ASICs (Part I)Verification of Graphics ASICs (Part I)
Verification of Graphics ASICs (Part I)
 
Stop Writing Assertions! Efficient Verification Methodology
Stop Writing Assertions! Efficient Verification MethodologyStop Writing Assertions! Efficient Verification Methodology
Stop Writing Assertions! Efficient Verification Methodology
 
Validating Next Generation CPUs
Validating Next Generation CPUsValidating Next Generation CPUs
Validating Next Generation CPUs
 
Verification Automation Using IPXACT
Verification Automation Using IPXACTVerification Automation Using IPXACT
Verification Automation Using IPXACT
 
Validation and Design in a Small Team Environment
Validation and Design in a Small Team EnvironmentValidation and Design in a Small Team Environment
Validation and Design in a Small Team Environment
 
Trends in Mixed Signal Validation
Trends in Mixed Signal ValidationTrends in Mixed Signal Validation
Trends in Mixed Signal Validation
 
Verification In A Global Design Community
Verification In A Global Design CommunityVerification In A Global Design Community
Verification In A Global Design Community
 
Design Verification Using SystemC
Design Verification Using SystemCDesign Verification Using SystemC
Design Verification Using SystemC
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-Express
 
Efficiency Through Methodology
Efficiency Through MethodologyEfficiency Through Methodology
Efficiency Through Methodology
 
Pre-Si Verification for Post-Si Validation
Pre-Si Verification for Post-Si ValidationPre-Si Verification for Post-Si Validation
Pre-Si Verification for Post-Si Validation
 
OpenSPARC T1 Processor
OpenSPARC T1 ProcessorOpenSPARC T1 Processor
OpenSPARC T1 Processor
 
Intel Atom Processor Pre-Silicon Verification Experience
Intel Atom Processor Pre-Silicon Verification ExperienceIntel Atom Processor Pre-Silicon Verification Experience
Intel Atom Processor Pre-Silicon Verification Experience
 
Using Assertions in AMS Verification
Using Assertions in AMS VerificationUsing Assertions in AMS Verification
Using Assertions in AMS Verification
 
Low-Power Design and Verification
Low-Power Design and VerificationLow-Power Design and Verification
Low-Power Design and Verification
 
UVM Update: Register Package
UVM Update: Register PackageUVM Update: Register Package
UVM Update: Register Package
 
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
 
Verification of Wireless SoCs: No Longer in the Dark Ages
Verification of Wireless SoCs: No Longer in the Dark AgesVerification of Wireless SoCs: No Longer in the Dark Ages
Verification of Wireless SoCs: No Longer in the Dark Ages
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Managing Deployment of SVA in Your Project

  • 1. Managing Deployment of SVA in your Project Raj Dayal DVClub: RTP, North Carolina June 20th, 2007
  • 2. Raj Dayal Raj is currently working for Qualcomm Corp. Processor Solutions Group in Cary , NC where he is responsible for Processor Verification, tools and Methodologies development. Prior to joining Qualcomm, Raj held a number of Design and Verification Team Lead positions at Ivivity ( Storage Processor startup in Atlanta), Verification Manager. Vitesse Semiconductor – ( Internet Traffic Management QoS - startup Orologic) Verification Lead. Broadband Technologies – ( Fiber to Curb SONET Framer), Lead Design Engineer Avant! (now Synopsys) – CAD Tools Developer. IBM PC Company in RTP Area – Device Driver Development. Raj worked as an ASIC Design Engineer in IBM Interconnect Division in Mid Hudson Valley, upstate New York. Raj has lectured a few courses in C Programming and LAN in Wake County Community College. Raj received his MSEE from Syracuse University and BSEE from NJ Institute of Technology.
  • 3. Agenda Why Assertions ? – Effectiveness – Why it is not used ? Deployment Recommendations Effectiveness Key Issues Addressed Summary
  • 4. SVA Assertions A piece of verification code used to check a property – correct/illegal behavior – assumptions/constraints – coverage goals Examples: Interface A must follow the AMBA AXI protocol Bus B must be one-hot The FIFO must never overflow I want to see back-to-back reads/writes Write will follow read by 3 cycles
  • 5. Assertions for Reuse Use Assertions as a focal point of Specification Reuse Assertions Assertions Block A Add assertions at interfaces between blocks and at chip interface. Those assertions are Assertions useful at block level and are reused at chip level and from one project to another. Assertions Assertions Block B Block C Dynamically check the validity in simulation Analyze/prove the validity formally Assertions Assertions Utilize coverage metrics linking back to specification It is a white box method of verification. Block ➠ Chip
  • 6. Productivity Gain of Using Assertions 9 Productivity Gain 8 Bugs Found Number of 7 Directed 6 5 Cover Properties properties hit Cover 4 3 Assertions with Cover Properties 2 1 0 1 3 5 7 9 11 Time
  • 7. Assertions Benefits Assertions describe intended specification unambiguously Assertions reused across a broad range of verification tools – Simulation -- Coverage – Testbench -- Formal Makes debug more efficient – Flags errors immediately Major Benefits of SVA we observed in our project. 1. error detection and reduced debug time due to observability 2. improved integration of modules, units, cores because of built-in self- checking 3. improved communication between Designers, Verification Engineers and architects. 4. Better Documentation - helped clarify and define all assumptions and various ways to interpret specifications up front. 5. Use of SVA covers helped us achieve functional coverage goals. 6. Use of SVA covers guided us to find holes early on and direct our random generation tool to hit those areas.
  • 8. Why SVA is not used 40 30 Percent 20 10 0 EXCUSES Not Enough TIME RTL Hard to Read SVA not Synthesizable Slow Down Simulation It's not my Job
  • 9. Management of Assertions Testbench includes – – Scorpion Design includes inline assertions imbedded in the design as well assertion in an external file. All core design has inline SVA assertions imbedded in the RTL. All interface SVA assertions are coded in external file for maximum re-use between block to unit to core to chip. – Ability to select part of Assertions in the design during compile time. – Ability to turn off All Assertions at run-time. – Ability to turn off an individual Assertion at run-time. – Ability to control how the test should end when assertion fires, number of cycles to continue running so enough waveform dump is captured for further debugging. – Ability to control the message generated by Functional coverage. One can get a report stating which functional scenarios were hit and how many times. One can get cycle count when the last assertion was hit so simulation time is not wasted during regression time. Reactive testbench features are utilized to automatically turn-off coverage when threshold is reached for scenarios. For random environment, coveragehole script will analyze ( hundreds of tests) and report which scenarios are not covered.
  • 10. Deployment Recommendation 1 ????? Who should Write Assertions ???? System Designers Engineers Verification Engineers ANSWER - All of them. Training is a Must Invest in your design/verification Engineers to have proper training in Assertion language usage that will increase productivity throughout.
  • 11. Deployment Recommendation 2 Use `ifdef project_core_sva SVA Code `endif Use `ifdef project_Interfacename_sva Core SVA Code `endif Unit Block Use `ifdef project_blockname_sva SVA Code `endif Use +define+project_blockname_sva+ with your favorite Simulator
  • 12. Controlling Assertions – Use of $assertkill or $assertoff $assertoff(0) $asserton $assertkill always @(rst_n) if (!rst_n) $assertkill; SVA else $asserton; throughout Disable iff $plusargs
  • 13. Deployment Recommendation 4 Allow for change – Assertion not valid or out of date. – Testbench should allow disabling an assertion at run-time by name – $assertoff(hierarchical.name.assertname); – Use a $plusarg to pass the string and if simulator supports $assertoff ( string)
  • 14. Deployment Recommendation 5 Naming conventions and Guidelines – Always give a meaningful name to the assertion label. It will help identify exactly what is wrong and can be assigned quickly to the right person for debugging. – Write cover properties for all the functional scenarios you want to cover. – Use project_name_assert_or_cover_label to avoid name pollution with other groups. – Always try to constrain unbounded.
  • 15. Deployment Recommendation 6 Assertion Density ( assert and SIM time Vs Number cover) – In Scorpion we have about 1000 of Assertions asserts embedded in RTL and about 3700 cover properties that cover the design. For more depth 600 we have about 400,000 cover properties that go into more Time ( In Seconds) 400 details. – Using directed tests and some 200 random tests we can hit these cover properties which gives us a good feedback about the assertion 0 density. 1 4 7 10 13 – The guideline here is to limit the number of assertions to less than # of Covers ( In 5000 that are compiled in the simulation model and the Thousands) performance hit on simulation is minimum. Build Run
  • 16. Actual compile and run-times
  • 17. Deployment Recommendation 7 Managing the test finish when string mymsg; mymsg; assertion fires. l2i_a23a: assert property( @(posedge Clk) Clk) !reset && RLDNxtCycle |-> ##1 !l2iRLDFirstCycle_Q) else begin – SVA allows calling a task when assertion fires. Always call your own task where you can add $swrite(mymsg, " %m ASSERT::At time of failure, swrite( mymsg, RLDNxtCycle is %d, l2iRLDFirstCycle_Q how many cycles it should continue running s %d", $sampled( RLDNxtCycle), $sampled( RLDNxtCycle), after the assertion fires for proper waveform $sampled(l2iRLDFirstCycle_Q)); $sampled(l2iRLDFirstCycle_Q)); dumping etc. – In the Example we call assertFailDisplayMsg( assertFailDisplayMsg( assertFailDisplayMsg("l2i_a23a", mymsg); assertFailDisplayMsg("l2i_a23a", mymsg); assertName, AssertMsg) as action task where assertName, AssertMsg) end we pass the name of the assertion and any comment we want to display on the standard output. – $swrite is Verilog 2000 built-in function which built- – In the common task called by all negative behaves exactly same as sprintf in C and it assertions, one can have control over what to prints the message in a string. do which includes – %m -à will get expanded to the full How man cycles to wait before ending the sim. sim. hierarchical name of the module. Ignore the assertion firings ( scorpion_tb.scorpion_top.cpu.iu.iu_l2i ) Generate other database information for post – $sampled() will give you the value of signal processing tools such as regression management. when the assertion fired and not the current one.
  • 18. Deployment Recommendation 8 Managing the log files. – Running in a random environment when coverage hits are dumped can generate a lot of large log files and overflow you storage space. Look to control the ways assertion firings are reported and learn the simulator options to minimize the size. – Print the simulation build information, seed and cycles run in the log file for easier debugging and replay.
  • 19. Deployment Recommendation 9 Validating Assertions by inserting faults – Add a capability to inject errors to verify that your checkers and assertions are active and catching faults. – This will help build quality in your testbench.
  • 20. Deployment Recommendation 10 Create a library of Assertions commonly used on your project. Use SVA checker library by adding your company wrappers around so it works with different simulators.
  • 21. Deployment cost of Assertions Low effort Write all checks for X’s and Z’s. protocol operation (relationships, order, response, one-hot, etc) unknown values for control (at any time) and data (during transfers) over/underflow (FIFOs, stacks, buffers, shift registers, etc) legal state acquisition and transitions (Finite State Machines) Medium effort data integrity (FIFOs, shared memories ) High effort full functionality of complex bus protocol (e.g. AMBA, PCI, AXI) Not Worthwhile Computation like CRC, checksum etc Data order of instructions or packets
  • 22. Key Issues Addressed Simulator Support Industry Standard Mixed Language – Verilog, VHDL Training – Easy to Learn Debuggers Support Developing Verification Environment – Managing Assertions – Managing Coverage – Simulation Tool Capacity, Performance and maturity.
  • 23. Summary SystemVerilog Assertions enable true assertion-based verification and reduce overall verification schedule. For more effective deployment of SVA use the following techniques. – Training for the whole team as SVA is a team effort. – Naming convention and coding guidelines. – Control to enable and disable assertions at compile/run time. – Partitioning the SVA asserts and covers as wide and deep to cope with the capacity of the simulators. – Having a good unified coverage database. – Having enough hooks in the testbench to generate data for post processing tools and replay, reporting, and coverage closure. – Validating your SVA by having capability of inserting faults.
  • 24. References IEEE 1800-2005 System Verilog Language Reference Manual IEEE 2005 ISBN 0-7381-4811-3 System Verilog Assertion Handbook Ben Cohen 2005 ISBN:0-9705394-7-9