Digital Design Verification



Similar documents
Introduction to Functional Verification. Niels Burkhardt

VERIFICATION TECHNOLOGIES

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

ECE 451 Verilog Exercises. Sept 14, James Barnes

Testing & Verification of Digital Circuits ECE/CS 5745/6745. Hardware Verification using Symbolic Computation

ESP-CV Custom Design Formal Equivalence Checking Based on Symbolic Simulation

Chapter 13: Verification

Assertion Synthesis Enabling Assertion-Based Verification For Simulation, Formal and Emulation Flows

A Verilog HDL Test Bench Primer Application Note

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Modeling Latches and Flip-flops

A New Paradigm for Synchronous State Machine Design in Verilog

Set-Reset (SR) Latch

Modeling Registers and Counters

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

Combinational Logic Design Process

Understanding DO-254 Compliance for the Verification of Airborne Digital Hardware

Introduction to VLSI Testing

Digital Logic Design Sequential circuits

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Example-driven Interconnect Synthesis for Heterogeneous Coarse-Grain Reconfigurable Logic

CLOCK DOMAIN CROSSING CLOSING THE LOOP ON CLOCK DOMAIN FUNCTIONAL IMPLEMENTATION PROBLEMS

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Registers & Counters

Getting the Most Out of Synthesis

Module 3: Floyd, Digital Fundamental

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Fault Modeling. Why model faults? Some real defects in VLSI and PCB Common fault models Stuck-at faults. Transistor faults Summary

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

Verification of Triple Modular Redundancy (TMR) Insertion for Reliable and Trusted Systems

Getting off the ground when creating an RVM test-bench

Wiki Lab Book. This week is practice for wiki usage during the project.

Master/Slave Flip Flops

Lesson 12 Sequential Circuits: Flip-Flops

Chapter 2 Ensuring RTL Intent

CS311 Lecture: Sequential Circuits

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Life Cycle of a Memory Request. Ring Example: 2 requests for lock 17

Logic in Computer Science: Logic Gates

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Finite State Machine Design and VHDL Coding Techniques

Verilog: Blocks

Engr354: Digital Logic Circuits

Formal Verification of Software

SVA4T: SystemVerilog Assertions - Techniques, Tips, Tricks, and Traps

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Chapter 7: Advanced Modeling Techniques

Counters and Decoders

Formal Verification and Linear-time Model Checking

EXPERIMENT 8. Flip-Flops and Sequential Circuits

ARM Webinar series. ARM Based SoC. Abey Thomas

System Verilog Testbench Tutorial Using Synopsys EDA Tools

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Lab 1: Full Adder 0.0

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

Model Checking based Software Verification

System-on-Chip Design Verification: Challenges and State-of-the-art

Lecture 7: Clocking of VLSI Systems

SystemVerilog Is Getting Even Better!

Specification and Analysis of Contracts Lecture 1 Introduction

Model Checking: An Introduction

9/14/ :38

Memory Elements. Combinational logic cannot remember

Design Verification and Test of Digital VLSI Circuits NPTEL Video Course. Module-VII Lecture-I Introduction to Digital VLSI Testing

VHDL GUIDELINES FOR SYNTHESIS

Latch Timing Parameters. Flip-flop Timing Parameters. Typical Clock System. Clocking Overhead

Model Checking of Software

Manchester Encoder-Decoder for Xilinx CPLDs

路 論 Chapter 15 System-Level Physical Design

Theory of Logic Circuits. Laboratory manual. Exercise 3

Gate-Level Simulation Methodology

EE552. Advanced Logic Design and Switching Theory. Metastability. Ashirwad Bahukhandi. (Ashirwad Bahukhandi)

VHDL-Testbench as Executable Specification

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

Lecture 10: Multiple Clock Domains

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

ModelSim-Altera Software Simulation User Guide

Lecture 8: Synchronous Digital Systems

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Lab1 : 2-1 MUX. 1. Change to Lab1 directory. It contains the mux.v and mux_text.v files. use this command : cd Lab1

Digital Electronics Detailed Outline

Agenda. Michele Taliercio, Il circuito Integrato, Novembre 2001

CHAPTER 3 Boolean Algebra and Digital Logic

DIGITAL DESIGN FLOW OPTIONS

Design Methodology for Engineering Change Orders (ECOs) in a Flat Physical Standard Cells Based Design Environment

Using reverse circuit execution for efficient parallel simulation of logic circuits

Design and Implementation of Vending Machine using Verilog HDL

The Model Checker SPIN

Chapter 8. Sequential Circuits for Registers and Counters

Model Checking II Temporal Logic Model Checking

Formal verification of contracts for synchronous software components using NuSMV

Lecture 11: Sequential Circuit Design

Digital Circuit Design Using Xilinx ISE Tools

Hunting Asynchronous CDC Violations in the Wild

Testing of Digital System-on- Chip (SoC)

Transcription:

Digital Design Verification Course Instructor: Debdeep Mukhopadhyay Dept of Computer Sc. and Engg. Indian Institute of Technology Madras, Even Semester Course No: CS 676 1 Verification??? What is meant by Formal Property Verification? Options : 1. Formal method of verifying a property 2. Verifying of Formal Properties Ambiguity of English (natural) Language Formal Specifications Bugs are more costly than transistors!!! CS 676 2 1

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 CS 676 3 Testing vs Verification Testing verifies that the design was manufactured properly Verification ensures that a design meets its functional intent HW Design Manufacturing verification Spec. Testing Netlist Silicon Reconvergence Model: Conceptual representation of the verification process CS 676 4 2

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 CS 676 5 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 Equivalence Checking RTL Or netlist CS 676 6 3

Property Checking Assertions: Characteristics of a design RTL coding Specifications RTL assertions Interpretation Property Checking CS 676 7 Functional Verification Ensures that a design implements intended functionality Can show but not prove RTL coding Specification RTL Functional Verification CS 676 8 4

What is a test-bench? Simulation code used to create a predetermined 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 CS 676 9 Types of mistakes Fail Pass Bad Design Type II (False Positive) Good Design Type I (False negative) CS 676 10 5

Verification Methodolgies Linting Simulation: Most common tool for verification Approximation of reality: 0, 1, x, z Requires stimulus Responses are validated against design intends CS 676 11 Event Driven Simulation Simulators are always slow Outputs change only when an input changes 0..0 1..1 1..1 CS 676 12 6

0..1 1..0 1..1 The simulator could execute only when one of the inputs change assign out = in1 ^ in2; //verilog code snipet CS 676 13 What if both the inputs change? Logical world vs physical world Unknown or x state Black box simulation CS 676 14 7

Cycle Based Simulation 1 0 0 DFF AND OR XOR DFF Q1 S1 S2 S3 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 CS 676 15 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) CS 676 16 8

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 CS 676 17 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 CS 676 18 9

Synchronous Asynchronous inputs, latches or multipleclock domains cannot be simulated accurately CS 676 19 Few other points about simulators Co-simulators Avoid wave-form viewers Use assertions CS 676 20 10

Coverage Code Coverage Statement Coverage Path Coverage CS 676 21 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 CS 676 22 11

Example of a priority arbiter mem-arbiter(input r 1,r 2,clk,output g 1,g 2 ) Design Intent: 1. Request r 1 has a higher priority. When r 1 goes high, grant g 1 goes high for the next two clock cycles 2. When none of the request lines are high, g 2 is high in the next clock cycle 3. The grant lines g 1 and g 2 are mutually exclusive CS 676 23 Writing Formal Specifications Lots of languages Temporal Languages Propositional logic Temporal Operators: truth of propositions over time Concept of time CS 676 24 12

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 CS 676 25 LTL (contd.) G: Global 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. CS 676 26 13

Property 1 in LTL 1. Request r 1 has a higher priority. When r 1 goes high, grant g 1 goes high for the next two clock cycles LTL Spec: G[ r 1 => Xg 1 Λ XXg 1 ] G : The property must hold at all states CS 676 27 Property 2 & 3 in LTL 2. When none of the request lines are high, g 2 is high in the next clock cycle: G[ r r Xg ] 1 2 2 3. The grant lines g 1 and g 2 are mutually exclusive: G[ g g ] 1 2 CS 676 28 14

Specification of correctness? Very difficult to check. No formal property to check against However we may check for contradiction among the properties CS 676 29 In-consistencies G[ r 1 => Xg 1 Λ XXg 1 ] G[ r r Xg ] 1 2 2 G[ g g ] 1 2 Model: GAME Environment: r 1 is high at time t but low at time (t+1), r 2 is low at time t and (t+1) Hence, g 1 should be high at time (t+2), by property 1 g 2 should be high at time (t+2), by property 2 Contradicts property 3. Environment Wins CS 676 30 15

Removing the In-consistency G[ r 1 => Xg 1 Λ XXg 1 ] G[ g g ] 1 2 G[ g g ] 1 2 Model: GAME Environment: r 1 is high at time t but low at time (t+1), r 2 is low at time t and (t+1) Hence, g 1 should be high at time (t+2), by property 1 g 2 should be low at time (t+2), by property 2 Does not contradict property 3. Environment Does not Win CS 676 31 Is the specification complete? Chicken and egg problem Formal vs structural coverage Look back at: G[ r 1 => Xg 1 Λ XXg 1 ] G[ g g ] 1 2 G[ g g ] 1 2 G[ r X r XX g ] 1 1 1 Ask the following questions 1. Is g 1 ever high? 2. Is g 2 ever high? 3. Is r 1 required? 4. Is r 2 required? CS 676 32 16

Design under verification r 1 FF g 1 FF g 2 r 2 CS 676 33 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 CS 676 34 17

How do you verify?? Assertion based verification (ABV) 1. Simulation based verification 2. More close to the designer (as he has to learn less new techniques) 3. More close to the old simulation framework Formal based verification (FBV) 1. Formal techniques to verify properties 2. Mathematical Techniques involved CS 676 35 ABV Property Specs Property Checker Test Generation Engine Simulation Platform Clk gen r1 g1 Master 1 DUV r2 g2 Master 2 Test Bench DUT interface CS 676 36 18

Design under verification r 1 =0 FF g 1 =0 r 2 =0 FF g 2 =0 Contradicts the second property that g 2 is default grant!!! CS 676 37 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 CS 676 38 19

FBV (FSM Extraction) State labels : g1, g2 Input Labels: r1, r2 01 00 01 r 1 r 2 FF FF g 1 g 2 1x 1x 00 00 01 1x 0x 0x 10 11 1x DUV FSM models CS 676 39 FBV (contd.) 01 Formal Properties Model Checker 00 00 01 1x 1x 0x 0x 10 11 1x State labels : g1, g2 Input Labels: r1, r2 CS 676 40 20