Modeling FPGA-Based Cyber-Physical Systems Dan Fay, Graham Schelle, Li Shang, Dirk Grunwald University of Colorado at Boulder

Outline • Cyber-Physical Systems (CPS) – What they are, and their useful properties

• Modeling CPS – Changing operand precision, injecting faults and checking results

• Tool Flow – Experimental setup for studying CPS

• Experimental Results University of Colorado at Boulder

Core Research Lab

Cyber-Physical Systems • What they are – computer systems that interact with the real world – Avionics – Robots – Automotive controls

• Important Characteristics – High reliability requirements • Correctness • Real-time deadlines • Often safety-critical

– Implemented as embedded systems • Space, heat, energy constrained University of Colorado at Boulder

Core Research Lab

Cyber-Physical Systems • Many CPS applications have a notion of soft computation • A correct result is not one exact numeric answer • Can exploit this property to: – Reduce resource utilization – Reduce energy consumption – Increase reliability University of Colorado at Boulder

Core Research Lab

CPS on FPGAs • Cyber-Physical Systems are well-suited for FPGAs: – Straightforward to provide deterministic execution – FPGAs are more power efficient than microprocessors – Can exploit the run-time reconfiguration characteristics of FPGAs to improve CPS’ performance and efficiency University of Colorado at Boulder

Core Research Lab

Modeling CPS • Challenges: – Prototyping on FPGAs is slow, difficult, and cumbersome – Soft computation requires new ways to determine what is correct output, since the results can differ numerically and still be correct

Minimum Floating Point Precision (16-bit mantissa)

Double Floating Point Precision (52-bit mantissa) University of Colorado at Boulder

Core Research Lab

Tool Flow • Tool flow consists of three major components: – Value Profiler – determines the minimum exponent range needed – Precision Clamper – determines the minimum floating point precision needed for correct execution – Fault Injector – studies the effect on correctness for injecting different types of faults – Area Estimator – Estimates how much of the FPGA will be needed to implement different CPS designs University of Colorado at Boulder

Core Research Lab

Tool Flow (Exponent Profiling) • A Pin tool injects code into the application to profile all of the intermediate floating point values • Exponent ranges are determined using this information

Pin Framework Value Profiler

Application

Minimum Exponent Size

University of Colorado at Boulder

Core Research Lab

Tool Flow (Precision Clamping) • Pin tool injects code to truncate the mantissa of floating point values

Pin Framework Precision Clamping

Application

Baseline Results

Tested Results

Pass/ Fail

Perceptual Difference Utility Minimum Mantissa

University of Colorado at Boulder

Core Research Lab

Tool Flow (Fault Injection) • Pin tool injects code to inject stuck-at-0, stuck-at-1, or stuckat-flip hard faults

Pin Framework Fault Injector

Application

Baseline Results

Tested Results

Pass/ Fail

Perceptual Difference Utility Minimum Mantissa

University of Colorado at Boulder

Core Research Lab

Tool Flow (FPGA Usage Estimation) • Tool estimates FPGA resource utilization using synthesized FPUs from the RPL variable precision floating point library

Minimum

Minimum

Exponent

Mantissa

Variable Precision FPU Library

FPGA Synthesis Software

Area Estimate

Reconf. Power

Time

Estimate

Estimate University of Colorado at Boulder

Core Research Lab

Test Setup • Examined the Polynomial Mahalanobis Distance robot vision application – MATLAB-based, but was run using GNU Octave

University of Colorado at Boulder

Core Research Lab

lId E

DA

rr a

ee 75 4

_p ow

y3 su _Z 7M m __ 7p Ei A ie rr ro e ay e7 du N 54 ct IT Id _e _E E7 xp _Z R M KS 4k A ro rr 2_ ay nI RK dE N IT S1 vR _E _ K R _Z 6A K m S2 rr iId ay _S E7 2I 4_ T_ _Z M ES Ar pl Id ra 4_ E7 yN R M S2 I T_ Ar _ E ra RK yN S IT 2_ _E S4 RK _ S2 _R KS 1_

_Z m

K7 N

4i dx …

_N IN Td

ct or 1

__ ie

ro …

_

flo or

on ze

dg em m

_Z 6D

fin d_ n

10 id x_ ve

_Z N

_Z N

_Z 21

Exponent Size (bits)

Experimental Results

Minimum Exponent Size

12

10

8

6

4

2

0

Function

Core Research Lab

University of Colorado at Boulder

dg em fin d_ m _ no nz er o…

flo _Z or 10 6 D id _ x_ N IN ve Td ct or 1 4i __ dx ie _Z e … N e K7 75 _Z 4_ N m DA po lId _Z r w E r a 7p 7M y3 ro A su __ du rr m ie ay ct Ei e N e7 Id _Z I T_ E7 54 4k ER M _e ro A xp KS nI r ra dE 2_ y N vR RK IT _Z K _E S1 m 6A R iId _ rr K _Z E7 ay S2 2I pl M _ T_ S4 Id Ar E7 ES ra _ M yN 4_ A IT R rr _E S2 ay _ RK N IT S _E 2_ RK S4 S2 _ _R KS 1_

_Z N

_Z 21

Precision (bits)

Experimental Results

Reduced Precision Results

60

50

40

30 Lowest Passing Highest Failing

20

10

0

Function

Core Research Lab

University of Colorado at Boulder

dg em fin m d_ _ no nz er o…

flo _Z or 10 6D id _N x_ IN ve Td ct or 14 __ id ie x… _Z e N e7 K7 54 _Z N _p DA m ow lId r ra _Z E7 y 7p 3s M ro __ A um rr du i ee ay Ei ct e7 N Id I _Z 5 T E7 4_ _E 4k M ex R ro A K p rr nI S a 2_ dE yN R vR IT K _Z S1 K _E 6A m _ R iId K rr S a E _Z y2 2_ 7M pl IT S4 A Id _ _ rr E E7 ay S4 M N _ Ar R IT S2 ra _E yN _ R K IT S2 _E _S R K 4_ S2 _R K S1 _

_Z N

_Z 21

Number of Failed Tests

Experimental Results

Fault Injection Results

9

8

7

6

5

4 stuck-at-0 stuck-at-1 stuck-at-flip

3

2

1

0

Function

Core Research Lab

University of Colorado at Boulder

Experimental Results

FPGA Utilization Improvement (_dgemm) Relative FPGA Utilization

• Reducing the floating point precision and exponent can significantly improve resource utilization on an FPGA • Reducing precision causes a superlinear decrease in FPGA utilization

1.2 1 0.8 0.6 0.4 0.2 0

Double Precision

Single Precision

Minimum Precision

University of Colorado at Boulder

Core Research Lab

Future Work • Study changing the precision at different granularities – Whole program – Per-function – Small groups of operations

• Find more general ways and finer-grained ways to determine whether reducing the precision and/or injecting faults leads to incorrect execution University of Colorado at Boulder

Core Research Lab

Conclusions • Cyber-Physical Systems (CPS) have soft computational requirements that can be exploited for: – Improved efficiency – Increased reliability

• We developed an easy-to-use tool flow for studying these soft computational properties University of Colorado at Boulder

Core Research Lab

Questions?

Contact for more information: [email protected] University of Colorado at Boulder

Core Research Lab

Modeling FPGA-Based Cyber-Physical Systems

Modeling FPGA-Based Cyber-Physical. Systems. University of Colorado at Boulder. Dan Fay, Graham Schelle, Li Shang, Dirk Grunwald ...

155KB Sizes 1 Downloads 145 Views

Recommend Documents

Modeling Large-Scale Systems-of-Systems with ...
1 EFSS Btry. 1 HIMARS Btry. 2 Cbt Engr Co. Ground Combat Element. 2 LAR Co. 27 LAV-25. 2 Tank Co. 47 M1A1. 2 AA Co. 47 EFV. 4 AV-8B Sqdn. 40 AV-8B.

Modeling of Thermal Systems
combustion engine, a heat exchanger, or a water pump, is often used to explain how the device works. ... employed to compute the total thermal resistance and the heat flux for a given temperature difference. .... Similarly, the solar heat flux incide