Top Banner
1 © 2016 The MathWorks, Inc. Optimization and Implementation of Embedded Signal Processing Algorithms Jonas Rutström Senior Application Engineer
51

Optimization and Implementation of Embedded Signal ...

Oct 16, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Optimization and Implementation of Embedded Signal ...

1© 2016 The MathWorks, Inc.

Optimization and Implementation of

Embedded Signal Processing Algorithms

Jonas Rutström

Senior Application Engineer

Page 2: Optimization and Implementation of Embedded Signal ...

2

1. What’s your algorithm?

Two important questions in embedded design...

Page 3: Optimization and Implementation of Embedded Signal ...

3

2. What’s your target?

Two important questions in embedded design...

Page 4: Optimization and Implementation of Embedded Signal ...

4

Targets are very different...

Page 5: Optimization and Implementation of Embedded Signal ...

5

DSP MCU SoC/FPGA

The embedded hardware might be very different...

Page 6: Optimization and Implementation of Embedded Signal ...

6

Workflow | Idea to implementation

Page 7: Optimization and Implementation of Embedded Signal ...

7

Workflow | Idea to implementation

Prototyping

Page 8: Optimization and Implementation of Embedded Signal ...

8

Workflow | Idea to implementation

Prototyping

Page 9: Optimization and Implementation of Embedded Signal ...

9

Workflow | Idea to implementation

Prototyping Production

Page 10: Optimization and Implementation of Embedded Signal ...

10

Workflow | Idea to implementation

Prototyping Production

Page 11: Optimization and Implementation of Embedded Signal ...

11

Workflow | Idea to implementation

Prototyping Production

Optimization

Page 12: Optimization and Implementation of Embedded Signal ...

12

Let’s take a step back...

Page 13: Optimization and Implementation of Embedded Signal ...

13

What do we mean with optimization?

Page 14: Optimization and Implementation of Embedded Signal ...

14

Memory ReadabilitySpeed Target

Page 15: Optimization and Implementation of Embedded Signal ...

15

Memory ReadabilitySpeed Target

Page 16: Optimization and Implementation of Embedded Signal ...

16

Optimization at different phases in the development...

C SoC/FPGAPrototyping

Page 17: Optimization and Implementation of Embedded Signal ...

17

Optimization at different phases in the development...

C SoC/FPGAPrototyping

Page 18: Optimization and Implementation of Embedded Signal ...

18

Optimization at different phases in the development...

C SoC/FPGAPrototyping

Page 19: Optimization and Implementation of Embedded Signal ...

19

Optimization at different phases in the development...

Prototyping

Page 20: Optimization and Implementation of Embedded Signal ...

20

Profiling!

Page 21: Optimization and Implementation of Embedded Signal ...

21

Profiling in MATLAB

tic/toc

% start timer

tic

% execute code

out = myFunction(in);

% stop timer (and store

% elapsed time)

et = toc;

profile

% turn on profiler

profile on

% execute code

out = myFunction(in);

% turn off profiler

profile off

% open html report

profile report

Where are the bottlenecks?How long did it take?

Page 22: Optimization and Implementation of Embedded Signal ...

22

Profiling in MATLAB

Page 23: Optimization and Implementation of Embedded Signal ...

23

Profiling in Simulink

Page 24: Optimization and Implementation of Embedded Signal ...

24

Example(Profiling when prototyping in MATLAB)

Page 25: Optimization and Implementation of Embedded Signal ...

25

Optimization at different phases in the development...

C SoC/FPGAPrototyping

Page 26: Optimization and Implementation of Embedded Signal ...

26

Now, lets take a closer look of the

workflow in embedded design!

Page 27: Optimization and Implementation of Embedded Signal ...

27

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 28: Optimization and Implementation of Embedded Signal ...

28

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 29: Optimization and Implementation of Embedded Signal ...

29

Key Detection Algorithm

Page 30: Optimization and Implementation of Embedded Signal ...

30

System Design

Component Integration

Optimize

System Object

System Object(Reference Design)

ARM

FPGA

RF

Page 31: Optimization and Implementation of Embedded Signal ...

31

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 32: Optimization and Implementation of Embedded Signal ...

32

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 33: Optimization and Implementation of Embedded Signal ...

33

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 34: Optimization and Implementation of Embedded Signal ...

34

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 35: Optimization and Implementation of Embedded Signal ...

35

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Simulink

Page 36: Optimization and Implementation of Embedded Signal ...

36

DEMO(System Integration and Generating Code for ARM Cortex A9 from Simulink)

(Including verification with PIL)

Page 37: Optimization and Implementation of Embedded Signal ...

37

System Design

Component Integration

Optimize

System Object

System Object(Reference Design)

ARM

FPGA

RF

Page 38: Optimization and Implementation of Embedded Signal ...

38

A few words about Embedded Coder...

Page 39: Optimization and Implementation of Embedded Signal ...

39

Embedded Coder Quick Start

Page 40: Optimization and Implementation of Embedded Signal ...

40

DEMO(Embedded Coder Quick Start)

Page 41: Optimization and Implementation of Embedded Signal ...

41

Another use case...

Page 42: Optimization and Implementation of Embedded Signal ...

42

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

MATLAB

Page 43: Optimization and Implementation of Embedded Signal ...

43

Example(Generating Code ARM Cortex A9 from MATLAB)

Page 44: Optimization and Implementation of Embedded Signal ...

44

System Design

Component Integration

Optimize

System Object

System Object(Reference Design)

ARM

FPGA

RF

Page 45: Optimization and Implementation of Embedded Signal ...

45

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 46: Optimization and Implementation of Embedded Signal ...

46

Example: Workflow for embedded design

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Speed / Area Optimizations

Page 47: Optimization and Implementation of Embedded Signal ...

47

Area Optimization for FPGA implementation

ARM

FPGA

Page 48: Optimization and Implementation of Embedded Signal ...

48

Example(Area Optimization for FPGA Implementation)

Page 49: Optimization and Implementation of Embedded Signal ...

49

System Design

Component Integration

Optimize

System Object

System Object(Reference Design)

ARM

FPGA

RF

Page 50: Optimization and Implementation of Embedded Signal ...

50

Summary Optimization and Implementation of Embedded Signal Processing Algorithms

Reference Design

Constrained Design(E.g. Fixed-Point)

Target Specific Design

C(E.g. Fixed-Point)

Target Specific Design

SoC/FPGA(E.g. Fixed-Point)

Page 51: Optimization and Implementation of Embedded Signal ...

51

Questions?