20
Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov Yoav Katz, Michael Vinov IBM Research Laboratory in IBM Research Laboratory in Haifa Haifa

Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

Embed Size (px)

Citation preview

Page 1: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

Intelligent Interleaving of Scenarios:A Novel Approach to System Level Test Generation

Shady Copty, Itai Jaeger(*), Shady Copty, Itai Jaeger(*), Yoav Katz, Michael VinovYoav Katz, Michael Vinov

IBM Research Laboratory in IBM Research Laboratory in HaifaHaifa

Page 2: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

2

OutlineOutline

System-level stimuli generation challengesSystem-level stimuli generation challenges Interaction based testcase generationInteraction based testcase generation X-Gen: a system-level testcase generatorX-Gen: a system-level testcase generator Scenario interleaving in X-GenScenario interleaving in X-Gen Real life experience examplesReal life experience examples

– eServer, Cell BE, Xbox CPU chipeServer, Cell BE, Xbox CPU chip

SummarySummary

Page 3: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

3

System verificationSystem verification

System verification is System verification is aimed at validating the aimed at validating the integrationintegration of several of several

previously previously verified verified corescores in a in a relatively relatively

short timeshort time

Page 4: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

4

Challenges in Stimuli Generation forSystem Level Functional Verification

Challenges in Stimuli Generation forSystem Level Functional Verification Specifying system level scenarios in an abstract Specifying system level scenarios in an abstract

formform–While generating the required low level stimuliWhile generating the required low level stimuli

Generating coordinated system-level stimuliGenerating coordinated system-level stimuli–Projected to each and every core in the systemProjected to each and every core in the system

Effectively handling configuration changesEffectively handling configuration changes–2-way system vs. 8-way system2-way system vs. 8-way system

Adapting to core modifications and new coresAdapting to core modifications and new cores–PCI PCI PCIe PCIe

Page 5: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

5

The concept of interactionThe concept of interaction Capturing the essence of the system-level Capturing the essence of the system-level

functionalityfunctionality– CPU-to-memory read/writeCPU-to-memory read/write– CPU-to-CPU inter processor interruptCPU-to-CPU inter processor interrupt– CPU initiated MMIOCPU initiated MMIO– IO initiated DMAIO initiated DMA– ……

Interaction: acts, actorsInteraction: acts, actors Independent of the system’s configurationIndependent of the system’s configuration Agnostic to specific core detailsAgnostic to specific core details

Page 6: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

6

A DMA Interaction

The concept of interaction - exampleThe concept of interaction - example

A CPU stores to the doorbell register of the DMA engine

PLB

CPU#4CPU#3CPU#2CPU#1

DMAEngine

BridgeInterrupt Controller

Memory

PHB

IO BFM#2

IO BFM#1

The data is moved from the IO port to memory

The DMA engine interrupts the initiating CPU

Page 7: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

7

Interaction based scenariosInteraction based scenarios

Stress the system bus through address contention on requests from multiple devices

Verification goal

Generate multiple IO reads, DMAs, and processor accesses to the same address

Test plan definition

Generate contention on the system busInteraction based scenario

Page 8: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

8

X-Gen: a model-based system-level stimuli generator

X-Gen: a model-based system-level stimuli generator

Test Template

*.rqst

X-Gen Engine

Interactions

(Transactions) Configuration

(Topology)

Components

(Cores)

Abstract System Model

Test Case

CSP Solver

Specifying an interaction-based

scenarios

Page 9: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

9

Interaction as the basic Interaction as the basic building blockbuilding block

Control over:Control over:– Participating coresParticipating cores– Interaction propertiesInteraction properties

A hierarchy if higher A hierarchy if higher level statementslevel statements– One-of: weighted One-of: weighted

random choicerandom choice– RepeatRepeat– All-ofAll-of

Request file

All of

Repeat x10

Load / store DMA interrupt

Target: mem2 Addr: 0x12?? Priority: 12-14

One of

Weight: 70 Weight: 30

A system-level test templateA system-level test template

Page 10: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

10

A system-level test caseA system-level test case

Processors

• Instructions

• Registers initializations

• Translation tables

Memory

• Data initializations

Behaviorals (BFMs)

• Internal memory initializations

• Commands, such as:

•Send an interrupt

•Initiate a DMA

Hubs, bridges, adaptors

• Translation tables

• Data descriptors for send / receive operations

• Internal registers initializations

PLB

CPU#4CPU#3CPU#2CPU#1

DMAEngine

BridgeInterrupt Controller

Memory

PHB

IO BFM#2

IO BFM#1

Page 11: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

11

Combining scenariosCombining scenarios Stressing the system through parallel Stressing the system through parallel

execution of several system level execution of several system level scenariosscenarios

For example:For example:– Read/write cache coherency from multiple Read/write cache coherency from multiple

processorsprocessors– MMIO / DMA to IO portMMIO / DMA to IO port– Inter processor interruptsInter processor interrupts

– Create address contention between DMAs Create address contention between DMAs and processor accessesand processor accesses

– Send interrupts to processors contending Send interrupts to processors contending on the same cache lineon the same cache line

Page 12: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

12

CPU_to_memory_data_tarnsfer

IO_to_memory_DMA

CPU_to_memory_data_tarnsfer

CPU_to_memory_data_tarnsfer

IO_to_memory_DMA

IO_to_memory_DMA…

Scenario interleaving in X-GenScenario interleaving in X-Gen

CPU.rqst

- Repeat 80- CPU_to_memory_data_tarnsfer

IO.rqst

- Repeat 70 - IO_to_memory_DMA

X-GenTotal: 150

interactionsAccessing the same address

Page 13: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

13

eServer system verification: Partitioned system-level testtemplate library

eServer system verification: Partitioned system-level testtemplate library

Cache coherency scenarios

PCI bridge stress scenarios

InfiniBand message passing

scenarios

Intervention scenarios

X-Gen

Maintenance saving:

avoiding exponential test template growth

Page 14: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

14

Xbox 360 chip verification :Reusing scenariosXbox 360 chip verification :Reusing scenarios

eServer MP/MT scenarios

Xbox specific IO scenarios

X-Gen

Heavy vIP reuse:generating complex

system-level testcases within weeks from verification launch

Page 15: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

15

General cell scenarios

Power management

function

Performancemanagement

function

X-GenMain scenario

Main scenario

Power down unit XXX

Main scenario

Main scenario

Restart unit XXX

Main scenario…

Cell BE verification:Verifying pervasive functionsCell BE verification:Verifying pervasive functions

Main scenario

Slow down unit YYY

Main scenario

Power down unit XXX

Main scenario

Main scenario

Resume frequency on unit YYY

Restart unit XXX

Main scenario…

Page 16: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

16

SummarySummary Interleaving transaction-level scenarios is crucial Interleaving transaction-level scenarios is crucial

for system-level verificationfor system-level verification Partitioning the test plan according to different Partitioning the test plan according to different

system functions system functions – Avoids costly maintenance of test templatesAvoids costly maintenance of test templates– Promotes reuse of verification IPPromotes reuse of verification IP– Fast and effective verification of pervasive Fast and effective verification of pervasive

functions in conjunction with “mainstream” functions in conjunction with “mainstream” scenariosscenarios

Implemented in X-GenImplemented in X-Gen– IBM’s system-level testcase generatorIBM’s system-level testcase generator– Used in the verification of eServer, Xbox & Cell Used in the verification of eServer, Xbox & Cell

systemssystems

Page 17: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

Thank You !!!

Page 18: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

18

Traditional Approach #1:Combining Lower Level DriversTraditional Approach #1:Combining Lower Level Drivers

AdvantagesAdvantages– SimpleSimple– Quickly adapts to new Quickly adapts to new

corescores– Reuse of core VIPReuse of core VIP

DisadvantagesDisadvantages– Not system level Not system level

verificationverification• No coordinated No coordinated

stimulistimuli• No system level No system level

scenariosscenarios

IP1

Driver

IP2

Driver

IP2

Driver

Driver Driver Driver BUS

Page 19: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

19

Traditional approach #2:Transaction Based VerificationTraditional approach #2:Transaction Based Verification

AdvantagesAdvantages– System level System level

abstractionabstraction– Allows complex Allows complex

coordinated coordinated stimuli stimuli

– Allows reuse of test Allows reuse of test specificationspecification

DisadvantagesDisadvantages– Transactor code is Transactor code is

monolithicmonolithic– Difficult to adapt to Difficult to adapt to

configurationconfigurationchangeschanges

– Difficult to adapt to Difficult to adapt to newnewcomponents / components / changedchangedfunctionality functionality

IP1

Transactor

BUS

IP2 IP2

Driver

Transactor

Page 20: Intelligent Interleaving of Scenarios: A Novel Approach to System Level Test Generation Shady Copty, Itai Jaeger(*), Yoav Katz, Michael Vinov IBM Research

20

Request files: a dual effort methodologyRequest files: a dual effort methodology

Specifying a scenarioSpecifying a scenario Interactions as building blocksInteractions as building blocks Restrict actors, propertiesRestrict actors, properties Inter-interaction relationsInter-interaction relations

Request file

All of

Repeat x10One of

DMA

transfer

CPU load /

storeInterrupt

Read: 80

Write: 20

Address

Collision: 65%

The Bug

Intelligent background noiseIntelligent background noise Built-in testing knowledgeBuilt-in testing knowledge User directionUser direction