Functional Coverage Development Tips: Do s and Don ts by Samrat Patel, ASIC Verification Engineer, and Vipul Patel, ASIC Engineer, einfochips

Similar documents
width: 10, 20 or 40-bit interface maximum number of lanes in any direction

Verification Planning with Questa Verification Management

Complex Signal Processing Verification under DO-254 Constraints by François Cerisier, AEDVICES Consulting

An Evaluation of the Advantages of Moving from a VHDL to a UVM Testbench by Shaela Rahman, Baker Hughes

Set a longer list of transaction attributes as per protocol legality Perform the cache data/state update at end of transaction, as needed

LEVERAGING A NEW PORTABLE STIMULUS APPROACH Graph or rule based stimulus descriptions

Reuse MATLAB Functions and Simulink Models in UVM Environments with Automatic SystemVerilog DPI Component Generation

Portable VHDL Testbench Automation with Intelligent Testbench Automation by Matthew Ballance, Mentor Graphics

DO-254 Testing of High Speed FPGA Interfaces by Nir Weintroub, CEO, and Sani Jabsheh, Verisense

Accelerating RTL Simulation Techniques by Lior Grinzaig, Verification Engineer, Marvell Semiconductor Ltd.

PowerAware RTL Verification of USB 3.0 IPs by Gayathri SN and Badrinath Ramachandra, L&T Technology Services Limited

Fast Track to Productivity Using Questa Verification IP by David Aerne and Ankur Jain, Verification Technologists, Mentor Graphics

Small, Maintainable Tests

Integrate Ethernet QVIP in a Few Hours: an A-to-Z Guide by Prashant Dixit, Questa VIP Product Team, Mentor Graphics

Optimizing Emulator Utilization by Russ Klein, Program Director, Mentor Graphics

Automated Generation of Functional Coverage Metrics for Input Stimulus by Mike Andrews, Verification Technologist, Mentor Graphics

Configuring Memory Read Completions Sent by PCIe QVIP

Using Mentor Questa for Pre-silicon Validation of IEEE based Silicon Instruments by CJ Clark & Craig Stephan, Intellitech Corporation

Artifacts of Custom Checkers in Questa Power Aware Dynamic Simulation

Simplified UVM for FPGA Reliability UVM for Sufficient Elemental Analysis in DO-254 Flows by Shashi Bhutada, Mentor Graphics

Comprehensive CDC Verification with Advanced Hierarchical Data Models

PA GLS: The Power Aware Gate-level Simulation

Formal Verification: Not Just for Control Paths

Nine Effective Features of NVMe Questa Verification IP to Help You Verify PCIe Based SSD Storage by Saurabh Sharma, Mentor Graphics

DDR SDRAM Bus Monitoring using Mentor Verification IP by Nikhil Jain, Mentor Graphics

Graph-Based IP Verification in an ARM SoC Environment by Andreas Meyer, Verification Technologist, Mentor Graphics Corporation

Debugging Inconclusive Assertions and a Case Study

Power Up Hardware/Software Verification Productivity by Matthew Ballance, Mentor Graphics

Four Best Practices for Prototyping MATLAB and Simulink Algorithms on FPGAs by Stephan van Beek, Sudhir Sharma, and Sudeepa Prakash, MathWorks

Making it Easy to Deploy the UVM by Dr. Christoph Sühnel, frobas GmbH

SVA in a UVM Class-based Environment by Ben Cohen, author, consultant, and trainer

SystemVerilog Functional Coverage

NoC Generic Scoreboard VIP by François Cerisier and Mathieu Maisonneuve, Test and Verification Solutions

Non-invasive Software Verification using Vista Virtual Platforms by Alex Rozenman, Vladimir Pilko, and Nilay Mitash, Mentor Graphics

Hardware Emulation: Three Decades of Evolution Part II

Assertions Instead of FSMs/logic for Scoreboarding and Verification by Ben Cohen, Accellera Systems Initiative, VhdlCohen Publishing

OVM to UVM Migration, or There and Back Again: A Consultant s Tale. by Mark Litterick, Verification Consultant, Verilab GmbH

AN INTRODUCTION TO UNIT TESTING

SVA Alternative for Complex Assertions

EDA Support for Functional Safety How Static and Dynamic Failure Analysis Can Improve Productivity in the Assessment of Functional Safety

Accelerating Networking Products to Market by Lauro Rizzatti, Rizzatti LLC

Using Formal Analysis to Block and Tackle by Paul B. Egan, Rockwell Automation

Figure 1: Target environment includes peripherals.

UVM-based Verification of a RISC-V Processor Core Using a Golden Predictor Model and a Configuration Layer

Three Steps to Unified SoC Design and Verification by Shabtay Matalon and Mark Peryer, Mentor Graphics

The Formal Verification of Design Constraints by Ajay Daga, CEO, FishTail Design Automation Inc.

Evolution of UPF: Getting Better All the Time

FP&A Simulation. A Complete Step-by-Step Guide. Ray Salemi

Power Aware Libraries: Standardization and Requirements for Questa Power Aware

Hiding the Guts by Ray Salemi, Senior Verification Consultant, Mentor Graphics

A Generic UVM Scoreboard by Jacob Andersen, CTO, Kevin Seffensen, Consultant and UVM Specialist, Peter Jensen, Managing Director, SyoSil ApS

BRINGING CONTINUOUS DOMAIN INTO SYSTEMVERILOG COVERGROUPS

Contents 1 Introduction 2 Functional Verification: Challenges and Solutions 3 SystemVerilog Paradigm 4 UVM (Universal Verification Methodology)

Top Five Reasons Why Every DV Engineer Will Love the Latest SystemVerilog 2012 Features by Ajeetha Kumari, Srinivasan Venkataramanan, CVC Pvt. Ltd.

Emulation Based Approach to ISO Compliant Processors Design by David Kaushinsky, Application Engineer, Mentor Graphics

Advanced Verification Topics. Bishnupriya Bhattacharya John Decker Gary Hall Nick Heaton Yaron Kashai Neyaz Khan Zeev Kirshenbaum Efrat Shneydor

Practical Experience in Automatic Functional Coverage Convergence and Reusable Collection Infrastructure in UVM

Combining Algebraic Constraints with Graph-based Intelligent Testbench Automation by Mike Andrews, Verification Technologist, Mentor Graphics

PG DIPLOMA COURSE IN VERIFICATION USING SYSTEMVERILOG & UVM NEOSCHIP TECHNOLOGIES

This slide, and the following two, are lifted directly from another Verilab paper from DVCon 2015 in which Mark Litterick described many of the

Test Scenarios and Coverage

166 SystemVerilog Assertions Handbook, 4th Edition

Practical experience in automatic functional coverage convergence and reusable collection infrastructure in UVM verification

Is Power State Table Golden?

An approach to accelerate UVM based verification environment

List of Code Samples. xiii

REAL VALUE MODELING FOR IMPROVING THE VERIFICATION PERFORMANCE

Plugging the Holes: SystemC and VHDL Functional Coverage Methodology

How to Automate A Complete Register. Verification Environment

Sunburst Design - Advanced SystemVerilog for Design & Verification by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.

Title: Using Test-IP Based Verification Techniques in a UVM Environment

Universal Verification Methodology(UVM)

Welcome to the DVCon 2015 issue of Verification Horizons By Tom Fitzpatrick, Editor and Verification Technologist

EECS 4340: Computer Hardware Design Unit 4: Validation

New Methodologies: They Don t Have to Be Scary.

Cypress Adopts Questa Formal Apps to Create Pristine IP

Next Generation Design and Verification Today UVM REG: Path Towards Coverage Automation in AMS Simulations

Relieving the Parameterized Coverage Headache

Complex Low Power Verification Challenges in NextGen SoCs: Taming the Beast!

Sunburst Design - SystemVerilog UVM Verification Training by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.

Modular SystemVerilog

Effective Verification of ARM SoCs

A UVM-based AES IP Verification Platform with Automatic Testcases Generation

Dynamic Verification of Low Power Design Intent. Suleiman Abu Kharmeh and François Cerisier Test and Verification Solutions

VHDL's OSVVM, The Death of SystemVerilog?

Defining UVM Coverage in IDesignSpec Sandeep Thakur Agnisys Support Team

Formal Contribution towards Coverage Closure. Deepak Pant May 2013

Hardware Design and Simulation for Verification

It s Surprising What the Boy Scouts Can Teach Us about Verification. By Tom Fitzpatrick, Editor and Verification Technologist

Graph-Based Verification in a UVM Environment

Leveraging Formal Verification Throughout the Entire Design Cycle

Qualification of Verification Environments Using Formal Techniques

CSE Verification Plan

Efficient Failure Triage with Automated Debug: a Case Study by Sean Safarpour, Evean Qin, and Mustafa Abbas, Vennsa Technologies Inc.

Universal Verification Methodology (UVM) Module 5

VCS AMS. Mixed-Signal Verification Solution. Overview. testing with transistor-level accuracy. Introduction. Performance. Multicore Technology

Lecture 15 Software Testing

Will Everything Start To Look Like An SoC?

Will Everything Start To Look Like An SoC?

Detecting Boundary Condition Bugs through System Verilog Functional Coverage Jayabrata Chakraborty HCL Technologies Ltd. Noida, India.

Transcription:

Functional Coverage Development Tips: Do s and Don ts by Samrat Patel, ASIC Verification Engineer, and Vipul Patel, ASIC Engineer, einfochips INTRODUCTION A verification engineer s fundamental goal is ensuring that the device under test (DUT) behaves correctly in its verification environment. Achieving this goal gets more difficult as chip designs grow larger and more complex, with thousands of possible states and transitions. A comprehensive verification environment must be created that minimizes wasted effort. Using functional coverage as a guide for directing verification resources by identifying tested and untested portions of the design is a good way to do just that. coverage points were hit, metrics that can be used to measure overall verification progress. The two key aspects of functional coverage: It is user-specified and is not automatically inferred from the design. It is based on the design specification and is thus independent of the actual design code or its structure. This article gives several scenarios that might come up when building a functional coverage model. We also illustrate use of several constructs relevant to building such a model. USE OF DEFAULT SEQUENCE FOR TRANSITION COVERAGE Similar to Default Construct which is useful for catching unplanned or invalid values, Default Sequence is used to catch all transitions (or sequences) that do not lie within any of the defined transition bins. Figure 1: Functional Coverage Flow Diagram Functional coverage is user-defined, mapping all functionality defined in the test plan to be tested to a cover point. Whenever the functionality is hit during simulation, the functional coverage point is automatically updated. A functional coverage report can be generated summarizing how many When any non-default sequence transition is incremented or any previously specified bin transition is not in pending state, then bin allother of that cover point will be incremented. In the following example, a transition from value 1 to 0 is specified by bins flag_trans. So if any transition occurs from 1 to 0, then it will be captured by flag_trans bins. Here, by using default sequence you can capture other transitions that are not specified exclusively. cp_flag: coverpoint data [24] { bins flag_trans = (1 => 0); bins allother = default sequence; While using default sequence, it s best to avoid the following scenarios: 37

Scenario-1: The default sequence specification does not accept multiple transition bins (the [] notation). It will give an error. Therefore, avoid using the default sequence with multiple transition bins. cp_flag: coverpoint data [24] { bins flag_trans = (1 => 0); bins allother [] = default sequence; Scenario-2: The default sequence specification cannot be explicitly ignored. It will be an error for bins designated as ignore_bins to specify a default sequence. Therefore, avoid using the default sequence with ignore_bins. cp_flag: coverpoint data[24] { bins flag_trans = (1 => 0); ignore_bins allother = default sequence; EXCLUSION OF CROSS COVERAGE AUTO GENERATED BINS Problem: Suppose the requirement is to do cross coverage between two cover points and capture only specific user defined bins as follows: cp_thr: coverpoint data [11:8] { bins thr_val_0 = {0; bins thr_val_1 = {1; cp_reg_addr: coverpoint addr { bins reg_addr_1 = {12 h01c; bins reg_addr_2 = {12 h020; cr_thr_addr: cross cp_thr, cp_reg_addr { bins thr_add = binsof(cp_reg_addr) intersect {12 h01c; Solution: To disable auto generated cross bins, you should use ignore_bins as shown below: cr_thr_addr: cross cp_thr, cp_reg_addr { bins thr_add = binsof(cp_reg_addr) intersect {12 h01c; ignore_bins thr_add_ig =!binsof(cp_reg_addr) intersect {12 h01c; Another way is that instead of specifying user defined bins simply use ignore_bins. cr_thr_addr: cross cp_thr, cp_reg_addr { ignore_bins thr_add = binsof(cp_reg_addr) intersect {12 h020; AVOID USING MULTIPLE BIN CONSTRUCT (THE [] NOTATION) WITH NONCONSECUTIVE REPETITION The nonconsecutive repetition is specified using trans_item [= repeat_range]. The required number of occurrences of a particular value is specified by the repeat_range. Problem: Using nonconsecutive repetition with the multiple bins construct (the [] notation) gives a fatal run time error as follows: cp_flag: coverpoint data [24] { bins flag_trans[] = (1 => 0[=3]); Simulation Error: # ** Fatal: (vsim-8568) Unbounded or undetermined varying length sequences formed using Repetitive/ Consecutive operators are not allowed in unsized Array Transition bins. A transition item in bin err_flag of Coverpoint cp_err_flag in Covergroup instance \/ tx_env_pkg::tx_coverage::cg_err_ctrl_status_reg has an operator of kind [= ]. Please fix it In the above example, the coverage report will capture user defined bins along with auto generated bins. However, the requirement is to capture only specific user bins. The limitation of cross coverage is that even on specifying only user bins, it will also generate cross coverage bins automatically. Solution: During nonconsecutive repetition, any number of sample points can occur before the first occurrence of the specified value and between each occurrence of the specified value. The transition following the nonconsecutive repetition may occur after any number of sample points, as long as the repetition value does not occur again. 38

As length varies for nonconsecutive repetition, you cannot determine it. So avoid using the multiple bin construct (the [] notation) with nonconsecutive repetition. cp_flag: coverpoint data[24] { bins flag_trans = (1 => 0[=3]); Here, in flag_trans bins 0[=3] is same as 0 => => 0 => 0 means any number of sample points can occur before occurrence and between each occurrence of the specified value. But as you have specified bins flag_trans as static bin, it will avoid fatal errors. AVOID USE OF DEFAULT As per LRM, the default specification defines a bin that s not associated with any of the defined value bins. That is, it catches the values of coverage points that do not lie within any of the defined bins. Problem-1: If you use the multiple bin construct (the [] notation) then it will create a separate bin for each value. In the following example, the first bin construct associates bin rsvd_bit with the value of zero. Every value that does not match bins rsvd_bit is added into its own distinct bin. cp_rsvd_bit: coverpoint data[31:13] iff (trans == bins rsvd_bit = {0; bins others[] = default; But as mentioned above, if the coverage point has a large number of values and you run simulation for it, the simulator crashes giving the following fatal error: # ** Fatal: The number of singleton values exceeded the system limit of 2147483647 for unconstrained array bin other in Coverpoint data of Covergroup instance \/covunit/cg_err_reg. The question: do you really need 2147483647 values? Solution: Use default without multiple bin construct (the [] notation): If you use default without the multiple bin construct for large values, then it will create a single bin for all values, thus helping you avoid fatal errors. cp_rsvd_bit: coverpoint data[31:13] iff (trans == bins rsvd_bit = {0; bins others = default; Use ignore_bins: If you use the ignore_bins construct for large values, then it will ignore unnecessary large values, also helping you avoid fatal errors. cp_rsvd_bit: coverpoint data[31:13] iff (trans == bins rsvd_bit = {0; ignore_bins ig_rsvd_bit = {[1:$]; Problem-2: The coverage calculation for a cover point generally does not take into account the coverage captured by the default bin, which is also excluded from cross coverage. In the following example, for cover point data, bins thr_val is specified as default. So values 0 to 15 are added into its own distinct bin. Also cover point data is used in cross coverage with addr cover point. cp_thr: coverpoint data[11:8] { bins thr_val_ 0 = 0; bins thr_val[15] = default; cp_reg_addr: coverpoint addr { bins reg_addr_1 = {12 h01c; bins reg_addr_2 = {12 h020; cr_thr_addr : cross cp_thr, cp_reg_addr; Here, cover point data has no coverage because bins are specified using default and also there is no cross coverage because we don t have coverage for cover point data. Solution: Use wildcard bins: It captures the combination of all possible values. cp_thr: coverpoint data[11:8] { bins thr_val_ 0 = 0; wildcard bins thr_val_wc = {[4 b???1]; 39

Use min/max ($) operators: It specifies minimum or maximum values range. cp_thr: coverpoint data[11:8] { bins thr_val_ 0 = 0; bins thr_val_op = {[1:$];; AVOID USE OF ILLEGAL_BINS If you specify any bin as illegal_bins, then it will remove unused or illegal values from the overall coverage calculation. Problem: In the following example, during the read operation the reserved bit value should be zero; cp_rsvd_bit: coverpoint data[31:25] iff (trans == bins rsvd_bit = {0; illegal_bins il_rsvd_bit = {[1:$]; the passive component, then you can also use illegal_bin. Question-2: How do you avoid such a condition without using illegal_bins? Solution-2: Use ignore_bins: Since ignore_bins ignore other values and does not throw any type of active errors, it will exclude those values from overall coverage. Best of luck experimenting with these constructs. We hope they are useful in your verification endeavors.. cp_rsvd_bit: coverpoint data[31:25] iff (trans == bins rsvd_bit = {0; ignore_bins ig_rsvd_bit = {[1:$]; any other value will produce an error. In this scenario, there are certain questions that arise: Question-1: Is it reasonable to rely on a passive component to capture an active error? Because, if you want to capture active errors using illegal_bins, and you do not use the passive coverage component (i.e., you turn it off and use only the active component), then you will not capture any active errors. Solution-1: Use assertion and checkers to capture active errors: If you want to capture active errors, use assertion and checkers. And if you have defined checkers and assertions and still want to cross check for any run time error through 40

VERIFICATION ACADEMY The Most Comprehensive Resource for Verification Training 20 Video Courses Available Covering Intelligent Testbench Automation Metrics in SoC Verification Verification Planning Basic and Advanced UVM Assertion-Based Verification FPGA Verification Testbench Acceleration Power Aware Verification Analog Mixed-Signal Verification UVM and Coverage Online Methodology Cookbooks Discussion Forum with more than 4400 topics UVM Connect and UVM Express Kits www. verificationacademy.com

Editor: Tom Fitzpatrick Program Manager: Rebecca Granquist Wilsonville Worldwide Headquarters 8005 SW Boeckman Rd. Wilsonville, OR 97070-7777 Phone: 503-685-7000 To subscribe visit: www.mentor.com/horizons To view our blog visit: VERIFICATIONHORIZONSBLOG.COM