DAC June 20031 Automatic Trace Analysis for Logic of Constraints Xi Chen, Harry Hsieh University of California, Riverside Felice Balarin, Yosinori Watanabe.

Slides:



Advertisements
Similar presentations
The Quest for Correctness Joseph Sifakis VERIMAG Laboratory 2nd Sogeti Testing Academy April 29th 2009.
Advertisements

Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
ECE 553: TESTING AND TESTABLE DESIGN OF DIGITAL SYSTES Logic Simulation.
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
Presenter: PCLee – This paper outlines the MBAC tool for the generation of assertion checkers in hardware. We begin with a high-level presentation.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
ISBN Chapter 3 Describing Syntax and Semantics.
CSE241 Formal Verification.1Cichy, UCSD ©2003 CSE241A VLSI Digital Circuits Winter 2003 Recitation 6: Formal Verification.
Software Model Checking for Embedded Systems PIs: Matthew Dwyer 1, John Hatcliff 1, and George Avrunin 2 Post-docs: Steven Seigel 2, Radu Iosif 1 Students:
Leveraging Assertion Based Verification by using Magellan Michal Cayzer.
An Automata-based Approach to Testing Properties in Event Traces H. Hallal, S. Boroday, A. Ulrich, A. Petrenko Sophia Antipolis, France, May 2003.
Universal Verification Methodology (UVM) Benefits Mustafa Khairallah Boost Valley Boost Valley Consulting 1.
Metropolis Seminar Series September Xi Chen, Guang Yang, Harry Hsieh, Felice Balarin and Yoshi Watanabe Elaborator and Runtime Library – A Metropolis.
Spin Tutorial (some verification options). Assertion is always executable and has no other effect on the state of the system than to change the local.
Specification and Encoding of Transaction Interaction Properties Divjyot Sethi Yogesh Mahajan Sharad Malik Princeton University Hardware Verification Workshop.
Copyright 2001, Agrawal & BushnellDay-1 PM Lecture 4a1 Design for Testability Theory and Practice Lecture 4a: Simulation n What is simulation? n Design.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.
Creating Test Environments HDL Model HDL Testbench Simulation Engine API stimulus check Testbench Program stimulus check Non-HDL languages may be used.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Describing Syntax and Semantics
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
The Model Checker SPIN Written by Gerard J. Holzmann Presented by Chris Jensen.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
Formal Techniques for Verification Using SystemC By Nasir Mahmood.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Roza Ghamari Bogazici University April Outline Introduction SystemC Language Formal Verification Techniques for SystemC Design and Verification.
FCS - AAO - DM COMPE/SE/ISE 492 Senior Project 2 System/Software Test Documentation (STD) System/Software Test Documentation (STD)
ASIC/FPGA design flow. FPGA Design Flow Detailed (RTL) Design Detailed (RTL) Design Ideas (Specifications) Design Ideas (Specifications) Device Programming.
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.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
CS6133 Software Specification and Verification
Semi-automatic Property Generation for the Formal Verification of a Satellite On-board System Wesley Gonçalves Silva.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Quality Driven SystemC Design By Nasir Mahmood. Hybrid Approach The idea here is to combine the strengths of simulation – namely the ability to handle.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Chapter 3 Part II Describing Syntax and Semantics.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
An Overview of Hardware Design Methodology Ian Mitchelle De Vera.
ECE-C662 Lecture 2 Prawat Nagvajara
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Verification & Validation By: Amir Masoud Gharehbaghi
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
A Runtime Verification Based Trace-Oriented Monitoring Framework for Cloud Systems Jingwen Zhou 1, Zhenbang Chen 1, Ji Wang 1, Zibin Zheng 2, and Wei Dong.
Introduction to Hardware Verification ECE 598 SV Prof. Shobha Vasudevan.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Writing, Verifying and Exploiting Formal Specifications for Hardware Designs Chapter 3: Verifying a Specification Presenter: Scott Crosby.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
Wolfgang Runte Slide University of Osnabrueck, Software Engineering Research Group Wolfgang Runte Software Engineering Research Group Institute.
ASIC Design Methodology
SOFTWARE DESIGN AND ARCHITECTURE
VLSI Testing Lecture 5: Logic Simulation
ECE 551: Digital System Design & Synthesis
From C to Elastic Circuits
Aspect Validation: Connecting Aspects and Formal Methods
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
Dynamically Scheduled High-level Synthesis
Presentation transcript:

DAC June Automatic Trace Analysis for Logic of Constraints Xi Chen, Harry Hsieh University of California, Riverside Felice Balarin, Yosinori Watanabe Cadence Berkeley Laboratories

DAC June Outline Introduction System-level design Logic of Constraints Trace analysis methodology Methodology and algorithms Case studies Proving LOC formulas Summary

DAC June System-Level Design Methodology System Architecture (Platform) System Function Mapping Implementation of System Function on Architecture (Keutzer, TCAD’00) RTL level design is no longer efficient for systems containing millions of gates. System-level design becomes necessary Reuse of design components Reduce overall complexity Ease debugging Verification methods must accompany every step in the design flow Constraints need to be specified at the highest level and verified ASAP

DAC June A transaction-level quantitative constraint language Works on a sequence of events from a particular execution trace The basic components of an LOC formula: Boolean operators: (not), (or), (and) and (imply) Event names, e.g. “in”, “out”, “Stimuli” or “Display” Instances of events, e.g. “Stimuli[0]”, “Display[10]” Annotations, e.g. “t(Display[5])” Index variable i, the only variable in a formula, e.g. “Display[i-5]” and “Stimuli[i]” Logic of Constraints (LOC)

DAC June Throughput: “at least 3 Display events will be produced in any period of 30 time units”. t (Display[i+3]) – t (Display[i]) <= 30 Other LOC constraints Performance: rate, latency, jitter, burstiness Functional: data consistency Stimul i FSM Datapath FIR Display ( SystemC2.0 Distribution ) Stimuli : 0 at time 9 Display : 0 at time 13 Stimuli : 1 at time 19 Display : -6 at time 23 Stimuli : 2 at time 29 Display : -16 at time 33 Stimuli : 3 at time 39 Display : -13 at time 43 Stimuli : 4 at time 49 Display : 6 at time 53 FIR Trace LOC Constraints

DAC June Assertion Languages (Related Work) IBM’s Sugar and Synopsis' OpenVera Good for both formal verification and simulation verification Implemented as libraries to support different HDLs Assertions are expressed with Boolean expressions, e.g. a[0:3] & b[0:3] = “0000” Temporal logics, e.g. always !(a & b) HDL code blocks, e.g. handshake protocol Mainly based on Linear Temporal Logic

DAC June LOCLTL t(Display[i]) - t(Stimuli[i]) <= 25 LOC: data(Display[i]) > 10 LTL: [](Display_occur  Display_data > 10) []<> A Characteristics of LOC Formulism Constraints can be automatically synthesized into static checkers, runtime monitors and formal verification models. Performance constraints in addition to functional constraints A different domain of expressiveness than LTL.

DAC June Outline Introduction Trace analysis methodology Methodology and algorithms Case studies Proving LOC formulas Summary

DAC June Trace Analysis Methodology An efficient checking algorithm An automatic LOC checker generator Extended to runtime constraint monitoring Simulation Trace FormatLOC Formula Automatic Checker Generation Source of the Checker Executable Checker Compilation Simulation Traces Evaluation Report Trace checking (Execution)

DAC June End Start i = 0; Read a line of trace Store annotations for events evaluate the formula with current i Trace terminate? i ++ & recycle memory space Ready to evaluate? Yes No Yes No Algorithm of the LOC Checker

11 Throughput: “at least 3 Display events will be produced in any period of 30 time units” t (Display[i+3]) – t (Display[i]) <= 30 FIR Trace t(Display[i]) 43210index Queue data structure Stimuli : 0 at time 9 Display : 0 at time 13 Stimuli : 1 at time 19 Display : -6 at time 23 Stimuli : 2 at time 29 Display : -16 at time 33 Stimuli : 3 at time 39 Display : -13 at time 43 Stimuli : 4 at time 49 Display : 6 at time 53 Stimuli : 4 at time 59 Display : 6 at time 63 Algorithm of the LOC Checker Display[0] Display[3] i = 0 Display[1] Display[4] i = 1 Display[2] Display[5] i = 2

DAC June Input of the checker generator – formula and trace format: Output of the trace checking – error report: Input and Output

DAC June Dealing with Memory Limitation scan trace and store the annotations only once. If the memory limit has been reached, stop storing more annotations search the rest of trace for current i resume storing annotations after freeing memory memory trace

DAC June Static Trace Checking v.s. Runtime Monitoring Runtime constraint monitoring: Integrate the trace checker into a compiled-code simulator, e.g. SystemC modules At runtime, the events and annotations are passed to the monitor module directly Static trace checking v.s. runtime monitoring Static Trace CheckingRuntime Monitoring StepsSimulation, then checkingSimulation || Checking TimeMoreLess SpaceMoreLess DebugEasyHard SimulatorIndependentDependent

DAC June Rate: t(Display[i+1])-t(Display[i]) = 10 Latency:t(Display[i]) - t(Stimuli[i]) <= 25 Jitter: | t(Display[i]) - (i+1) * 10 | <= 4 Throughput: t (Display[i+100])-t(Display[i]) <= 1001 Burstiness: t (Display[i+1000])-t(Display[i]) > 9999 StimuliFSM Datapath FIR Display ( SystemC Distribution ) Stimuli : 0 at time 9 Display : 0 at time 13 Stimuli : 1 at time 19 Display : -6 at time 23 Stimuli : 2 at time 29 Display : -16 at time 33 Stimuli : 3 at time 39 Display : -13 at time 43 Stimuli : 4 at time 49 Display : 6 at time 53 FIR Trace Case Study – FIR Filter

DAC June Lines of Trace RateTime(s) Memory28B 28B LatencyTime(s) Memory28B 28B JitterTime(s) Memory28B 28B ThroughputTime(s) Memory0.4KB 0.4KB BurstinessTime(s) Memory4KB 4KB Resource Usage for Checking Constraints (1) – (5) Trace Checking Results (FIR)

DAC June Results of Runtime Monitoring on FIR for the Latency Constraint (2) Lines of Trace Simulation (s) Static trace checking (s) Total: simulation+checking (s) Simulation w/ monitoring (s) Runtime Monitoring (FIR) The checker implemented as a SystemC module and applied on the latency constraint, i.e. t(Display[i]) - t(Stimuli[i]) <= 25(C2) Simulation trace is no longer written to a file but passed to the monitoring module directly.

DAC June PIP trace Case Study – Picture In Picture Picture-In-Picture (PIP) a system level design for set-top video processing 19, 000 lines of source code 120, 000 lines of simulation output (control trace)

DAC June Data consistency: “The numbers of the fields read in and produced should be equal.” field_count(in[i]) = field_count(out[i]) field_count is an annotation: number of fields processed in, out are events: reading a field and producing a field Performance and Functional Constraints for PIP(cont’d)

DAC June “The field sizes of paired even and odd fields should be the same.” size(field_start[2i+2])-size(field_start[2i+1]) = size(field_start[2i+1])-size(field_start[2i]) 3. “Latency between user control and actual size change <= 5.” field_count(change_size[i]) - field_count(read_size[i]) <= 5 Trace Checking Results: With the trace of about 120,000 lines, all these three constraints are checked within 1 minute. Performance and Functional Constraints for PIP(cont’d)

DAC June Outline Introduction Trace analysis methodology Proving LOC formulas Summary

DAC June Formal Verification Tools and Methods Model checkers, e.g. SPIN, SMV Check if a finite state system(model) satisfy some property Properties are expressed with temporal logics, e.g. LTL Limitation – state explosion – finite state

DAC June Formal Verification for LOC We define a subset of LOC that has finite-state equivalents – represent the LOC formula with LTL – use LTL model checking directly – Example: t(Display[i+1]) – t(Display[i]) = 10 Display_occur  Display_t – Display_t_last = 10

DAC June Formal Verification for LOC(cont’d) Other LOC formulas are beyond the finite-state domain, e.g. the latency constraint – make assumption to limit the system to finite-state domain – verify assumption and assumption  constraint separately Assumption  constraint satisfied? Assumption satisfied? YES NO Unknown yes no Verification Outcomes

DAC June Data consistency constraint on the channel: Assumption – “Sum_read always follows DataGen_write, between a write and its corresponding read, only 30 more writes can be produced” data(DataGen_write[i]) = data(Sum_read[i]) Case Study – A FIFO Channel DataGenSum FIFO Buffer Control Unit

DAC June Using the model checker SPIN, the assumption is verified in 1.5 hours and assumption  constraint is verified in 3 hours The FIFO channel is a library module Repeated use Small 600 lines of source code v.s. PIP (19,000 lines) Case Study – A FIFO Channel (cont’d) DataGenSum FIFO Buffer Control Unit

DAC June Summary LOC is useful and is different from LTL Automatic trace analysis Case studies with large designs and traces Formal verification approach

DAC June Thank You!