57
Software-Based Self-Testing of Processors Contents crafted by Professor Dimitris Gizopoulos University of Piraeus Computer Systems Laboratory

Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

  • Upload
    lamkhue

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Software-Based Self-Testing of Processors

Contents crafted byProfessor Dimitris Gizopoulos

University of PiraeusComputer Systems Laboratory

Page 2: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Talk Outline

Integrated Circuits Testing and Processors Testing• Definitions and Cost considerations• External Testing vs. Self-Testing• Functional Testing vs. Structural Testing

Software-Based Self-Testing (SBST) Paradigm• Basic idea• Levels of application• Targeting different building blocks

SBST state-of-the-art• An SBST research evolution

• From integer arithmetic units to high-performance microprocessors and multiprocessors

• Academic research work and groups• Industrial applications

Future Directions and Conclusions

Page 3: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Processors and Microprocessors

Processor design has always been a challenge and a driving force for advances

Processor design objectives • functionality• performance• power consumption• size• configurability• testability – dependability

• Talk focus: Software-Based Self-Testing as a mechanism for improved Testability and Dependability

General purpose

μP

MPSoC

ePDSP

eDSP

ASIP SMP

PL1

PL1

PL1

PL1

L2

Page 4: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

IC Testing Purpose and Objectives

Testing – measuring the quality of a manufactured chip• Is the chip manufactured as designed ? (structural testing)• Does it operate in the field of application as specified ? (functional testing)

Testing has been and will always be a very complex but necessary step Reject imperfect ICs before shipping product to customers

• Eliminate/reduce test escapes for product quality

ManufacturedChips

Good Chips

DefectiveChips

Prob(good) = y

Prob(bad) = 1 – y

Prob(passes-test) = high

Prob(fails-test) = high

Prob(fails-test) = low

Prob(passes-test) = low

“Almost”GoodChips

“Almost”Defective

Chips

Testing as a Filtering ProcessEssentials of Electronic Testing for Digital, Memory and Mixed-Signal VLSI Circuits, M.Bushnell and V.Agrawal, Springer, November 2000, ISBN 0792379918.

Page 5: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Is Processor Testing a New Challenge?

Processor Testing is not a new challenge, not a new adventure• It has always been a significant part of the processor development flow• But today IC (and processor) testing is getting worse

According to major system companies:• testing can get up to 50-60% of the total manufacturing cost • “verification and manufacturing testing is the major capital cost, not the

billion dollar silicon fabrication lines” According to the International Technology Roadmap for Semiconductors

(ITRS) forecast – 2006 update (http://www.itrs.net):• It will cost more to test a transistor than to manufacture it.• Manufacturing test cost is one of the most difficult challenges

semiconductors industry will have to deal with over the next 5-10 years.• Testing cost > 50% of total manufacturing cost.• Automatic Test Equipment will cost > $20M each.

Page 6: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Trends and Costs of IC Testing

Increasing test cost• Test cost may surpass fabrication cost by 2014 (ITRS Roadmap)

High clock speedDSM technology

→ At-speed testing

IC/testerperformance gap

→ Self-test

Diversedesign styles→ Adaptability

Increasingdesign complexity

→ Scalability“A Scalable Software-Based Self-Test Methodology for Programmable Processors”, L.Chen, S.Ravi, A.Raghunathan, S.Dey, ACM/IEEE Design Automation Conference 2003

Moore’s law in danger?→ Test problems!

Page 7: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Why IC Testing is getting more Difficult?

Very deep submicron (VDSM) integrated circuits:• billions of transistors (many functional blocks and storage elements); pin

counts increase much slower (reducing pin-to-gate ratio)• problem: internal blocks are hard-to-access (apply tests and observe

responses) but methodologies should test each component• very dense structure, “new/immature” processes

• problem: new types of physical failures and defects; fault counts increase (extreme number of fault sites and faulty behavior)

• very high frequencies and low voltage (extreme conditions)• problem: comprehensive testing only at actual speed of operation (at-speed

testing)• vulnerability to environmental factors, e.g. radiation (extreme conditions)

• problem: on-line testing in the field is necessary to verify continuous operation of the IC after fabrication even at sea level

Yes, indeed, IC testing is a big problem!

Page 8: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Basic Integrated Circuits Testing Terms

Manufacturing testingOn-line/field testingTest pattern/vector and test responseControllability, ObservabilityTestabilityDesign-for-Test (DfT)Scan-based testingFault model

• Stuck-at fault model• Delay fault models

• Transition delay – Path delay

Fault-free/faulty circuitFault detectionFault diagnosisTest pattern generationFault simulationFault/Defect coverageExternal testingSelf-testing

• or Internal testing • or Embedded testing• Hardware-based or Software-based

Page 9: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Test Equipment

IC Tester or Automatic Test Equipment (ATE)• Equipment for manufacturing IC testing• “Big iron” or “Functional” testers

Low-cost tester• ATE with smaller

• memory size• frequency• pin count

Page 10: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Verification vs. Testing

Verification • checks if a specification is correctly transformed to a design

Testing • checks if a design is correctly manufactured in a chip

Fault observation • faulty values transferred to “readable” locations: outputs or memory

elements• big problem in testing

• takes large test development and test application times…• not a problem in simulation-based verification: any signal observed in the

simulator

Page 11: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Major IC Testing Challenges and Objectives

What should be optimized:• Test development time (better engineering, EDA tools and DFT)• Test application time (use of test equipment is costly)• Test data volume (tester memory is expensive)• Test application frequency (need test quality: at-speed testing)• Fault models (closer to actual silicon defects) – test quality• Test power consumption (manufacturing testing, on-line testing)• ATE inaccuracies (measurements, frequency gap ATE vs. IC)• Yield loss (due to tester inaccuracies and over-testing)

Any test methodology tries to optimize some (can’t do all…) of the above

• Software-based self-testing tries the same• Complements already known test techniques

Page 12: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

External Functional Testing

External, ATE-based Testing Functional Testing

• ATE (tester) applies test patterns at chip input pins• ATE collects chip responses• ATE resembles “external world”• Large, expensive tester memory for test data (patterns and responses)

Chip under Test

Chip under Test

ATE

test patterns

test responses

Page 13: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

External Testing for Processors

External “Functional” Testing for Processors• Tester must emulate the “external world” of the processor

• Mainly the memory system

CPUdesign

Test programand data

Simulation trace

ATE programtest patterns/responses

Simulation Actual Test Application

CPUchip

Standard Test InterfaceLanguage (STIL)

or other

memory

Page 14: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Functional Testing

Functional Testing Facts• Expensive ATE

• Large, high-speed memories for test patterns/responses• At-speed testing• Fault coverage for different fault models or no fault model• No extra hardware

• No performance or area overheads• Can do performance characterization (speed-binning)• May not be easy to excite all circuit areas

Functional testing alone is not enough

Page 15: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Structural (Scan-Based) Testing

Functional testing just asks:• “Does the chip do what it is designed to do?”

Structural testing adds structural information • Circuits elements and their interconnections• “Are all circuit elements present and working?”

• If this is true, and the design is correct, then it must work Classic structural testing: scan-based

Combinational Logic

Q D

Q D

Before ScanPrimary Inputs

Primary Outputs

Clock

Combinational Logic

Q DSESI

After ScanPrimary Inputs

Primary Outputs

Clock

Q DSESI

Scan Out

Scan In

Scan Enable

Page 16: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Structural (Scan-Based) Testing (cont.)

Structural Testing Facts• Can use either high-end ATE or low-cost ATE• High fault coverage

• Better access to chip’s interior – with scan (DFT) support• EDA tools support – full automation• Extra hardware (area and/or performance penalty: 5-10%)• Very large test data volume (patterns/responses)

• Large scan chains• Can’t do performance characterization (speed-binning)• May lead to over-testing

• Testing for faults that will never appear in any functional mode• Yield loss

Structural Testing alone is not enough

Page 17: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Self-Testing: Circuit Tests Itself

Self-testing moves the two test phases (test application and response collection) into the chip itself

• No test patterns/responses are stored in ATE• Any ATE can be used or no ATE at all

• At-speed testing• Chip itself applies and captures

• Can be either functional or structural• May use scan infrastructure or not• Scan-based, pseudorandom-based self testing (Fig)

• EDA support• Logic BIST and Memory BIST

• Extra hardware (area and performance overheads)• Extra power consumption• Over-testing

Circuit under testTPG

ORA

Page 18: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Hardware-Based vs. Software-Based Self-Test

Self-testing for processors or any processor-based SoC can be• Hardware-based (as for any IC)

• Extra hardware is added for test application and response capture• Pseudorandom Pattern Generators (PRPG), Linear Feedback Shift Registers

(LFSR), Multiple Input Signature Registers (MISR)• Scan chains

• Software-based (Instruction-based)• Processor instructions/programs are executed to apply test patterns to:

– Internal components of the processor itself– Other SoC components out of the processor (memories, etc)

• Key idea• Use the Instruction Set Architecture (ISA) and processor resources

(instructions, registers, functional units) to test the processor and surrounding components

Page 19: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Current Industrial Test Practices

Combination of these approaches used in practice No one-size-fits-all solution SBST is one more contribution to the problem

Scan

Functionaltest

BIST

Speed testLow overheadno over-testing

At-speed testLow-cost ATE

High-cost ATEManual test writingLow fault coverage

OverheadPower / yield loss

SystematicHigh fault coverage

OverheadSpeed test

Pros Cons

Page 20: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST as a New Test Paradigm

Goal – Enabling scalable low-cost at-speed self-test for• Processors• SoCs containing embedded processors

Processor• Re-use of the processor for another task: testing

• Used as general purpose computing platform for test Cost issues

• Test application – At-speed test with low-cost testers• Test generation – Systematic test program synthesis

Software-Based Self-Test (SBST)

BIST FuncScan

Page 21: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

At-Speed Test with Low-Cost Testers and SBST

memoryCPU

memoryCPU

Testprogram CPUHigh-

costtester

Simulationtrace @I/O pins

Traditional Functional Test

Software-Based Self-Test (SBST)

memoryCPU

test program

low-costtester

memoryCPU

test response

low-costtester

Page 22: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Software-Based Self-Testing: Basic Concept Low speed up/download – High Speed execution

CPU

Memory

Self-test code

Self-test data

“Any” ATE

CPU

Memory

Self-test code

Self-test data

Self-test resp.

slow“MHz”

fast“GHz”

CPU

Memory

Self-test code

Self-test data

Self-test resp. “Any” ATE

slow“MHz”

Page 23: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Self-Test Program Execution Steps:Targeting a Module

CPU core

module under test

from memory

fault

Test Preparation

CPU core

module under test

fault

fault effect

Test Application andResponse Collection

CPU core

module under test

to memory

fault

fault effect

Response Extraction

instruction(s) to “load” instruction(s) to “execute” instruction(s) to “store”

Page 24: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Software-Based Self-Testing: Variants

Manufacturing Testing with SBST• Self-test programs/data should be “cache-resident”

• No external memory cycles, cache controller should be configured (“Cache Loader” needed): no cache misses

– Necessary for low-cost ATE use– No main memory available during testing

Periodic On-Line Testing with SBST• Self-test code/data/responses can be stored in ROM, Flash, RAM• Self-test takes place periodically or during idle intervals

• Operating system support• Low-cost reliability mechanism for embedded systems

SBST for Processor-based SoCs• Processor self-test programs used to test memories, peripherals, etc

Page 25: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Software-Based Self-Testing: Advantages and Challenges

No extra hardware• No area, performance, power

overheads; non-intrusiveAt-speed testing

• Tests are applied and responses collected at processor’s speed

• No yield loss• Comprehensive defect coverage

No over-testing• Testing is performed in

functional/normal mode• No yield loss due to over-testing

“Added Value” to the Product• Can be re-used during system

lifetime

Memory for self-test program/data• Does it fit in on-chip cache

(manufacturing testing)?• Does it for in a Flash or ROM (on-

line testing)?Is it able to excite faults in all fault locations?

• Controllability• Observability

Can it be easily automated?• Scan-based testing is a very mature

automated approach• What about SBST?

Page 26: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

An SBST Research Evolution Step 1

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapath and Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

1995-2000

2000-2004

2004-2007

2006+

Page 27: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

An SBST Research Evolution Step 2SoC

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapath and Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Peripheral Controller 1

Peripheral Controller 2

Peripheral Controller k

2006-2007

Page 28: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

An SBST Research Evolution Step 3

Symmetric Multiprocessor

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

Microprocessor

Microprocessor Integer Datapath and Control

Integer Arithmetic Units

ALU

Register Files

ControlUnits

SimplePipeline

DeepPipelinesForwardingInterlocking

SpeculativeExecution

UnitsBranch

PredictionPrefetching

Floating PointDatapathand Control

Add Mult

Add MultMAC

Performance Enhancing Mechanisms

L1 Cache

L1 Cache L1 Cache

L1 Cache

L2 Cache

2007+

Page 29: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Processor Integer Datapaths

Inputs• Processor ISA• Processor RTL description• Test sets library

Methodology: three phases• A: Information extraction• B: Component classification

and test priorities• C: Self-test code development

for components

“Software-Based Self-Testing of Embedded Processors”, N.Kranitis, G.Xenoulis, A.Paschalis, D.Gizopoulos, IEEE Transactions on Computers, vol. 54, no. 4, pp. 461-475, April 2005.

Phase A: Information Extraction

Phase B: Component Classification

and Test Priorities

Phase C: SBST Code Development

(per-component)

SBST Program

Processor RTLProcessor ISA

Test Library

Page 30: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Processor Integer Datapaths: Phase A

Extract information using• the processor ISA (programmer’s manual)• the processor model

• RT-level description or Architecture Description Language (ADL) Processor partitioned as set of components using the RT-level

description Extracted information (using ISA and RT-level description):

• the sets of functional component operations (micro-operations)• the sets of Basic Test Instructions

• that excite functional component operations• the sets of Peripheral Test Instructions

• usually instruction sequences instead of single instructions• for controlling or observing processor registers

– setting the operands– propagating test response to memory

“Software-Based Self-Testing of Embedded Processors”, N.Kranitis, G.Xenoulis, A.Paschalis, D.Gizopoulos, IEEE Transactions on Computers, vol. 54, no. 4, pp. 461-475, April 2005.

Page 31: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Processor Integer Datapaths: Phase B

Processor Component Classification• Functional components

• Computational (arithmetic/logic operations on data or address operands, i.e. adders, ALUs, barrel shifters, multipliers, MACs etc, multiplier)

• Interconnect (flow of data or addresses)• Storage (feed inputs of data or address computational components and capture their

output i.e. register file)• Control components• Hidden components

Test priority assignment for processor components Objective: reach a high fault coverage ASAP

• Target the most critical-to-test processor components for low test engineering and test application cost

Criteria• Component relative size (large gate count) + Component accessibility

Data functional components• dominate the processor area and are easily accessible

Low-cost SBST: data functional is the highest test priority • Processor fault coverage not sufficient? Proceed to other components

“Software-Based Self-Testing of Embedded Processors”, N.Kranitis, G.Xenoulis, A.Paschalis, D.Gizopoulos, IEEE Transactions on Computers, vol. 54, no. 4, pp. 461-475, April 2005.

Page 32: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Processor Integer Datapaths: Phase C Component Self-Test Development

Select instruction (or instr. sequence) for

register control

Select instruction that excites comp. operationwith specific operands

Peripheral instructions

Component test set re-uselibrary

Phase A (information extraction)

Select instruction (or instr. sequence) for

register observation

Component self-test routine

Basic test instruction

“Software-Based Self-Testing of Embedded Processors”, N.Kranitis, G.Xenoulis, A.Paschalis, D.Gizopoulos, IEEE Transactions on Computers, vol. 54, no. 4, pp. 461-475, April 2005.

Page 33: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Processor Integer Datapaths: Benchmarks

ProcessorName

ArchitectureImplementation

Complexity Usefulness of Experiment

Plasma Simple RISC processor, Princeton architecture, 3-stage simple pipeline, no data forwarding, public available.

Simple First application of the methodology to a RISC processor. Many different synthesized versions used.

ASIP RISC processor, Harvard architecture, 5-stage pipeline. Public available limited version.

Average Application of the methodology on a RISC processor generated automatically by an ASIP suite.

“Software-Based Self-Testing of Embedded Processors”, N.Kranitis, G.Xenoulis, A.Paschalis, D.Gizopoulos, IEEE Transactions on Computers, vol. 54, no. 4, pp. 461-475, April 2005.

Processor core Gate count

FC (%) Size (words)

Time (clock cycles)

Plasma (Synthesis A) 26,080 95.3 853 5,797

Plasma (Synthesis B) 27,824 95.3 853 5,797

Plasma (Synthesis C) 30,896 94.5 853 5,797

ASIP 37,400 92.6 1,728 10,061

Page 34: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST Enhancement for Pipelined Processors

SBST targeting “visible” processor components sufficient for:• Non-pipelined processors• Simple-pipelined processors

Are “hidden” mechanisms sufficiently tested as a side-effect?• No !

Experiments on two fully pipelined public available models:• miniMIPS and OpenRISC 1200

• Models available at: http://www.opencores.org• MIPS I architecture• 5-stage pipeline architecture

• Hazard detection, data forwarding and pipeline interlock mechanisms

“Systematic Software-Based Self-Test for Pipelined Processors”, M.Psarakis, D.Gizopoulos, M.Hatzimihail, A.Paschalis, A.Raghunathan, S.Ravi ACM/IEEE Design Automation Conference (DAC) 2006.

Page 35: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Low Testability of Pipeline Logic (miniMIPS)

InstructionFetch

RegisterFile

ProgramCounter

ALU

Pipeline control logic

PGC = 2% 41% 29%

2%

2% 6% 7% 3%

2%2%

SysCop

5%

PGC : Percentage Gate Count

InstructionDecode Execute Memory

Access

DecodeLogic

BusController

FaultCoverage

> 95%

< 90%

< 80%

< 60%

FC of the pipeline logic ~ 72%

Overall FC of the processor ~ 86%

“Systematic Software-Based Self-Test for Pipelined Processors”, M.Psarakis, D.Gizopoulos, M.Hatzimihail, A.Paschalis, A.Raghunathan, S.Ravi ACM/IEEE Design Automation Conference (DAC) 2006.

Page 36: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Two Testability Problems: Address Logic and Hazard Detect/Resolve Logic

Address-related logic is poorly tested• Address registers of the pipeline stages and components that handle addresses,

i.e. PC, Bus controller Low controllability

• Fault excitation requires every address line to be set to both 0 and 1 Low observability

• Fault propagation can be done only through the IF and MEM stages Same problem occurs also in non-pipelined processors

• Accentuated in pipelined models. More than 60% of the undetected faults of the pipeline

Hazard detection and resolution logic is poorly tested• Hazard detection and interlocking logic• Forwarding paths

Fundamental difficulty: “invisible” to programmer Not explicitly targeted Pipeline stages that involve forwarding paths (i.e. EX, MEM) present much lower

fault coverage in comparison with other stages (i.e. IF, ID)

“Systematic Software-Based Self-Test for Pipelined Processors”, M.Psarakis, D.Gizopoulos, M.Hatzimihail, A.Paschalis, A.Raghunathan, S.Ravi ACM/IEEE Design Automation Conference (DAC) 2006.

Page 37: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Solution for Controllability of Address Logic

For the low controllability of the address related faults Solution:

• Execution of SBST code located in different regionsof the entire memory space

Key idea:• SBST program is partitioned into multiple code segments virtually stored and

executed from different memory regions Constraint: a huge memory model should not be used

• Fault simulation: large simulation time• Actual testing: huge memory in the loadboard

For the low observability of the address related faults Considering that the address bus of the processor is observed during testing

• Two different paths for fault propagation • Instruction fetch stage (path 1) and Execute and then instruction fetch stage (path 2)

Considering that responses can be captured only through data bus• Two different paths for fault propagation

• Jump-and-link (path 3) and Exceptions (path 4)

“Systematic Software-Based Self-Test for Pipelined Processors”, M.Psarakis, D.Gizopoulos, M.Hatzimihail, A.Paschalis, A.Raghunathan, S.Ravi ACM/IEEE Design Automation Conference (DAC) 2006.

Page 38: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Solution for Controllability of Address Logic (cont.)

Self-test program4KB

(relative addresses)

… xx+0 : instr a

…xx+1K : instr b

…xx+2K : instr c

…xx+3K : instr d

Partitioned into4 code segments

Virtual memory space4GB

(virtual address)

Partitioned in 1024 regions

Physical memory4MB

(physical address)

Each region is mapped to the same physical space

0

255

511

1023

instr a

instr b

instr c

instr d

Virtual addressesare translated tophysical address

“Systematic Software-Based Self-Test for Pipelined Processors”, M.Psarakis, D.Gizopoulos, M.Hatzimihail, A.Paschalis, A.Raghunathan, S.Ravi ACM/IEEE Design Automation Conference (DAC) 2006.

Page 39: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Solution for Hazard Detect/Resolve Logic

Low testability of hazard detection and forwarding

Solution:• Execution of test

sequences that increase pipelineactivity

Key idea:• Use existing SBST

routines: operands diversity

• Create multiple instantiations: code variants

lw R1, Imm1(R0)

addi R2, R1, Imm2

add R4, R3, R2

sw R4, Imm3(R0)

lw R1, Imm1(R0)addi R2, R1, Imm2add R4, R3, R2sw R4, Imm3(R0)

Basic code

Def-use pairs

1

2

lw R1, Imm1(R0)addi R2, R1, Imm2nopadd R4, R3, R2nopnopsw R4, Imm3(R0)

Enhanced code

2

3

lw R1, Imm1(R0)addi R2, R1, Imm21a

1b1c1d

addi R2, R1, Imm2nopadd R4, R3, R2

2a

2c

2b

add R4, R3, R2nopnopsw R4, Imm3( R0)

3a3b

3c

Page 40: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Experimental Results on SBST Enhancement

Processor Original FC % (stuck-at) Enhanced FC % (stuck-at)

miniMIPS (A) 86.58 95.08

miniMIPS (B) 81.51 94.00

OpenRISC 80.36 90.03

Overall fault coverage for pipelined processors miniMIPS (A): includes a fast parallel multiplier (original design) miniMIPS (B): without multiplier Enhanced code size: 1.6K (from 1.2K) for miniMIPS and 3.1K (from 2.2K)

for OpenRISC Enhanced code execution cycles: 7K cycles (from 6K) for miniMIPS and

57K cycles (from 44K cycles) for OpenRISC

“Systematic Software-Based Self-Test for Pipelined Processors”, M.Psarakis, D.Gizopoulos, M.Hatzimihail, A.Paschalis, A.Raghunathan, S.Ravi ACM/IEEE Design Automation Conference (DAC) 2006.

Page 41: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Processor Floating Point Units

Testability conditions for complex FP blocks

• E.g. Two-path FP adder Main problem for SBST Development:

• Bit manipulation code to applytest sets to integer componentsinside the FP unit

• Exponent/Significand• FP instruction sets do not support

bit manipulation• Use integer instructions instead

Applied to MIPS processor with FP support

• 96.4% fault coverage• Only 2.5K words program

“Testability Analysis and Scalable Test Generation for High-Speed Floating Point Units", G.Xenoulis, D.Gizopoulos, M.Psarakis and A.Paschalis,IEEE Transactions on Computers, vol. 55, no. 11, pp. 1449-1457, November 2006.“On-Line Periodic Self-Testing of High-Speed Floating-Point Units in Microprocessors”, G.Xenoulis, M.Psarakis, D.Gizopoulos, A.Paschalis, IEEEInternational Symposium on Defect and Fault Tolerance in VLSI Systems (DFTS 2007), Rome, Italy, September 2007.

Page 42: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Speculative Execution Units

SBST for Speculative Execution Units (SpEUs) • Used for performance optimization (Branch & Value Prediction, Data

Prefetch) Testing of SpEUs is particularly challenging due to:

• Self-correction mechanisms. Produce same functional result even if faulty• Only performance degradation due to incorrect speculations

Software-based self-testing methodology using processor hardware resources

• Performance monitoring hardware and Processor exceptions mechanism Propagate address value to processor outputs Collect information about the SpEU Results

• 96%-97% for Branch Prediction Unit (with 1-bit and 2-bit prediction schemes

• ~93% fault coverage for the entire MIPS processor including the BPUs

“A Methodology for Detecting Performance Faults in Microprocessor Speculative Execution Units via Hardware Performance Monitoring”,M.Hatzimihail, M.Psarakis, D.Gizopoulos, A.Paschalis, IEEE International Test Conference, Santa Clara, California, USA, October 2007.

Page 43: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST for Communication Peripherals in SoCs

Embedded processor in SoC used to self-test communication peripherals

• Commonly used in a wide range of System-on-Chip (SoC) families

• Occupy a significant portion of the SoC

Application• UART and Ethernet cores

(with 16 and 32 deep FIFOs): 92% to 95% fault coverage for the peripheral cores with 2K to 6K word programs.

“Functional Processor-Based Testing of Communication Peripherals in Systems-on-Chip”, A.Apostolakis, M.Psarakis, D.Gizopoulos, A.Paschalis,IEEE Transactions on Very Large Scale Integration Systems, July 2007.

Generate tests for the operating modes

Identify operating modes

Identify core’sregister set

Test routines templates

Select appropriate operating mode

Generate tests for the Tx & Rx FIFOs

Generate tests for the error handling logic

Identify error conditions

Pseudotest routines

Identify processor ISA details

Finaltest routines

Transform pseudocode into actual instructions

User Actions Methodology Steps

SBST code

Identify bus parameters

Generate tests for the bus interface logic

Page 44: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST Research

Other major academic research groups on SBST• The University of Texas at Austin, USA

• Prof J.Abraham, Pioneer in the area of functional testing for processors since the 80’s• On-going high quality research on the topic

• University of California San Diego and Santa Barbara, USA• Profs K-T.Cheng, S.Dey and L.-C.Wang

• Politecnico di Torino, Italy• Prof M.Sonza Reorda

• Nara Institute of Science and Technology, Japan• Prof H.Fujiwara

• Princeton University, USA• Prof N.Jha

• Case Western Reserve University, USA• Prof C.Papachristou

• University of Stuttgart, Germany• Prof H.-J.Wunderlich

Industrial published work on SBST• Intel (IEEE International Test Conference 2002)• Sun (IEEE International Test Conference 2006)• NEC (ACM/IEEE Design Automation Conference 2003 and 2006)

Page 45: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ UT Austin

Pioneer work on processor functional testing• D. Brahme and J.A. Abraham. “Functional Testing of

Microprocessors,” IEEE Transactions on Computers, Vol. C-33, pp. 475-485, 1984. and S.M. Thatte arid J.A. Abraham. “Test generation for microprocessors”, IEEE Transactions on Computers, Vol. C-29, pp. 429-441, 1980.

Based on a functional fault model • No structural fault simulation/coverage results• No automation

Back in 1998: VERTIS • Exercise functional operations of processor; no fault model• Applicable to design validation and manufacturing testing

Results• Viper 32-bit processor, 4600 gates, 251 ffs, 94.04% fault

coverage in open-loop (using tester)• GL85 (8085 model), 6300 gates, 244 ffs, 90.20% fault

coverage in open-loop mode, 86.70% in closed-loop (self-test) mode with 360,000 instructions

Programmer’s manual

Instruction setrepresentation

Instructioncategorization

and library

Test specification

Instructionsequencing

Testapplication

PreprocessingTest sequence

generation

“Native Mode Functional Test Generation for Processors with Applications to Self Test and Design Validation”, J.Shen and J.A.Abraham, IEEEInternational Test Conference 1998.

Page 46: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ UT Austin (cont.)

Fully automated flow for:• mapping of pre-computed module tests to instruction sequences• propagation of module test responses to primary outputs

Uses for test application:• temporal logic descriptions for component tests• bounded model checking (BMC) from formal verification

• looks for counter-example on the negated temporal logic properties• counter-example gives the instruction sequence• solutions may exist although counter-example may not be found always

Uses for fault propagation:• Boolean difference formulation • Linear time logic passed to a bounded model checker again

Results:• 82% fault coverage on OpenRISC 1200 (speculate 90%+ test coverage)

Automatic generation of instruction sequences targeting hard-to-detect structural faults in a processor, S.Gurumurthy, S.Vasudevan andJ.A.Abraham, IEEE International Test Conference 2006.Automated Mapping of Pre-Computed Module-Level Test Sequences to Processor Instructions, S.Gurumurthy, S.Vasudevan and J.A.Abraham,IEEE International Test Conference 2005.

Page 47: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ UC San Diego

Automation-oriented approach Using

• Test program templates (parameterized)• Controllability and observability constraints• Virtual constraint circuits (VCC)

• To generate module-level tests• Synthesis of self-test programs

• From module-level tests Experimental results

• First results on Parwan toy-processor (888 gates, 53 ffs)• 91.42%

• Then, only on one module Tensilica’s Xtensa (ALU+shifter+logic)• 95.2% fault coverage using a self-test program of 20K bytes running for 27K

cycles (approx. 25K faults in the ALU)

“Software-Based Self-Testing Methodology for Processor Cores”, L.Chen, S.Dey, IEEE Transactions on Computer-Aided Design of IntegratedCircuits and Systems, vol. 20, no. 3, March 2001,“A Scalable Software-Based Self-Test Methodology for Programmable Processors”, L.Chen, S.Ravi, A.Raghunathan, S.Dey, ACM/IEEE DesignAutomation Conference 2003

Page 48: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ UC San Diego (flow)

Acceptable fault coverage?

Instruction SetArchitecture (ISA)

Set of testprogram

templates: T

RTL description of

processor

Set ofcombinational

MUTs: M

∀m ∈ M

1. Simulation-basedconstraint extraction Cm,t Constraint

Module-level test patterns

2. Constrained test generation(virtual constraint circuit)

Pm,t

3. Test program synthesis Test programTPm,t

4. Processor-level fault simulation

Y

Y

N

NMore t in T?

More m in M?N Y

Done

Template ranking: Tm

t ∈ Tm

“Software-Based Self-Testing Methodology for Processor Cores”, L.Chen, S.Dey, IEEE Transactions on Computer-Aided Design of IntegratedCircuits and Systems, vol. 20, no. 3, March 2001“A Scalable Software-Based Self-Test Methodology for Programmable Processors”, L.Chen, S.Ravi, A.Raghunathan, S.Dey, ACM/IEEE DesignAutomation Conference 2003

Page 49: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ UC Santa Barbara

New perspective for SBST• Instead of using SBST for defect/fault screening group suggests its use for

at-speed functional testing and speed-binning• Because a functional-based approach alone may not be sufficient for full

testing• Random Test Program Generation (RTPG) combined with

Target Test Program Generation (TTPG)• TTPG uses simulation to develop learned models for the modules around the

module under test– Thus improve the efficiency of generated test programs– Reduces complexity of test generation

• For Random/boolean modules Boolean learning is used• For Datapath/arithmetic modules Arithmetic learning is used

Experimental results• OpenRISC processor’s ALU

• 94.94% fault coverage, 97.40% test coverage (~20K stuck-at faults in the ALU)

“Simulation-Based Functional Test Generation for Embedded Processors”, C.H.-P.Wen, L.-C.Wang, K.-T.Cheng, IEEE Transactions onComputers, vol. 55, no. 11, November 2006.“Simulation-based Target Test Generation Techniques for Improving the Robustness of a Software-Based-Self-Test Methodology”, C.H.-P.Wen, L.-C.Wang, K.-T.Cheng, W.-T.Liu, J.-J.Chen, IEEE International Test Conference 2006.

Page 50: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ UC Santa Barbara (cont.)“Simulation-Based Functional Test Generation for Embedded Processors”, C.H.-P.Wen, L.-C.Wang, K.-T.Cheng, IEEE Transactions onComputers, vol. 55, no. 11, November 2006.“Simulation-based Target Test Generation Techniques for Improving the Robustness of a Software-Based-Self-Test Methodology”, C.H.-P.Wen, L.-C.Wang, K.-T.Cheng, W.-T.Liu, J.-J.Chen, IEEE International Test Conference 2006.

modules before

simulation I/O data

modules after

simulation I/O data

module under test (MUT)

RandomPatterns

Simulation phaseTPG phase learning

module under test (MUT)learned models learned models

apply ATPGjustification propagationinputs to justify

outputs to propagate

Page 51: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ Politecnico di Torino

Innovative automatic self-test program generation approach• Genetic algorithms based evolution framework based on fault simulation and gate-

level netlist• μGP evolutionary algorithm: improves and fine-tunes self-test programs• Results: 90.77% for i8051 (12K gates netlist)

Group’s SBST-related research extends to:• SoC testing using embedded processors

• Memories, peripherals• Silicon-debug combining SBST and scan-based test• Software-based self-diagnosis (SBSD)

“Fully Automatic Test Program Generation for Microprocessor Cores”, F.Corno, G.Cumani, M.Sonza Reorda, G.Squillero, ACM/IEEE DesignAutomation and Test in Europe Conference, 2003.“Automatic Test Program Generation: A Case Study”, F.Corno, E.Sánchez, M.Sonza Reorda, G.Squillero, IEEE Design & Test of Computers,March-April 2004.

Microprocessor model

μGP core Simulator

Test program

Instruction library

Page 52: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ NAIST

Recently focused on delay fault testing for pipelined processors• Uses graph-theoretic approach of pipeline to develop path delay fault tests

• Pipeline Instruction execution graph (PIE graph)• Constraint-based test development using

ATPG Experimental results

• VPRO, 16-bit, pipelined• DLX, 32-bit, pipelined• Detection of all functionally testable

path delay faults• 100% efficiency

PIE graph (Pipeline Instruction Execution graph)

• Size of PIE graph may grow fast

“Instruction-Based Self-Testing of Delay Faults in Pipelined Processors”, V.Singh, M.Inoue, K.K.Saluja, H.Fujiwara, IEEE Transactions on VLSISystems, vol. 14, no. 11, November 2006

ISA and RTL description

PIE-graph construction

Path classification and constraint extraction

Constrained TPG

Test instruction sequence generation

Page 53: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ Intel

FRITS – Functional Random Instruction Testing at Speed Functional BIST for Intel Microprocessors

• Key objective is to enable functional testing using low-cost testers• Low-cost testers have been used for structural testing (scan-based)

• DFT applied to enable functional testing on low-cost, low-pin count testers• Automatic tool that generates self-test programs

Experimental results• Pentium 4: ~70% total fault coverage

• Components fault coverage 20%-90%• Itanium: ~85% total fault coverage

SBST can be a great supplement to • Full functional test• Scan-based structural test

“FRITS – A Microprocessor Functional BIST Method”, P.Parvathala, K.Maneparambil, W.Lindsay, IEEE International Test Conference, 2002.

Page 54: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ Intel (cont.)

FST Test Sequence and FRITS Kernel Execution Flow

“FRITS – A Microprocessor Functional BIST Method”, P.Parvathala, K.Maneparambil, W.Lindsay, IEEE International Test Conference, 2002.

Assert Reset

Load Functional Test Into Cacheusing Cache-Loader withprocessor in Test Mode

Transition processor intoNormal Mode with Cache-able

Starting Address

Execute FST Test

Transition processor intoTest Mode and Unload results

End

Initialization

Test Sequence Generation

Test Data Generation

Test Execution & Result Compression

End

Data loop count met?

Instruction loop count met?

YES

YES

NO

NO

Page 55: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ Sun

Cache-Resident approach for Processor Testing• Load&Go testing or Cache Resident testing

Microprocessors complexity• More on-die cache• High-speed, serial interfaces

• Non-determinism of serializer/deserializer (SerDes) circuits– “packets” may come later or earlier in time

• 4 or 8+ cores Functional BIST for Sun Microprocessors

• Key objective again is to enable functional testing using low-cost testers• Sun wants to move from big-iron functional testers to low-cost ATE

• Used it for UltraSparc T1 (8 cores, 32 threads)• This can be done if non-deterministic SerDes and memory access is

avoided• Thus cache-resident testing

– Only size and architecture of the on-chip cache is the limitation

“Cache Resident Functional Microprocessor Testing: Avoiding High Speed IO Issues”, I.Bayraktaroglu, J.Hunt, D.Watkins, IEEE International TestConference, 2006.

Page 56: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

SBST @ Sun (cont.)

Determining the contents of the cache (L2) using RTL simulation• Pass 1 and pass 2

Easy case for direct-mapped caches• More tricky in associative caches

Test conversion for Load&Go test

“Cache Resident Functional Microprocessor Testing: Avoiding High Speed IO Issues”, I.Bayraktaroglu, J.Hunt, D.Watkins, IEEE International TestConference, 2006.

RTL Simulation

Capture L2

+

First pass Second pass

L2 Tag List

RTL Simulation

Capture L2

L2 Image FileMay Repeat

Memory Image

L2 Load File

L2 Tag List

=

Page 57: Software-Based Self-Testing of Processors - TUT Self-Testing of Processors ... Fault-free/faulty circuit ... Low speed up/download – High Speed execution CPU

Conclusions and Open Issues

At-speed self-test with low-cost testers Scalable, adaptable, systematic, automatable SBST methodologies have been

presented in literature Demonstration on commercial processors and several good quality research

benchmarks Complement for

• Scan tests – Detecting speed defects• Random functional tests – Top-off mechanism for improving fault coverage

Need more research or improvements• SBST for superscalar and out-of-order execution processors• SBST for multiprocessors• Power-aware SBST• SBST Periodic On-Line Testing

Software-Based Self-Test can enablelow-cost, high-quality functional test