combining symbolic simulation and interval arithmetic for the verification of ams designs mohamed...

36
Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki , Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07 November 14 th , 2007 1 1 Hardware Verification Group, ECE Department, Concordia University 2 Génie Informatique, Ecole Polytechnique de Montréal 1 1 2

Upload: shanon-hancock

Post on 16-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Combining Symbolic Simulation and Interval Arithmetic for the Verification of

AMS Designs

Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar,

Guy Bois

FMCAD'07November 14th , 2007

1

1 Hardware Verification Group, ECE Department, Concordia University

2 Génie Informatique, Ecole Polytechnique de Montréal

1 1

2

Page 2: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

• Introduction• Related Work• Verification Methodology

– Modelling AMS Designs– Symbolic Simulation– Verification Algorithm

• Applications– ΔΣ Modulator– Analog Oscillator

• Conclusion

Outline

Page 3: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

A cornerstone in embedded systems are analog and mixed signal (AMS) designs, usually needed at the interface with the real world.

A cornerstone in embedded systems are analog and mixed signal (AMS) designs, usually needed at the interface with the real world.

AMS applications

• Front-end: sensors, amp., filters, A/D

• Back-end: D/A, filters, oscillators, PLL

• High performance digital circuits

MicroprocessorMemory

DSP

AMS

Control Logic

ROM RAM

AnalogRF

TransceiverDAC ADC

DIGTAL

AMS

MicroprocessorMemory

DSP

AMS

Control Logic

ROM RAM

AnalogRF

TransceiverDAC ADC

DIGTAL

AMS

Introduction

One important issue in the design process is verification.Used verification methods: Simulation and Symbolic Analysis.One important issue in the design process is verification.Used verification methods: Simulation and Symbolic Analysis.

Formal Verification for AMS?Formal Verification for AMS?

Page 4: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Problem in AMS Verification

• Contains continuous components

• Infinite continuous state space

• Dense time

• Strong nonlinear behavior with digital components

Exhaustive simulation is out of reach

The closed form solution of differential equations is only possible for specific cases

Page 5: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Formal verification for AMS: Kurshan ’91, Greenstreet ’98, Gupta’04, Dang’04, Hartong’05, Myers’05, Frehse’06

Verified Designs: - modulators, filters, oscillators, VCO…Used Tools: d/dt, PHAVer, Checkmate, Coho…

• Basic Idea: Approximate Analysis using (e.g.: interval, polyhedral).• Pros: guaranteeing the inclusion of the solution, hence soundness• Cons: computationally expensive, low dimension systems.

Motivation

Page 6: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Motivation

Proposed Methodology

The idea is based on approximation byinterval Taylor model forms

We propose a recurrence equations based bounded model checking approach for AMS systems.

Symbolic part Interval part

Page 7: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Verification Methodology

Temporal Property

Symbolic Simulation

Interval based

Bounded Model Checking

Property is False (Counterexample Generated)

Combined SRE

RecurrenceEquations

AMS System

Continuous- Time Digital

Discrete-Time

Taylor Approximation

Property is Proved True for a Bounded Time

Page 8: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Temporal Property

Symbolic Simulation

Interval based

Bounded Model Checking

Property is False (Counterexample Generated)

Property is Proved True for a Bounded Time

Combined SRE

RecurrenceEquations

AMS System

Continuous- Time Digital

Discrete-Time

Taylor Approximation

AMS Modelling

Page 9: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

A large class of AMS designs can be modeled using piecewise differential equations.

The analog behavior is governed by the differential equations:

Differential Equations

AMS exhibits piecewise behavior due to:

• Abrupt change in input signal, parameters• Change in the analog behavior• Events generated by control logic, switching conditions

AMS exhibits piecewise behavior due to:

• Abrupt change in input signal, parameters• Change in the analog behavior• Events generated by control logic, switching conditions

AMS designs are described using discrete time, continuous time analog behavior interacting with discrete digital components.

Page 10: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Extending System of ODEs using Generalized Piecewise Formula

Extending System of ODEs using Generalized Piecewise Formula

If-Expression (If[Cond, y, z])

Logical, comparison or arithmetic formula

A closed form solution is generally not available for ODE systems and discrete approximate models are used.

Differential Equations

Page 11: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

RE indexRE index

Extending System of Recurrence EquationsExtending System of Recurrence Equations

The generalized If-formula is a class of expressions that extend recurrence equations [Al Sammane’05] to describe digital and mixed signal designs

If-Expression (If[Cond, y, z])

Logical, comparison or arithmetic formula

Recurrence Equations

Page 12: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Requirement:- Discrete sampling that captures all the different states in the continuous evolution.

Approximation of the ODE as truncated Taylor series expanded about time instant with a remainder term

Behavior Mapping

:=:

:=:

Map Piecewise ODE to SRE

Page 13: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

The ODE system under certain assumptions, can be time descretized using Taylor Approximation

Taylor Approximation

Such representation allows an approximate polynomial description of the behavior of an ODE system using SRE.

Remainder

Page 14: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

AMS Example

Page 15: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

AMS Example

Page 16: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

To preserve the original behavior, the remainder term should not be discarded and instead bounds must be specified.

Intervals are numerical domains that enclose the original states of a system of equations at each discrete step

Intervals are numerical domains that enclose the original states of a system of equations at each discrete step

Taylor Models Approximation

Symbolic part Interval part

Taylor Model ApproximationTaylor Model Approximation

Page 17: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

• Taylor model arithmetic developed as an interval extension to Taylor approximations

• Allowing the over- approximation of system reachable states using non-linear enclosure sets.

• Preserve relationships between state variables.

Taylor Models Approximation

A Taylor model for a given function f consists of a multivariate polynomial pn(x) of order n, and a remainder interval I, which encloses Lagrange remainder of the Taylor approximation

Symbolic SimulationSymbolic Simulation

Page 18: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Verification Methodology

Temporal Property

Symbolic Simulation

Interval based Bounded Model Checking

Symbolic Rewriting Phase

Verification Phase

Property is False (Counterexample Generated)

Property is Proved True for a Bounded Time

Next Interval States

Combined SRE

RecurrenceEquations

AMS System

Continuous- Time Digital

Discrete-Time

Taylor Approximation

Page 19: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

The symbolic simulation algorithm to obtain the generalized SRE is based on rewriting by substitution.

The symbolic simulation algorithm to obtain the generalized SRE is based on rewriting by substitution.

Substitution rules

Symbolic Simulation

Polynomial symbolic expressions

Logical symbolic expressions

If-formula expressions

Interval expressions

Interval-Logical expressions

Taylor Models expressions

Page 20: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Substitution Fixpoint

Symbolic Simulation Algorithm

Symbolic Simulation

Rewrites using two rules

Example

Page 21: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Interval Rules

To preserve the original behavior, the remainder term should not be discarded and instead bounds must be specified.

Intervals are numerical domains that enclose the original states of a system of equations at each discrete step

Intervals are numerical domains that enclose the original states of a system of equations at each discrete step

Basic interval arithmetic operators can be defined as follows:Basic interval arithmetic operators can be defined as follows:

Page 22: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Interval analysis provides methods for checking truth values of Boolean propositions over intervals by using the notion of inclusion test

Interval analysis provides methods for checking truth values of Boolean propositions over intervals by using the notion of inclusion test

Inclusion test:Inclusion test:

Examples:Examples:

Interval Rules

Page 23: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

• The evaluation of a function is transformed to symbolically computing the Taylor polynomial of the function.

• Taylor polynomial will be propagated throughout the evaluation steps.

• Only the interval remainder term and polynomial terms of high orders are bounded using intervals.

Taylor Models Rules

Page 24: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Example:

Arithmetic over Taylor Model

id

Vid Vid

Page 25: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Example

x, y bound

Page 26: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Verification Methodology

Temporal Property

Symbolic Simulation

Interval based Bounded Model Checking

Symbolic Rewriting Phase

Verification Phase

Property is False (Counterexample Generated)

Property is Proved True for a Bounded Time

Next Interval States

Combined SRE

RecurrenceEquations

AMS System

Continuous- Time Digital

Discrete-Time

Taylor Approximation

Page 27: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Bounded model checking (BMC) algorithm relying on symbolic and interval computational methods

Properties

Bounded Model Checking

Page 28: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Computing the (overapproximate) reachable states is based on image computation.

Bounded Model Checking

Page 29: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Divergence problem in the interval based reachability calculation due to: 1) Dependency problem. 2) Wrapping effect

Evaluation of the reachable states over interval domains

Over-approximation guarantee: Every trajectory in the initial system, is included in the interval-based reachable states.

Example: x - x = 0 for x in [1, 2], but X – X = [-1, 1] for X = [1, 2]

Bounded Model Checking

Page 30: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

is an interval evaluation of Taylor model form of the function

Overapproximation guarantee: Every trajectory in the initial system, is included in the Taylor Model based reachable states.

Computing the (overapproximate) reachable states is based on image computation.

Bounded Model Checking

Page 31: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Bounded Model Checking

Page 32: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

3rd ModulatorExample

Page 33: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Application

VerifiedVerifiedNot Verified with Counterexample

Not Verified with Counterexample

Page 34: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

Divergence

Application

Page 35: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

• We presented a formal verification methodology for AMS designs.• Methodology based on symbolic rewriting and Interval methods• Continuous time is approximated using Taylor models• Avoiding conventional Interval arithmetic like wrapping effect.• Continuous state space is handled using symbolic-interval computations• Allowing the over- approximation of reachable states using non-linear

enclosure sets.•Methodology implemented using the Mathematica computer algebra system

Conclusion

Future Work:Future Work:• Automatic extraction of SREs form HDL-AMS designs.• Definition of an expressive property language for specifying properties of AMS designs.• Explore more complex case studies.

Page 36: Combining Symbolic Simulation and Interval Arithmetic for the Verification of AMS Designs Mohamed Zaki, Ghiath Al Sammane, Sofiene Tahar, Guy Bois FMCAD'07

THANKS!

More Info at hvg.ece.concordia.ca