Digital Design Verification

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Digital Systems Verification Lecture 13 Alessandra Nardi.
TOPIC : SYNTHESIS DESIGN FLOW Module 4.3 Verilog Synthesis.
Partial Order Reduction: Main Idea
Combinational Logic.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
ECE Synthesis & Verification - Lecture 2 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits High-Level (Architectural)
Automated Method Eliminates X Bugs in RTL and Gates Kai-hui Chang, Yen-ting Liu and Chris Browy.
ECE Synthesis & Verification 1 ECE 667 Synthesis and Verification of Digital Systems Formal Verification Combinational Equivalence Checking.
ISBN Chapter 3 Describing Syntax and Semantics.
CSE241 Formal Verification.1Cichy, UCSD ©2003 CSE241A VLSI Digital Circuits Winter 2003 Recitation 6: Formal Verification.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Spring 07, Feb 6 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2007 Verification Vishwani D. Agrawal James J. Danaher.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 7 - Verification.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
Models of Computation for Embedded System Design Alvise Bonivento.
Describing Syntax and Semantics
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Using Mathematica for modeling, simulation and property checking of hardware systems Ghiath AL SAMMANE VDS group : Verification & Modeling of Digital systems.
ECE 2372 Modern Digital System Design
Dept of CSE, IIT KGP Assertion Based Verification of Mixed Signal Designs Sanjib Kumar Das Roll No: 03CS1018 Under Supervision of Dr. Pallab Dasgupta Department.
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.
Hardware Design Environment Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Using Formal Verification to Exhaustively Verify SoC Assemblies by Mark Handover Kenny Ranerup Applications Engineer ASIC Consultant Mentor Graphics Corp.
1 H ardware D escription L anguages Modeling Digital Systems.
Digital System Verification. VERIFICATION OUTLINE Purpose of Verification –Verification effort and cost Verification Tools –Linting tools –Code Coverage.
Functional Verification Figure 1.1 p 6 Detection of errors in the design Before fab for design errors, after fab for physical errors.
Safety-Critical Systems 5 Testing and V&V T
Verification – The importance
Introduction to ASIC flow and Verilog HDL
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
SystemC Semantics by Actors and Reduction Techniques in Model Checking Marjan Sirjani Formal Methods Lab, ECE Dept. University of Tehran, Iran MoCC 2008.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU 99-1 Under-Graduate Project Design of Datapath Controllers Speaker: Shao-Wei Feng Adviser:
Copyright 2001, Agrawal & BushnellVLSI Test: Lecture 61 Lecture 6 Logic Simulation n What is simulation? n Design verification n Circuit modeling n True-value.
Overview Logistics Last lecture Today HW5 due today
Lecture 10 Flip-Flops/Latches
Supplement on Verilog FF circuit examples
ASIC Design Methodology
VLSI Testing Lecture 5: Logic Simulation
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
B e h a v i o r a l to R T L Coding
Topics Modeling with hardware description languages (HDLs).
VLSI Testing Lecture 5: Logic Simulation
Digital System Verification
Vishwani D. Agrawal Department of ECE, Auburn University
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Topics Modeling with hardware description languages (HDLs).
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
ECE 434 Advanced Digital System L08
Limitations of STA, Slew of a waveform, Skew between Signals
Timing Analysis 11/21/2018.
CSCI1600: Embedded and Real Time Software
SYNTHESIS OF SEQUENTIAL LOGIC
IS 2935: Developing Secure Systems
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
332:437 Lecture 8 Verilog and Finite State Machines
Finite State Machines (FSMs)
Software Verification and Validation
Software Verification and Validation
CSCI1600: Embedded and Real Time Software
Lecture 9: Testbench and Division
The Verilog Hardware Description Language
CS 153 Logic Design Lab Professor Ian G. Harris
Introduction to verification
Software Verification and Validation
332:437 Lecture 8 Verilog and Finite State Machines
Presentation transcript:

Digital Design Verification Course Instructor: Debdeep Mukhopadhyay Dept of Computer Sc. and Engg. Indian Institute of Technology Madras 4/6/2019 IIT Madras, Even Semester Course No: CS 276

Verification ??? What is meant by “Formal Property Verification”? Options : Formal method of verifying a property Verifying of Formal Properties Ambiguity of English (natural) Language Formal Specifications Bugs are more costly than transistors !!! 4/6/2019 IIT Madras CS 276

Verification?? Process used to demonstrate that the intent of design is preserved in its implementation 70% of design effort goes behind verification Verification Environment DESIGN UNDER VERIFICATION 4/6/2019 IIT Madras CS 276

Testing vs Verification Testing verifies that the design was manufactured properly Verification ensures that a design meets its functional intent HW Design Manufacturing verification Testing Spec. Silicon Netlist Reconvergence Model: Conceptual representation of the verification process 4/6/2019 IIT Madras CS 276

Types of Verification Formal Property Verification Formal Technique to verify formal properties Verifies all properties of the design satisfy the properties Static Property Verification Assertion Based Verification Properties checked during simulation Verification confined to those areas that are encountered during simulation Dynamic Property Verification 4/6/2019 IIT Madras CS 276

What is being verified? Equivalence Checking Mathematically proves that the origin and output of a transformation of a netlist are logically equivalent Synthesis RTL Or netlist RTL Or netlist Equivalence Checking 4/6/2019 IIT Madras CS 276

Property Checking Assertions: Characteristics of a design RTL coding Specifications assertions Property Checking Interpretation 4/6/2019 IIT Madras CS 276

Functional Verification Ensures that a design implements intended functionality Can show but not prove RTL coding Specification RTL Functional Verification 4/6/2019 IIT Madras CS 276

What is a test-bench? Simulation code used to create a pre-determined input sequence to a design and check the output response Verification Challenge: What input patterns are to be applied to the DUV What is the expected output response of a proper design under the applied stimuli 4/6/2019 IIT Madras CS 276

Types of mistakes Type II (False Positive) Type I (False negative) Fail Pass Type II (False Positive) Type I (False negative) Bad Design Good Design 4/6/2019 IIT Madras CS 276

Verification Methodolgies Linting Simulation: Most common tool for verification Approximation of reality: 0, 1, x, z Requires stimulus Responses are validated against design intends 4/6/2019 IIT Madras CS 276

Event Driven Simulation Simulators are always slow Outputs change only when an input changes 0..0 1..1 1..1 4/6/2019 IIT Madras CS 276

1..0 0..1 1..1 The simulator could execute only when one of the inputs change assign out = in1 ^ in2; //verilog code snipet 4/6/2019 IIT Madras CS 276

What if both the inputs change? Logical world vs physical world Unknown or ‘x’ state Black box simulation 4/6/2019 IIT Madras CS 276

Cycle Based Simulation 1 DFF Q1 AND S1 OR S2 XOR S3 DFF Q2 Assume Q1 holds a zero and Q2 holds a 1 initially An Event Driven simulation requires 6 events and 7 models If we are interested only in the final states of Q1 and Q2, the simulation could be optimized by acting only on the events for Q1 and Q2 Simulation is based on clock cycles 4/6/2019 IIT Madras CS 276

CBS When the circuit description is compiled all combinatorial functions are collapsed into a single expression that can be used to determine all the ff values depending on the current state of the fan-in flops Ex: S3 = Q1 (check) 4/6/2019 IIT Madras CS 276

CBS requires generation of 2 events and execution of one model During simulation, whenever the clock input rises the value of the ff-s are updated using the input value returned by the pre-compiled combinatorial input functions CBS requires generation of 2 events and execution of one model The number of logical computations does not change 4/6/2019 IIT Madras CS 276

Loss: All timing and delay information is lost Gain when time required to perform logic computations are smaller than that required to schedule intermediate events Thumb rule: Large number of registers changing state at every clock cycle Loss: All timing and delay information is lost Assumes that setup and hold time are met Use a static timing analyzer Dynamic and static timing analysis 4/6/2019 IIT Madras CS 276

Synchronous Asynchronous inputs, latches or multiple-clock domains cannot be simulated accurately 4/6/2019 IIT Madras CS 276

Avoid wave-form viewers Co-simulators Avoid wave-form viewers Use assertions 4/6/2019 IIT Madras CS 276

Tasks of a Verification Engineer Development of the formal property specification Check the consistency and completeness of the specifications Verifying the implementation against the formal property specifications 4/6/2019 IIT Madras CS 276

Example of a priority arbiter mem-arbiter(input r1,r2,clk,output g1,g2) Design Intent: Request r1 has a higher priority. When r1 goes high, grant g1 goes high for the next two clock cycles When none of the request lines are high, g2 is high in the next clock cycle The grant lines g1 and g2 are mutually exclusive 4/6/2019 IIT Madras CS 276

Writing Formal Specifications Lots of languages Temporal Languages Propositional logic Temporal Operators: truth of propositions over time Concept of time 4/6/2019 IIT Madras CS 276

Linear Temporal Language (LTL) X: The Next Time Operator The property Xφ is true at a state if φ is true in the next cycle, where φ may be another temporal property or boolean property. F: The Future Operator The property Fφ is true at a state if φ is true at some time in the future 4/6/2019 IIT Madras CS 276

LTL (contd.) G: Global Operator U: Until Operator The property Gφ is true at a state if the property φ is always true U: Until Operator The property φUΨ is true at a state, if Ψ is true at some future state t, and φ is true at all states leading to t. 4/6/2019 IIT Madras CS 276

Property 1 in LTL Request r1 has a higher priority. When r1 goes high, grant g1 goes high for the next two clock cycles LTL Spec: G[ r1 => Xg1 Λ XXg1] G : The property must hold at all states 4/6/2019 IIT Madras CS 276

Property 2 & 3 in LTL When none of the request lines are high, g2 is high in the next clock cycle: The grant lines g1 and g2 are mutually exclusive: 4/6/2019 IIT Madras CS 276

Specification of correctness? Very difficult to check. No formal property to check against However we may check for contradiction among the properties 4/6/2019 IIT Madras CS 276

In-consistencies G[ r1 => Xg1 Λ XXg1] Model: GAME Environment: r1 is high at time t but low at time (t+1), r2 is low at time t and (t+1) Hence, g1 should be high at time (t+2), by property 1 g2 should be high at time (t+2), by property 2 Contradicts property 3. Environment Wins 4/6/2019 IIT Madras CS 276

Removing the In-consistency G[ r1 => Xg1 Λ XXg1] Model: GAME Environment: r1 is high at time t but low at time (t+1), r2 is low at time t and (t+1) Hence, g1 should be high at time (t+2), by property 1 g2 should be low at time (t+2), by property 2 Does not contradict property 3. Environment Does not Win 4/6/2019 IIT Madras CS 276

Is the specification complete? Chicken and egg problem Formal vs structural coverage Look back at: G[ r1 => Xg1 Λ XXg1] Ask the following questions Is g1 ever high? Is g2 ever high? Is r1 required? Is r2 required? 4/6/2019 IIT Madras CS 276

Design under verification FF r1 r2 g1 g2 4/6/2019 IIT Madras CS 276

Verilog Code Snipet module arbiter(r1,r2,g1,g2,clk); input clk, r1, r2; output g1, g2; reg g1, g2; always @(posedge clk) begin g2<=r2 & ~r1 & ~g1; g1<=r1; end endmodule 4/6/2019 IIT Madras CS 276

How do you verify?? Assertion based verification (ABV) Simulation based verification More close to the designer (as he has to learn less new techniques) More close to the old simulation framework Formal based verification (FBV) Formal techniques to verify properties Mathematical Techniques involved 4/6/2019 IIT Madras CS 276

Test Generation Engine ABV Property Specs Property Checker Test Generation Engine Simulation Platform Clk gen DUV r1 Master 1 g1 r2 Master 2 g2 Test Bench DUT interface 4/6/2019 IIT Madras CS 276

Design under verification FF g1=0 FF g2=0 r2=0 Contradicts the second property that g2 is default grant!!! 4/6/2019 IIT Madras CS 276

Hurdles of ABV Generating the test cases which lead to all the scenarios Directed Testing vs Randomized Testing We shall see one such language, called “e” in this course 4/6/2019 IIT Madras CS 276

FBV (FSM Extraction) State labels : g1, g2 Input Labels: r1, r2 00 01 10 11 1x 0x 00 01 FF r1 r2 g1 g2 1x FSM models DUV 4/6/2019 IIT Madras CS 276

FBV (contd.) 00 01 10 11 1x 0x Formal Properties Model Checker 00 State labels : g1, g2 Input Labels: r1, r2 4/6/2019 IIT Madras CS 276