advanced verification techniques for do-254

38
Advanced Verification Techniques for DO-254 Test and Verification Solutions Mike Bartley ([email protected]) Delivering Tailored Solutions for Hardware Verification and Software Testing

Upload: vicky-bash

Post on 07-Jul-2016

15 views

Category:

Documents


4 download

DESCRIPTION

Advanced Verification Techniques for DO-254

TRANSCRIPT

Page 1: Advanced Verification Techniques for DO-254

Advanced Verification

Techniques for DO-254

Test and Verification Solutions

Techniques for DO-254Mike Bartley ([email protected])

Delivering Tailored Solutions for

Hardware Verification and Software Testing

Page 2: Advanced Verification Techniques for DO-254

Agenda

� Some background

� Advanced Verification Techniques

� Compliance

Copyright TVS Limited | Private & Confidential | Page 2

� Compliance• Hardware

• (Software)

� Combining Advanced Verification Techniqueswith Compliance

Page 3: Advanced Verification Techniques for DO-254

A Quick Intro to your Speaker

� PhD in Mathematical Logic

� Worked in software testing and hardware verification for over 25 years

• IPL, Praxis, ST-Micro, Infineon, start-ups (Elixent and ClearSpeed)

• TVS

Copyright TVS Limited | Private & Confidential | Page 3

� Started TVS in 2008

• Software testing and hardware verification products and services

Page 4: Advanced Verification Techniques for DO-254

TVS – Leaders in Testing and Verification

India - 2011

UK - 2008

Germany - 2011

France - 2012

Singapore - 2014

China

South Korea

2014-15

Continuous geographical expansion…

Copyright TVS Limited | Private & Confidential | Page 4

Singapore - 2014

2011-12

£ 1.5M

2012-13

£ 2.5M

2013-14

£ 3.5M

2014-15

£ 4M+

expansion…

Consistent revenue growth…

� Deliver services closer to our customers

� Services where costs & staff availability are important factors

� Run projects on client sites or off-site

� Help customers implement off-shore verification and testing

Page 5: Advanced Verification Techniques for DO-254

Customers and Customer Retention

Broadcom2 years

Infineon5 years

Intel

Copyright TVS Limited | Private & Confidential | Page 5

Intel2 years

NVIDIA4 years

NXP2.5 years

ST3 years

Page 6: Advanced Verification Techniques for DO-254

Some “advanced” verification techniques

� Constrained Random

� Functional Coverage

� Code Coverage

� Formal Verification

� Regression results metrics

Bug rate analysis

“Verification -it's all about confidence”Mike Bartley, SNUG 2001

Copyright TVS Limited | Private & Confidential | Page 6

� Bug rate analysis

� Analysis of open issues

� Code review completion

� Mutation analysis

� Software running

� Independent verification team

� Are all requirements verified?

Which ones to adopt?

Page 7: Advanced Verification Techniques for DO-254

The Human Factor in Verification

Why do we need separate verification team?

� Errors are introduced by (mis)interpretation.

SpecificationInterpretation

RTL Coding

VerificationDANGER: When a designer verifies

RTL

Assumes you have a specification!

Copyright TVS Limited | Private & Confidential | Page 7

VerificationDANGER: When a designer verifies her/his own design – then she/he

is verifying her/his own interpretation of the design

Specification

Interpretation RTL Coding

RTL

VerificationInterpretation

Page 8: Advanced Verification Techniques for DO-254

Functional Verification TrendsIndustry evolving its functional verification techniques

72%

72%

64%

69%

40%

48%

41%

37%

Functional coverage

Code coverage

Constrained-Random Simulation

Assertions

2007

2010

Wilson Research Group and Mentor Graphics2010 Functional Verification Study, Used with permission

Listen to the 2012 surveyHarry Foster at

Copyright TVS Limited | Private & Confidential | Page 8

0% 10% 20% 30% 40% 50% 60% 70% 80%

19%

29%

0%

5%

10%

15%

20%

25%

30%

35%

2007 2010

2007

2010

Median peak number of

verification engineers

The adoption of formal property checking has grown by 53%

Harry Foster at DVClub April 8th

Page 9: Advanced Verification Techniques for DO-254

The mechanics of an advanced test bench

Test CheckerFunctional

Coverage

Monitor

Coverage

Copyright TVS Limited | Private & Confidential | Page 9

Driver Stimulusgenerator

Design Under Test

assert

constraint

addr data Assertions

Coverage

Active PassiveCode Coverage

Page 10: Advanced Verification Techniques for DO-254

What is functional Coverage? Examples

� The system may transfer packets of different sizes• The test plan may require that transfer sizes with the

following size or range of sizes be observed:

• 1, 2, 3, 4 to 127, 128 to 252, 253, 254, or 255

� Functional coverage also examines the

Copyright TVS Limited | Private & Confidential | Page 10

� Functional coverage also examines the relationships between different objects• Cross coverage

• An example of this would be examining whether an ALU has done all of its supported operations with every different input pair of registers

• And if the ALU has written back to an input register

Page 11: Advanced Verification Techniques for DO-254

Adding value to your current test bench

CheckerFunctional

Coverage

Monitor

Coverage

Copyright TVS Limited | Private & Confidential | Page 11

Design Under

Testassert

Assertions

CoverageActive

Passive

Existing

Test

Bench

Existing

Test

Bench

Existing Test Bench

Code Coverage

Page 12: Advanced Verification Techniques for DO-254

Add advanced techniques to your current test bench

Technique Effort Value

Code

Coverage

• Low effort to start measuring

• High effort to “sign-off” holes

• Very useful when < 100%

• When 100% - need other data

Functional

Coverage

• High effort to define a full coverage

model

• High effort to implement the

coverage model

• High effort to “sign-off” holes

• Check that major features are

fully verified

Copyright TVS Limited | Private & Confidential | Page 12

Assertions • Effort varies with number of

assertions

• High value with well defined

assertions

• High value for debug

Checker • Effort varies with sophistication of

the checker

• High value – can write tests

more quickly. Can consider

pseudo random

Constrained

random

• High effort – complex

• Needs a checker and fnal coverage

• Very high

Page 13: Advanced Verification Techniques for DO-254

The mechanics of finding a bug in simulation

PropagateStimulate

…..01010101

…..01001101

…..10011010

01100101…..

11110101…..

00010101…..

Copyright TVS Limited | Private & Confidential | Page 13

Design Under Test

…..10011010

…..0100110100010101…..

ActualResults

ExpectedResults

Compare

ObserveMutation testing adds value in terms of test suite qualification.

Page 14: Advanced Verification Techniques for DO-254

Add advanced techniques to your current test bench

Technique Effort Value

Code

Coverage

• Low effort to start measuring

• High effort to “sign-off” holes

• Very useful when < 100%

• When 100% - need other data

Functional

Coverage

• High effort to define a full coverage

model

• High effort to implement the

coverage model

• High effort to “sign-off” holes

• Check that major features are

fully verified

Copyright TVS Limited | Private & Confidential | Page 14

Assertions • Effort varies with number of

assertions

• High value with well defined

assertions

• High value for debug

Checker • Effort varies with sophistication of

the checker

• High value - High value – can

write tests more quickly. Can

consider pseudo random

Constrained

random

• High effort – complex

• Needs a checker and fnal coverage

• Very high

Mutation

Analysis

• Low effort to adopt a tool

• High effort to run and analyse output

• Low effort for “Do It Yourself”

• Very high if using tool –

discover quality of you verif.

• “DIY” will give useful feedback

Page 15: Advanced Verification Techniques for DO-254

The rise of design IPExternal IP increase by 138% from 2007 to 2010

Wilson Research Group and Mentor Graphics2010 Functional Verification StudyFPGA

PCIe FPGA

PCIe

Into Simulation

Copyright TVS Limited | Private & Confidential | Page 15

FPGA

PCIe

PCIehardware

VIP

Into the lab

Simulation

FPGA

PCIe VIP

Page 16: Advanced Verification Techniques for DO-254

Functional Verification Approaches

Verification

Reviews

DynamicStatic

PrototypingSimulationFormalCode

Copyright TVS Limited | Private & Confidential | Page 16

Reviews PrototypingSimulationFormalCode Analysis

Dynamic FormalLinters

TheoremProving

ModelChecking

EquivalenceChecking

Silicon

FPGA

Emulation

Page 17: Advanced Verification Techniques for DO-254

Formal Verification: Some example properties

� a_busy and b_busy are never both asserted on the

same cycle

� if the input ready is asserted on any cycle, then the

output start must be asserted within 3 cycles

Can be checked during

simulation (but not proved

by simulation)

The adoption of formal property checking has grown by 53%

Copyright TVS Limited | Private & Confidential | Page 17

output start must be asserted within 3 cycles

� if an element with tag t and data value d enters the

block, then the next time that an element with tag t

leaves the block, its data value is the same as the

output of a reference piece of combinatorial logic

for which the input is d

� stall cannot remain high indefinitely

Can be checked during

simulation (but not proved

by simulation)

A liveness property

Page 18: Advanced Verification Techniques for DO-254

Model Checking – a brief introductionInputs to the tool

� 3 inputs to the tool

• A model of the design

• A property or set of properties representing the requirements

• For example– Usually RTL

– Items are transmitted to one of three destinations within 2 cycles of being accepted

Copyright TVS Limited | Private & Confidential | Page 18

requirements

• A set of assumptions, expressed in the same language as the properties

• typically constraints on the inputs to the design

accepted

• (req_in && gnt_in) |-> ##[1;2] (rec_a || rec_b || rec_c)

– The request signal is stable until it is granted

• (req_in && !gnt_out) |-> ##1 req_in

• We would of course need a complete set of constraints

Page 19: Advanced Verification Techniques for DO-254

Model Checking – a brief introductionOutputs from the tool� Proved

• the property holds for all valid sequences of inputs

� Failed(n)

• there is at least one valid sequence of inputs of length n cycles, as

defined by the design clock, for which the property does not hold.

• In this case, the tool gives a waveform demonstrating the failure.

Copyright TVS Limited | Private & Confidential | Page 19

• In this case, the tool gives a waveform demonstrating the failure.

• Most algorithms ensure that n is as small as possible, but some more

advanced algorithms don’t.

� Explored(n)

• there is no way to make the property fail with an input sequence of n

cycles or less

• For large designs, the algorithm can be expensive in both time and

memory and may not terminate

Page 20: Advanced Verification Techniques for DO-254

The Strengths of Model Checking

� Ease of set-up

• No test bench required, add constraints as you go, VIP?

� Flexibility of verification environment

• Constraints can be easily added or removed

� Full proof

• Of the properties under the given constraints

Copyright TVS Limited | Private & Confidential | Page 20

• Of the properties under the given constraints

• (Can also prove “completeness” of the properties)

� Intensive stressing of design

• Explored(n) constitutes a large amount of exploration of the design

• Judgement when the number of cycles explored in a run is sufficient

• Significant bugs already found within a this number of cycles

� Corner cases

• Find any way in which a property can fail (under the constraints)

Page 21: Advanced Verification Techniques for DO-254

Potential issues with formal verification

� False failures

• Need constraints to avoid invalid behaviour of inputs

� False proofs

• Bugs may be missed in an over-constrained environment.

� Limits on size of the model that can be analysed

� Non-exhaustive checks: Explored(n)

Copyright TVS Limited | Private & Confidential | Page 21

� Non-exhaustive checks: Explored(n)

• Interpret the results

• Can require significant knowledge and skill

� Non-uniform run times

• Often it cannot be predicted how long it will take for a check either to

terminate or to reach a useful stage

This can make formal unpredictable!

Page 22: Advanced Verification Techniques for DO-254

Safety-critical Systems

� “A safety critical system is a system where human safety is dependent upon the correct operation of the system”

� Elements of safety critical systems: • Computer hardware

Copyright TVS Limited | Private & Confidential | Page 22

• Computer hardware

• Other electronic and electrical hardware

• Mechanical hardware

• Operators or users

• Software

� Traditionally associated with embedded control systems

Page 23: Advanced Verification Techniques for DO-254

Safety Standards

� IEC61508: Functional Safety of

Electrical/Electronic/Programmable Electronic Safety-related

Systems

� IEC60880: Software aspects for computer-based systems

performing category A functions

� DO178: Software considerations in airborne systems and

equipment certification

Copyright TVS Limited | Private & Confidential | Page 23

equipment certification

� DO254: Design Assurance Guidelines for Airborne Electronic

Hardware

� EN50128: Software for railway control and protection systems

� IEC62304: Medical device software -- Software life cycle

processes

� ISO26262: Road vehicles – Functional safety

Page 24: Advanced Verification Techniques for DO-254

Safety Standards

Copyright TVS Limited | Private & Confidential | Page 24

Process objectives and outputs

Integrity levels/classesPicture from Kyle Beane http://www.noisefestival.com/node/14294

Page 25: Advanced Verification Techniques for DO-254

DO-254 identifies the following data items

� Hardware Verification Plan

� Validation and Verification Standards

� Hardware Traceability Data

� Hardware Review and Analysis Procedures

� Hardware Review and Analysis Results

Copyright TVS Limited | Private & Confidential | Page 25

Hardware Review and Analysis Results

� Hardware Test Procedures

� Hardware Test Results

� Hardware Acceptance Test Criteria

� Problem Reports

� Hardware Configuration Management Records

� Hardware Process Assurance Records

Page 26: Advanced Verification Techniques for DO-254

DO-254 identifies the following data items

� Hardware Verification Plan

� Validation and Verification Standards

� Hardware Traceability Data

� Hardware Review and Analysis Procedures

� Hardware Review and Analysis Results

Copyright TVS Limited | Private & Confidential | Page 26

Hardware Review and Analysis Results

� Hardware Test Procedures

� Hardware Test Results

� Hardware Acceptance Test Criteria

� Problem Reports

� Hardware Configuration Management Records

� Hardware Process Assurance Records

Page 27: Advanced Verification Techniques for DO-254

A closer look

� Hardware Verification Plan

• The hardware verification plan describes the procedures,

methods and standards to be applied and the processes and

activities to be conducted for the verification of the

hardware items.

� Hardware Traceability Data

Copyright TVS Limited | Private & Confidential | Page 27

� Hardware Traceability Data

• Hardware traceability establishes a correlation between the

requirements, detailed design, implementation and

verification data to support configuration control,

modification and verification of the hardware item

Page 28: Advanced Verification Techniques for DO-254

ISO 26262 Requirements Management

Stakeholder Requirements(Customers and internal)

Product Requirements

Requirements

ISO 26262 Stipulates“The management of safety requirements includes managing requirements, obtaining agreement on the requirements, obtaining commitments from those implementing the requirements, and maintaining traceability.”

Copyright TVS Limited | Private & Confidential | Page 28

Dow

nstr

eam

Ups

tream Intent to

implement

Intent toverify

Safety Requirements

System and Module Specs

Verification & Test Plans

Proof ofimplementation

Verification & Test Results

Page 29: Advanced Verification Techniques for DO-254

REFINING THE REQUIREMENTS TO TEST DESCRIPTION LEVEL

Measurable goalsRefined

requirements

(sub-features and goals)

Refined requirements

(sub-features)

Feature Level Requirements

(Top-Level test Plan)

Req1.1Req1.1.1

Goal1.1.1.1

Copyright TVS Limited | Private & Confidential | Page 29

Req1Req1.1.2

Req1.2

Req1.2.1

Goal1.1.1.2

Goal1.1.2.1

Goal1.2.1.1Goal1.2.2

Page 30: Advanced Verification Techniques for DO-254

COMPLIANCE : HIERARCHICAL SET OF REQUIREMENTS

Copyright TVS Limited | Private & Confidential | Page 30

Page 31: Advanced Verification Techniques for DO-254

What are the implications for Requirements Signoff?

� Just mapping a requirement to a directed test is NOT sufficient

� Requirements need to map to• Tests

• Directed

• Constrained random with a particular seed

• Coverage

Copyright TVS Limited | Private & Confidential | Page 31

• Coverage• Code, functional and assertion

• Checkers• Dynamic and Static

• Proofs

� Need to automate• Test pass and fail

• Coverage collection and reporting

• Checker pass and fail

� All linked to configuration management data

Page 32: Advanced Verification Techniques for DO-254

Using Data From Advanced Verification

EDA DB UCIS API

Copyright TVS Limited | Private & Confidential | Page 32

Requirements

TestPlan

Page 33: Advanced Verification Techniques for DO-254

Doors Doors

Using Data From Advanced Verification

EDA DB UCIS API

Copyright TVS Limited | Private & Confidential | Page 33

Requirements

TestPlan This is

VERY hard (DXL?)

Can be done.But hard to update

with results

Page 34: Advanced Verification Techniques for DO-254

asureSIGNDoors

Using Data From Advanced Verification

EDA DB UCIS API

This is Done

Copyright TVS Limited | Private & Confidential | Page 34

Requirements

TestPlan

Can be done easily in

asureSIGN

DB

Page 35: Advanced Verification Techniques for DO-254

MAPPING GOALS TO COVERAGE OR TESTS

Copyright TVS Limited | Private & Confidential | Page 35

Page 36: Advanced Verification Techniques for DO-254

PROJECT HISTORY GRAPH

• Is a key indicator of the overall progress of the project.

• Any dip or peaks indicate debugging and corrective actions may be required.

Page 37: Advanced Verification Techniques for DO-254

Summary

• Increasing design complexity requires more advanced verification techniques

• DO254 will allow for such techniques BUT

• We need to ensure we can still map requirements to verification results

– This is a lot more complex than for directed testing

Page 38: Advanced Verification Techniques for DO-254

Contact details

� Mike Bartley

[email protected]

� Mobile: +44 (0) 7796 307958

� Fax: 0117 903 9001

Copyright TVS Limited | Private & Confidential | Page 38

� Fax: 0117 903 9001