Zuverlässigkeit und Fehlertoleranz - uni-potsdam.de · Methode zur Bestimmung eines geeigneten...

67
1 Zuverlässigkeit und Fehlertoleranz Fehlertoleranz

Transcript of Zuverlässigkeit und Fehlertoleranz - uni-potsdam.de · Methode zur Bestimmung eines geeigneten...

1

Zuverlässigkeit und Fehlertoleranz

Fehlertoleranz

Einordnung

Verlässlichkeit

Attribute

Verbesserungsmethoden

Bedrohungen

Zuverlässigkeit (Reliability)

Sicherheit (Safety + Security)

Vertraulichkeit (Confidentiality)

Wartbarkeit (Maintainability)

Fehlerbeseitigung

Fehlervorhersage

Fehlervermeidung

Fehlertoleranz

Fehler (Fault)

Störung (Error)

Ausfall (Failure)

Verfügbarkeit (Availability)

Kontinuität der Funktion

Fehlertoleranz

3

Fehlertoleranz bezeichnet die Eigenschaft eines Systems die ihm zugedachte Aufgabe auch dann weiterhin korrekt zu erfüllen, wenn Fehler vorliegen. Ein solches System wird dann auch fehlertolerantes System

genannt.

All of fault tolerance is an exercise in exploiting and managing redundancy.

I. Koren, C.M. Krishna: „Fault Tolerant Systems“. p. 3.

Fault tolerance: How to provide, by redundancy, service complying with the specification in spite of faults having

occured or occuring.

J.C. Laprie: „Dependable Computing and Fault Tolerance: Concepts and Terminology“, pp. 2-11, Proc. of the FTCS‘85.

Klassifikation nach Redundanzart

4

Redundanz

Hardware Information Software

Pass

iv (S

tatic

) (F

ault

Mas

king

)

Activ

e (D

ynam

ic)

(Spa

res)

Hyb

rid

Code

s

Dupl

icat

ion

Recovery-Blocks

N-V

ersi

on-

Prog

ram

min

g

Hot

Cold

Sing

le-V

ersi

on-

Prog

ram

min

g

Wra

pper

s

Reju

vena

tion

Time

N-S

elf-C

heck

ing-

Prog

ram

min

g

Degr

aded

Pe

rfor

man

ce

Non

-Deg

rade

d Pe

rfor

man

ce

Software-Fehler Hardware-

Fehler

Software Redundanz

5

Software-Redundanz

Ziel: Vermeidung von Ausfällen durch Software-Fehler Single-Version-Programming: Nur eine Version des Programms verfügbar Techniken:

− Software Neustart (Rejuvenation) − Wrapper mit Akzeptanztests

N-Version-Programming: Mehrere Versionen des Programms vorhanden (Diversität)

− Kopien desselben Programms würden dieselben Programmierfehler enthalten Techniken:

− N-Version-Programming − N-Self-Checking-Programming − Recovery-Block-Ansatz

6

Software Neustart

Neustart eines Prozesses/einer Software zur Freigabe geblockter Ressourcen oder im Falle eines transienten Fehlers.

Neustart möglich auf: − Prozessorebene: Reset des Prozessors − Anwendungsebene: Neustart einer Anwendung/eines Prozesses

Neustart durchführen:

− Zeitbasiert: Nach einem festen Zeitintervall − Vorhersagebasiert: Basierend auf Beobachtung der allokierten

Ressourcen und der Erkennung von Trends. Basierend auf den Trends kann ein Neustart eingeleitet werden, bevor ein Fehler auftritt.

7

Methode zur Bestimmung eines geeigneten Zeitintervalls

8

( ) ( )rej e r

C P N P C C

( )( ) e r

rate

N P C CC P

P

P … Zeit zwischen zwei Neustarts N(P) … Anzahl Fehler im Zeitintervall P ohne Neustart Cr … Kosten eines Neustarts Ce … Kosten eines Fehlers

Erwartete Kosten zwischen zwei Neustarts:

Normalisierte Kosten (Kosten pro Zeiteinheit):

( )N P P 2( )N P P ( ) nN P P

( ) rrate e

CC P C

P

Wird minimal für P ® ¥

( ) rrate e

CC P P C

P

Wird minimal für

r

e

CP

C

1( ) n rrate e

CC P P C

P

1

( 1)

nr

e

CP

n C

Wird minimal für

Dabei sind:

In diesem Modell ist optimaler Zeitintervall P

Bei konstanter Fehlerrate Bei steigender Fehlerrate Im Allgemeinen:

Modell für vorhersagebasierten Neustart

Beobachtete Zeitpunkte: t1 < t2 < … < tk Messwerte zu diesen Zeitpunkten: (t1), (t2), …, (tk) Messwerte sind z.B. der allokierte Speicher zu diesen Zeitpunkten Gesucht wird dann ein Polynom f(t) (z.B. durch

Interpolation/Extrapolation): für das der folgende Fehler minimal wird: f(t) kann dann für die Vorhersage zukünftiger Speichernutzung

verwendet werden

9

11 1 0

( ) n nn n

f t m t m t m t m

21

) ( )k

i ii

t f t

Wrapper

Wrapper kapselt das auszuführende Programm

Eingaben überwachen: − Testen von Vorbedingungen (z.B. Pufferüberlauf

abfangen)

Ausgaben überwachen: − Akzeptanztests (prüfen von

Eigenschaften/Plausibilität der Ergebnisse) • Wertebereich • Delta zum vorangegangenen Ergebnis in reaktiven

Systemen

Anwendung: − Workarounds für bekannte Bugs im Programm

10

Programm

Wrapper

Eingaben Ausgaben

N-Version-Programming

Maskierung von Programmierfehlern durch Diversität: − Entwurf und Implementierung der Software durch N verschiedene Programmierteams − Die Hoffnung: Verschiede Teams machen nicht die gleichen Fehler

Alle Programmversionen werden nebenläufig ausgeführt

Mehrheitsentscheidung durch Voter

11

Programm- version 1

Programm- version 2

Programm- version N

Voter Eingabe Ausgabe

Probleme beim Diversitätsansatz

Problem des konsistenten Vergleichs: Verschiedene Anwendungen können leicht in der Genauigkeit bei Berechnung eines

Wertes x abweichen.

Konsequenz: Bedingte Verzweigungen in Abhängigkeit eines Vergleichs mit x (z.B. mit Konstante c (x < c)) können dann zu unterschiedlichen Aktionen führen.

Lösung: − Abstimmung bereits über x durchführen (komplexe Interaktion zwischen den Programmen) − zusätzliches Signal, was dem Voter die Vertrauenswürdigkeit eines Ergebnisses (Vergleichs) angibt, d.h.

falls (c – x) < threshold, dann geringe Vertrauenswürdigkeit.

Unabhängigkeit der Fehler nicht gewährleistet: Mögliche Ursachen für korrelierende Fehler:

− Programmierer mit gleicher Ausbildung machen ähnliche Fehler − Gemeinsam genutzte Spezifikation (vgl. Fehlervermeidung) − Gleiche HW, gleiches OS, gleiche Bibliotheken

12

N-Self-Checking-Programming

Entwicklung von N verschiedenen Programmversionen

Jedes Programm besitzt einen eigenen Akzeptanztest

Voter entscheidet nur auf Grundlage der akzeptierten Ausgaben

13

Programm- version 1

Programm- version 2

Programm- version N

… Au

swah

llogi

k

Eingabe

Akzeptanz- test

Akzeptanz- test

Akzeptanz- test

Ausgabe

Recovery Block

N verschiedene Programmversionen und ein zentraler Akzeptanztest

Es wird nur eine Programmversion ausgeführt

Abhängig vom Akzeptanztest: − Falls Ergebnis akzeptiert, dann fertig − Falls Ergebnis nicht akzeptiert, dann nächstes Programm ausführen

14

Programm- version 1

Programm- version 2

Programm- version N

Ergebnis- auswahl Programm

Akzeptanz- test

Ausgabe

15

Passive Hardware Redundanz

Einordnung

16

Redundanz

Hardware Information Software

Pass

iv (S

tatic

) (F

ault

Mas

king

)

Activ

e (D

ynam

ic)

(Spa

res)

Hyb

rid

Code

s

Dupl

icat

ion

Recovery-Blocks

N-V

ersi

on-

Prog

ram

min

g

Hot

Cold

Sing

le-V

ersi

on-

Prog

ram

min

g

Wra

pper

s

Reju

vena

tion

Time

N-S

elf-C

heck

ing-

Prog

ram

min

g

Degr

aded

Pe

rfor

man

ce

Non

-Deg

rade

d Pe

rfor

man

ce

Software-Fehler Hardware-

Fehler

Passive Hardwareredundanz

Redundante Hardware zur Mehrfachausführung derselben Aufgabe vorhanden

Aufgaben werden gleichzeitig mehrfach ausgeführt

Struktur des Systems wird zur Fehlererkennung und -behebung nicht verändert

17

DMR-System

DMR = Double Modular Redundancy (Verdopplung eines Moduls)

Nur Fehlererkennung

M2 Vergleich

Ausgabe M1

Störung

Eingabe

NMR-Systeme

M1,…,MN sind redundante Systeme

Fehler in M1,…,MN werden maskiert für N > 2 (typischerweise ist N ungerade)

Ein NMR-System kann dann − (N-1)/2 Fehler tolerieren, falls

Wahrscheinlichkeit für korrelierte Fehler hoch

− N-2 Fehler tolerieren, falls Wahrscheinlichkeit für korrelierte Fehler gering

Fehler im Voter/Vergleicher können zu

falschen Ergebnissen führen

Bei N = 3: TMR-System (Triple Modular Redundancy)

19

M1

M2

MN

Eing

abe

Voter

Ausg

abe

Triplicated TMR

Ziel: Vermeidung von Ausfällen durch Fehler im Voter

Dreifachauslegung des Voters

Erfordert die Nutzung der drei Ausgaben, z.B.: − Steuerung dreier redundanter unabhängiger mechanischer Systeme − 3 Prozessoren mit 3 Speichern

20

M1 (z.B. Prozessor)

Eingabe Voter

Voter

Voter

Ausgabe (z.B. zum Speicher)

Ausgabe (z.B. zum Speicher)

Ausgabe (z.B. zum Speicher)

M2 (z.B. Prozessor)

M3 (z.B. Prozessor)

Subsystemmodularität

Anwendung des Konzepts des Triplicated TMR auf Subsysteme:

21

Subsystem 1

Subsystem 1

Subsystem 1

V

V

V

Subsystem 2

Subsystem 2

Subsystem 2

V

V

V

Subsystem 3

Subsystem 3

Subsystem 3

V

V

V

Subsystem 4

Subsystem 4

Subsystem 4

V

V

V

Fehlermaskierung bei temporären/permanenten Fehlern

time

M1

M2

MN

Voter

M1

M2

MN

M1

M2

MN

Temporary Fault causes an error (e.g. bit-flip)

Error propagates to the voter; flipped bit was overwritten

System is faultless

M1

M2

MN

System can handle another fault

time Permanent Fault causes an error

Error propagates to the voter and is masked; fault does not disappear

Error resist System cannot handle another fault

Voter Voter Voter

M1

M2

MN

Voter

M1

M2

MN

M1

M2

MN

M1

M2

MN

Voter Voter Voter

Bei temporären Fehlern:

Bei permanenten Fehlern:

Zusammenfassung Passive Hardwareredundanz

Geeignet für temporäre Fehler (eingeschränkt auch für permanente Fehler)

Vorteil: − Störungen werden sofort durch Mehrheitsentscheid maskiert − Ausbreitung falscher Werte stark eingeschränkt

Nachteil:

− Hoher Hardwareaufwand

23

24

Aktive Hardware Redundanz

Einordnung

25

Redundanz

Hardware Information Software

Pass

iv (S

tatic

) (F

ault

Mas

king

)

Activ

e (D

ynam

ic)

(Spa

res)

Hyb

rid

Code

s

Dupl

icat

ion

Recovery-Blocks

N-V

ersi

on-

Prog

ram

min

g

Hot

Cold

Sing

le-V

ersi

on-

Prog

ram

min

g

Wra

pper

s

Reju

vena

tion

Time

N-S

elf-C

heck

ing-

Prog

ram

min

g

Degr

aded

Pe

rfor

man

ce

Non

-Deg

rade

d Pe

rfor

man

ce

Software-Fehler Hardware-

Fehler

26

Aktive Hardwareredundanz

Redundante Hardwaremodule vorhanden

Konfiguration des Systems wird zur Fehlerbehebung verändert

Fehlererkennung und Ausschluss der fehlerhaften Komponente von ihrer Nutzung − Degradation der Verarbeitungsleistung − Keine Degradation der Verarbeitungsleistung

27

Organisation der aktiven Redundanz

Normale Ausführung

Fehler tritt auf

Störung tritt auf

Ausfall

Fehlererkennung und Lokalisierung

Rekonfiguration und Wiederherstellung

Verringerte Performance

erkannt

unerkannt

nicht erfolgreich

erfolgreich

Duplizierung und vergleichen

Periodisches Testen Watchdog timers

Standby-Replacement

Ein einzelnes Module ist aktiv

Fehlererkennung (z.B. durch Timer Watchdog, Akzeptanztest, periodische Selbsttests)

Rekonfiguration ändert Zustand der Schalter

Bei Erkennung eines Fehlers, Deaktivierung des aktives Modul und Aktivierung eines Reservemoduls; dadurch: Unterbrechung der Berechnung

Hot-Standby (Ersatzmodule arbeiten mit) − sind von Alterung betroffen − Schnelle Rekonfiguration möglich

Cold-Standby (Ersatzmodule sind nicht mit Strom versorgt)

− Keine Alterung − Langsamere Rekonfiguration durch längere Recovery-Zeiten

Keine Degradation

Administration

Active Module

Spare Module 1

Output

Spare Module N

Input

Administration

Defectivemodule

Active module

Output

Error Detection

and Reconfi-guration control

Spare Module N

Input

Error Detection

and Reconfi-guration control

Rekonfiguration

Pair-and-Spare (1)

Zwei aktive Module werden parallel betrieben

Dadurch: Schnelle Erkennung von Fehlern

Im Fehlerfall ersetzt ein Reservemodul das defekte aktive Modul

Nach einem erkannten Fehler muss zunächst das fehlerhafte System lokalisiert werden: − Akzeptanztest, − Selbsttest − Wiederholung der Operation mit

Reservekomponente für Mehrheitsentscheidung

29

Fehlererkennung und

Rekonfiguration

Aktives Modul 1

Aktives Modul 2

Reservemodul N

Eing

abe

Ausg

abe

Reservemodul 1

Pair-and-Spare (2)

Es werden fest einander zugeordnete Paare gebildet

Compare erlaubt schnelle Erkennung von Fehlern

Im Fehlerfall wird das gesamte Paar durch die Rekonfiguration ausgetauscht

Keine Lokalisierung des defekten Moduls erforderlich

30

Modul 1

Modul 1

Modul 2

Modul 2

Modul N

Modul N

Compare

Rekonfiguration Compare

Compare

Aktive HWR – Performance Degradation

Alle Module werden gleichzeitig verwendet Dispatcher verteilt eingehende Operationen auf vorhandene Module Bei Fehler in Modul i:

− Eingaben werden nicht länger an Modul i verteilt − Verbleibende Module müssen Aufgaben von Module i mit übernehmen − In der Regel führt das zu einer Performance-Degradation

Active

module

Active module

Results

Error Detection

and Reconfi-guration control

Active module N

Operations

Dis

patc

her

Administration

Defective module

Active module

Results

Error Detection

and Reconfi-guration control

Active module N

Operations D

ispa

tche

r

Administration

Fehlermaskierung bei temporären/permanenten Fehlern

32

time

M1

M2

M3

Adm

inist

ratio

n

Temporary Fault causes an error

If detected, long recovery process

time Permanent fault causes an error

Successful reconfiguration

Second permanent fault occurs

Successful reconfiguration for multiple faults

Disp

atch

er

M1

M2

M3

Adm

inist

ratio

n

Disp

atch

er

M1

M2

M3

Adm

inist

ratio

n

Disp

atch

er

Classification of temporary faults as permanent ones possible

M1

M2

M3

Adm

inist

ratio

n

Disp

atch

er

M1

M2

M3

Adm

inist

ratio

n

Disp

atch

er

M1

M2

M3

Adm

inist

ratio

n

Disp

atch

er

M1

M2

M3

Adm

inist

ratio

n

Disp

atch

er

Bei temporären Fehlern:

Bei permanenten Fehlern:

33

Zusammenfassung Aktive Hardwareredundanz

Konfiguration des Systems wird zur Fehlerbehebung verändert

Geeignet für permanente Fehler

Nicht geeignet für temporäre Fehler

Vorteil: − Mehrere permanente Fehler können zu geringeren Kosten behandelt

werden als mit passiver Redundanz

Nachteil: − Fehlerkorrektur dauer länger als mit passiver Redundanz − Oft verbunden mit komplexer Rekonfiguration − kurzzeitige Ausgabe falscher Ergebnisse möglich

34

Hybride Hardware Redundanz

Einordnung

35

Redundanz

Hardware Information Software

Pass

iv (S

tatic

) (F

ault

Mas

king

)

Activ

e (D

ynam

ic)

(Spa

res)

Hyb

rid

Code

s

Dupl

icat

ion

Recovery-Blocks

N-V

ersi

on-

Prog

ram

min

g

Hot

Cold

Sing

le-V

ersi

on-

Prog

ram

min

g

Wra

pper

s

Reju

vena

tion

Time

N-S

elf-C

heck

ing-

Prog

ram

min

g

Degr

aded

Pe

rfor

man

ce

Non

-Deg

rade

d Pe

rfor

man

ce

Software-Fehler Hardware-

Fehler

36

Hybride Methode

Kombiniert aktive und passive Redundanz: − Fehlermaskierung − Diagnose, Rekonfiguration, In-Betriebnahme

Dadurch erfolgt die Rekonfiguration nebenläufig zur

Fehlermaskierung

Die Funktion des Systems wird also während der Rekonfiguration nicht unterbrochen

Nachteil: − Hoher Hardwareaufwand

Vorteil: − Behandlung transienter und permanenter Fehler möglich

Organisation

Fehlermaskierung durch mehrere aktive Module

Fehlerlokalisierung während der Fehlermaskierung

Rekonfiguration, um das fehlerhafte Modul zu ersetzen Active

module

Active module n

Output

Voting Error

Detection and

Reconfi-guration

Spare module m

Active module

Spare module 1

Input

Defectivemodule

Active module n

Output

Voting Error

Detection and

Reconfi-guration

Spare module m

Active module

Spare module 1

Input

NMR mit Spares

N aktive Module

Deren Ergebnisse gelangen zum Voter

Ergebnis des Voters dient der Identifizierung fehlerhafter Module

Rekonfiguration kann defektes Modul gegen Ersatzmodul austauschen

38

Rekonfigurations- komponente

Voter

Modul 1

Modul 2

Modul N

Spare Modul 1

Spare Modul K

Fehlererkennung

… … Fehlererkennungs- signale

Aktuelle Ausgaben

Triple-Duplex

Durch Duplizierung können defekte Module schnell erkannt werden.

Maskierung von Fehlern durch Dreifachauslegung

Defektes Modulpaar liefert keinen Beitrag für den Voter

Selbst mit einem funktionierenden Paar können noch Ergebnisse erzeugt und überprüft werden

Verwendung z.B. im Shinkansen (Japanischer Schnellzug) 39

Modul 1A

Modul 1B

Modul 2A

Modul 2B

Modul 3A

Modul 3B

Compare

Rekonfiguration

Voter

Compare

Rekonfiguration

Compare

Rekonfiguration

Sift-Out

Alle redundanten Module sind aktiv

Ergebnisse werden paarweise verglichen: Ei,j = 1 gdw. Ri ¹ Rj

Detektor identifiziert fehlerhafte Module: F1,…,FN Fehlervektor der Module

Kollektor maskiert fehlerhafte Ergebnisse und bildet ODER-Verknüpfung gültiger Ergebnisse

Fehlerhafte Ergebnisse liefern keinen Beitrag

40

Modul 1

Modul 2

Modul N

Kollektor

paarweiser Vergleich Detektor

E1,2

E(N-1),N

F1 FN

Eingabe

Ausgabe

R1

R2

RN

Zusammenfassung Organisationsmöglichkeiten hybrider Redundanz

41

Fehlerbehandlung (off-line mode) Fehlererkennung

Selbstreparatur

System is

off - line

System is

on - line

Concurrent Error Detection

Preemptive Error Detection

Fehlermaskierung

Fehlerdiagnose Fehlerisolation und Rekonfiguration

System is

on - line

Fehlerisolation und Rekonfiguration

System Reinitialization

Fehlerbehandlung (off-line mode)

Fehlerdiagnose

Zusammenfassung

Passive hardware redundancy techniques: No reconfiguration required Fault masking; results are delivered continuously (recovery time = 0) Typically used for handling temporary faults Handling of multiple permanent faults possible, but expensive

Active hardware redundancy techniques Reconfiguration required; service is interrupted Typically used for handling permanent faults Handling of multiple permanent faults possible with moderate costs

Hybrid hardware redundancy techniques Masking of temporary faults Handling of permanent faults Service must not be interrupted High hardware overhead

Not considered by the presented classification for hardware redundancy: Granularity of the modules Implementation of the administration for reconfiguration

42

Administration and Granularity of Hardware-Redundancy

43

Gate Level

RT Level

Architecture

System

OS Level

Application

Gates RT Level Architecture System

Adm

inis

trat

ion

Laye

r

Granularity

Administrated in software

Administrated in hardware

Passive Redundancy at Transistor-Level

Goal: Handling of stuck-off faults at transistor level

Backup-Transistors for conducting Out with Vdd or Gnd

No administration required (passive redundancy)

Will not work for stuck-on faults

Doubles the number of transistors

44

Gnd

Out

Vdd

B A

A

B

Standard CMOS 2-NAND

Gnd

Out

Vdd

B A

A

B

Standard CMOS 2-NAND with passive redundancy

B A

A

B

Sirisantana et al.: „Enhancing yield at the end of the technology roadmap“, IEEE Design and Test of Computers, 2004

Problem: stuck-on

Active Redundancy at Transistor-Level

Goal: Solving the stuck-on problem:

Active redundancy for disconnecting transistors from Gnd/Vdd

Problems: − Overhead of 8 transistors − 4 additional control lines (ctrl1, …, ctrl4) − Diagnosis required − Global administration required

45

Gnd

Out

Vdd

B A

A

B

B A

A

B

ctrl1 ctrl2

ctrl3 ctrl4

Problem: gate-short

Gnd

Out

Vdd

B A

A

B

Standard CMOS 2-NAND with passive redundancy

B A

A

B

Problem: stuck-on

Reconfigurable Logic Blocks (RLB)

Allows for active redundancy at various granularity-levels

Identical Logic Blocks (combinational logic only) are grouped into a RLB

RLB contains Spare Block(s) that can replace each other

46

Logic Block 1

Logic Block 2

Logic Block 3

Spare Block

Decoder

Logic Block 1

Logic Block 2

Logic Block 3

Spare Block

Decoder

Logic Block 1

Logic Block 2

Logic Block 3

Spare Block

Decoder

Logic Block 1

Logic Block 2

Logic Block 3

Spare Block

Decoder

Reconfigurable Logic Blocks (RLB) - Overhead

Overhead depends on − Size of logic block − Size of switching network (depends on size of busses)

Reconfiguration is performed locally by a trial-and-error approach in each RLB

− Decoder switches between all feasible configurations − For each configuration a test is performed − Test is organized globally at system layer during startup

47

Logic Block 1

Logic Block 2

Logic Block 3

Spare Block

Decoder

Basic Block Overhead (switches only)

2-NAND 230%

2-AND 160%

Half-Adder 116%

Full-Adder 73%

8-Bit ALU 38%

Application in a Statically Scheduled Superscalar Processor

48

FE

DE

EX

WB Slot 1

EU 1

Program Memory

FE-Reg 1

DE-Reg 1

WB-Reg 1

Slot 2

EU 2

FE-Reg 2

DE-Reg 2

WB-Reg 2

Slot 3

EU 3

FE-Reg 3

DE-Reg 3

WB-Reg 3

Slot 4

EU 4

FE-Reg 4

DE-Reg 4

WB-Reg 4

Regi

ster

File

Op A Op B Op C Op D

Op A Op B Op C Op D

opL opR opL opR opL opR opL opR

Result Result Result Result

Reconfiguration of VLIW Cores using RLBs

RLB concept is used for read ports (RP) and execution units (EU)

Working configuration is determined by trial-and-error approach during startup (administrated by watchdog) − SBST is executed for each configuration − Number of configurations is limited in that approach

No performance degradation after reconfiguration

HW-overhead: ~17% (including watchdog and spares)

Slot 1

Fe/De

De/Ex

Ex/Wb

Regi

ster

File

EU

Slot 2

Fe/De

De/Ex

Ex/Wb

EU

Slot 3

Fe/De

De/Ex

Ex/Wb

EU

Slot 4

Fe/De

De/Ex

Ex/Wb

EU EU

Output Switches

Input Switches Inpu

t Sw

itche

s

Out

put S

witc

hes

RP

RP

RP

RP

RP

RP

RP

RP

RP

RP

Data Memory

Configu-ration

Watchdog

T. Koal and H.T. Vierhaus: „ A software-based self-test and hardware reconfiguration solution for VLIW processors“, DDECS’10.

Active Redundancy at Architectural Level

Rebinding Logic allows for dynamically rebinding of operations to other slots

Pros: − Handling of faults in multiple slots possible − Hardware Overhead: 5.1 % − Low hardware overhead due to simple rebinding logic

Cons:

− Strong Performance Degradation

Slot 1

Fe/De

De/Ex

Ex/Wb

Regi

ster

File

EU

Slot 2

Fe/De

De/Ex

Ex/Wb

EU

Slot 3

Fe/De

De/Ex

Ex/Wb

EU

Slot 4

Fe/De

De/Ex

Ex/Wb

EU

Rebinding Logic

RP

RP

RP

RP

RP

RP

RP

RP

Fault State

Hybrid Redundancy at Architectural Level

Fault-Tolerant Design Framework for VLIW Processors: Operations will be duplicated/triplicated dynamically Detection of transient/permanent faults Extending the statically scheduled VLIW by a dynamic scheduler

Y.Y. Chen et. al.: „An Integrated Fault-Tolerant Design Framework for VLIW Processors “, DFT’03.

A nop nop nop

A A A nop

A B nop nop

A B A B

A B C D

A B A B C D C D

Instructions are modified dynamically:

Software Administrated RT-Level Granularity

52

Gate Level

RT Level

Architecture

System

OS Level

Application

Gates RT Level Architecture System

Adm

inis

trat

ion

Laye

r

Granularity

R. Karri, K. Kim, M. Potkonjak: „Computer Aided Design of Fault-Tolerant Application Specific Programmable Processors“, IEEE Transactions on Computers, 2000.

Software-Based Self-Repair

Multiple ASPP (application specific programmable processor) Each processor executes a particular application Multiple (versions of the same) applications are generated in advance Execute on each core the program that does not use a defective component Pros:

− No hardware-based reconfiguration logic Cons:

− Memory Consumption for large applications

Memory

Source Code of Application

Binary Code 1 (does not use Adder 1)

Binary Code n (does not use Reg 1)

Application Specific Data Path

Adder 1 Adder 2

Mul 1 Mul 2

Reg 2

Bus

… Mux1

Reg 1 Reg 3

Software-Administrated Architecture/System-Granularity

54

Gate Level

RT Level

Architecture

System

OS Level

Application

Gates RT Level Architecture System

Adm

inis

trat

ion

Laye

r

Granularity

A. Meixner & D.J. Sorin: „Detouring: Translating Software to Circumvent Hard Faults in Simple Cores“, DSN’08.

Software-Based Reconfiguration at Architecture-Level

Compile the source code for simple scalar processors in the field using a general purpose CPU Compilation takes fault state of the simple cores into account Various „detours“ for the generated code are provided:

− Replace 32-bit multiplication/addition by 16-bit multiplications/additions − Replace shift-operations with add- or multiply operation − ...

Pros: − No administrative hardware overhead

Cons: − memory consumption of the gcc, libraries, … − Diagnostic Test not provided

mul a,b

mul a,b

Original Code

mul al,bl mul al,bh …

mul al,bl mul al,bh …

Detoured Code

Multicore System

General Purpose CPU

Simple scalar core 1

Simple scalar core 2

Simple scalar

core m

Memory

Source Code for simple cores

Binary Code for simple cores

Binary code for GP CPU + gcc

Bus …

Fine- to Coarse-Grained Software-Based Self-Repair

56

Gate Level

RT Level

Architecture

System

OS Level

Application

Gates RT Level Architecture System

Adm

inis

trat

ion

Laye

r

Granularity

Schölzel

Basic Concept – Software-Based Self-Repair

A permanent fault is detected and repaired during the startup of the system (on-chip but off-line): At Start-up a diagnostic self-test is done by a self-test Program. A Self-Repair Program is executed in order to adapt in-the-field the binary code of the user application to the

current fault state of the processor Processor must be a statically scheduled processor architecture Capability of the self-repair program determines the granularity of the repair

57

VLIW Core Memory

Self-Repair Program(s)

User Application

Self-Test Program

Slot 1

EU 1

Slot 2

EU 2

Slot 3

EU 3

Slot 4

EU 4

Fetch-Register

Decode-Register

Write-Back-Register

Regi

ster

File

Example

58

nop nop nop nop

Slot 1

EU 1

Slot 2

EU 2

Slot 3

EU 3

Slot 4

EU 4

Fetch-Register

Decode-Register

Write-Back-Register

Regi

ster

File

xor nop mul add add mul shl mul add nop shl cmp add sub mul add

Slot 1

EU 1

Slot 2

EU 2

Slot 3

EU 3

Slot 4

EU 4

Fetch-Register

Decode-Register

Write-Back-Register

Regi

ster

File

nop mul add mul shl mul nop shl cmp sub mul add

jmp nop nop inc jmp nop nop inc xor add add add

Faultless Data Path Faulty Data Path

Organization of the Self-Repair

Rebinding: − Modify only the binding of operations within the same instruction

Rescheduling

− Operations are rescheduled within a whole basic block. − Dependencies must be taken into account. − Fine-Grained Self-Repair is possible

59

Program Memory

Application

VLIW Core

Data Memory

Repair Routine

Basic Block 0

Basic Block n

Basic Block k Basic Block k New Basic Block k

Fault-Handling at Slot-Level

60

Con

trol

Log

ic (C

trl)

Reg

iste

r File

EU 1

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

EU 4

FE

DE

EX

WB

... ... ... ...

...

Program Memory

Data Memory

Slot 1 Slot 4

Decode-Register Decode-Register

Bypass Bypass Bypass Bypass

Write-Back-Register Write-Back-Register

Fetch-Register Fetch-Register

Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Instruktion 1

Instruktion 3Instruktion 2

PC

MA

R

MB

R

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Result Dst Ld-Sig Result Dst Ld-Sig

Fault-Handling Strategy: Avoid a faulty slot by allocating only NOPs to that slot.

add r1,r2,r3

mul r5,r1,r4

Adapted Schedule:

mov r1,r9

add r3,r3,r0

sub r2,r3,r5

nop

nop

mov r6,r8

Original Schedule:

Rebinding, due to a fault in the adder of slot 1

Critical Components (if there is a fault in these components, then the whole slot can not be used anymore.

add r1,r2,r3

mul r5,r1,r4

mov r1,r9

add r3,r3,r0

sub r2,r3,r5

nop

nop

mov r6,r8

Fault-Handling at Operator-Level

61

Con

trol

Log

ic (C

trl)

Reg

iste

r File

EU 1

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

EU 4

FE

DE

EX

WB

... ... ... ...

...

Program Memory

Data Memory

Slot 1 Slot 4

Decode-Register Decode-Register

Bypass Bypass Bypass Bypass

Write-Back-Register Write-Back-Register

Fetch-Register Fetch-Register

Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Instruktion 1

Instruktion 3Instruktion 2

PC

MA

R

MB

R

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Result Dst Ld-Sig Result Dst Ld-Sig

Fault-Handling Strategy: Avoid a faulty operator in slot s by not scheduling operations to slot s that make use of this operator.

add r1,r2,r3

mul r5,r1,r4

Adapted Schedule:

mov r1,r9

add r3,r3,r0

sub r2,r3,r5

nop

add r9,r9,r7

mov r6,r8

Original Schedule:

Rescheduling, due to a fault in the adder of slot 1

add r1,r2,r3

mul r5,r1,r4

mov r1,r9

add r3,r3,r0

sub r2,r3,r5

nop

add r9,r9,r7

mov r6,r8

Critical Components (if there is a fault in these components, then the whole slot can not be used anymore.

Fault-Handling at Read-Port-Level

62

Con

trol

Log

ic (C

trl)

Reg

iste

r File

EU 1

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

EU 4

FE

DE

EX

WB

... ... ... ...

...

Program Memory

Data Memory

Slot 1 Slot 4

Decode-Register Decode-Register

Bypass Bypass Bypass Bypass

Write-Back-Register Write-Back-Register

Fetch-Register Fetch-Register

Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Instruktion 1

Instruktion 3Instruktion 2

PC

MA

R

MB

R

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Result Dst Ld-Sig Result Dst Ld-Sig

add r1,r2,r3

xor r5,r1,r4

Adapted Schedule:

mov r1,r9

add r3,r3,r0

sub r2,r3,r5

shl r7,r7

add r9,r9,r7

mov r6,r8

Original Schedule:

add r1,r2,r3

xor r5,r1,r4

mov r1,r9

add r3,r3,r0

sub r2,r3,r5

shl r7,r7

add r9,r9,r7

mov r6,r8

Rescheduling, due to a fault in the left read port of slot 1 (r0 to r3 can not be

accessed).

Fault-Handling Strategy: Schedule only those operations into a slot, whose source registers can be accessed through the corresponding read port.

Bit 0 of registers 0 to 63 Bit 15 of registers 0 to 63

...

0 1 2 62 63

Multiplexer Tree

...

0 1 2 62 63

...

Bit 0 Bit 15 ...

Multiplexer Tree

Structure of a Read Port

Bit 0 of registers 0 to 63

1

0 1

2

2 3

3

4 5

4

6 7

33 34

49

... ...

... . . .

Bit 0

Structure of a Multiplexer Tree

Critical Components (if there is a fault in these components, then the whole slot can not be used anymore.

Bypass-Level

63

Con

trol

Log

ic (C

trl)

Reg

iste

r File

EU 1

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

EU 4

FE

DE

EX

WB

... ... ... ...

...

Program Memory

Data Memory

Slot 1 Slot 4

Decode-Register Decode-Register

Bypass Bypass Bypass Bypass

Write-Back-Register Write-Back-Register

Fetch-Register Fetch-Register

Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Instruktion 1

Instruktion 3Instruktion 2

PC

MA

R

MB

R

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Result Dst Ld-Sig Result Dst Ld-Sig

Classification of Faults in the Bypass: • Forwarding from EX to DE defect • Forwarding from WB to DE defect • Reading from Read Port defect

Critical Components (if there is a fault in these components, then the whole slot can not be used anymore.

Handling of Faults, if EX to DE Forwarding is defective

64

Con

trol

Log

ic (C

trl)

Reg

iste

r File

EU 1

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

EU 4

FE

DE

EX

WB

... ... ... ...

...

Program Memory

Data Memory

Slot 1 Slot 4

Decode-Register Decode-Register

Bypass Bypass Bypass Bypass

Write-Back-Register Write-Back-Register

Fetch-Register Fetch-Register

Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Instruktion 1

Instruktion 3Instruktion 2

PC

MA

R

MB

R

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Result Dst Ld-Sig Result Dst Ld-Sig

add r1,r2,r3

xor r1,r3,r4

Adapted Schedule:

mov r2,r1

NOP

sub r2,r3,r8

shl r7,r7

add r9,r9,r7

mov r6,r9

Original Schedule:

add r1,r3,r3 add r8,r1,r8 add r9,r7,r9 sub r7,r8,r2

add r1,r2,r3

xor r1,r3,r4

mov r2,r1

NOP

sub r2,r3,r8

shl r7,r7

add r9,r9,r7

mov r6,r9

add r1,r3,r3

add r8,r1,r8

add r9,r7,r9 sub r7,r8,r2

Fault-Handling Strategy: Avoid the usage of the a defect forwarding network by scheduling data dependent operations not within a distance of 1.

Rescheduling, due to a fault in the left bypass of slot 1 (forwarding from EX

to DE can not be used).

Critical Components (if there is a fault in these components, then the whole slot can not be used anymore.

Handling of Faults, if reading from Read Port is defect

65

Con

trol

Log

ic (C

trl)

Reg

iste

r File

EU 1

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

EU 4

FE

DE

EX

WB

... ... ... ...

...

Program Memory

Data Memory

Slot 1 Slot 4

Decode-Register Decode-Register

Bypass Bypass Bypass Bypass

Write-Back-Register Write-Back-Register

Fetch-Register Fetch-Register

Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Instruktion 1

Instruktion 3Instruktion 2

PC

MA

R

MB

R

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Result Dst Ld-Sig Result Dst Ld-Sig

Adapted Schedule

Original Schedule: add r1,r2,r3

xor r1,r3,r4

mov r2,r1

NOP

sub r2,r3,r8

shl r8,r0

add r9,r9,r7

mov r6,r9

add r1,r3,r3 add r8,r1,r8 add r9,r7,r9 sub r7,r8,r2

add r1,r2,r3

xor r1,r3,r4

mov r2,r1 NOP sub r2,r3,r8

shl r8,r0 add r9,r9,r7 mov r6,r9

add r1,r3,r3 add r8,r1,r8 add r9,r7,r9 sub r7,r8,r2

Fault-Handling Strategy: Avoid the usage of the a defect read port by scheduling data dependent operations with a distance of 1 or 2 only.

Rescheduling, because the left read port of slot 1 can not be used

anymore.

Critical Components (if there is a fault in these components, then the whole slot can not be used anymore.

Fault-Handling at Register-Level

66

Con

trol

Log

ic (C

trl)

Reg

iste

r File

EU 1

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

Rea

dP

ort

EU 4

FE

DE

EX

WB

... ... ... ...

...

Program Memory

Data Memory

Slot 1 Slot 4

Decode-Register Decode-Register

Bypass Bypass Bypass Bypass

Write-Back-Register Write-Back-Register

Fetch-Register Fetch-Register

Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Operation for slot 1 Operation for slot 4...Instruktion 1

Instruktion 3Instruktion 2

PC

MA

R

MB

R

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Opc Src1 Src2 Dst Ld-Sig

Opc Val1 Dst Val2 Ld-Sig

Result Dst Ld-Sig Result Dst Ld-Sig

Register k

FF0

Mux0

Bit 0 from WB-Reg of slot1 2 3 4

Des

tinat

ion

regi

ster

nu

mbe

r (D

st) f

rom

Com

pare

logi

c (=

k)

Ctrl

FF15

Mux15

1 2 3 4

Ctrlslot 1slot 2

slot 3

slot 4 ...

...

Bit 15 from WB-Reg of slot

Bit 0 Bit 15

Structure of a Register

Adapted Schedule

Original Schedule: add r1,r2,r3

xor r1,r3,r4

mov r2,r1

NOP

sub r2,r3,r8

shl r8,r0

add r9,r9,r7

mov r6,r9

add r1,r3,r3 add r8.r1.r8 add r9,r7,r9 sub r7,r8,r2

Fault-Handling Strategy: Keep some backup registers and rename the faulty register in the whole program.

Rescheduling, due to a defect in register r8.

add r1,r2,r3

xor r1,r3,r4

mov r2,r1

NOP

sub r2,r3,r5

shl r5,r0

add r9,r9,r7

mov r6,r9

add r1,r3,r3 add r5.r1.r5 add r9,r7,r9 sub r7,r5,r2

Critical Components (if there is a fault in these components, then the whole slot can not be used anymore.

Setting Up the VLIW

67

VLIW Core

Program Memory

Application

Jmp to Test+Repair Routine 0

Test+Repair Routine 0

Test+Repair Routine 1

Test+Repair Routine 2

Test+Repair Routine 3

Arbiter

Reset

Jmp to Test+Repair Routine 1 Jmp to Test+Repair Routine 2 Jmp to Test+Repair Routine 3

Program Memory

Bus

pMem

Addr

inst

ruct

ion

dMem

Addr

dM

emAd

dr

dMem

Data

dM

emDa

ta

dMem

Ctrl

Data Memory

Data Memory

Bus

Test+Repair Routine i uses only slot i.