Download presentation
Presentation is loading. Please wait.
1
EEEB0765 Digital Signal Processing for Embedded Systems 5 Systolic Arrays
Assoc. Prof. Dr. Peerapol Yuvapoositanon Dept. of Electronic Engineering EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
2
Outline The concept of Systolic arrays
Hands on Simulation with Simulink and S-function EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
3
What Is a Systolic Array?1
A systolic array is an arrangement of processors in an array where data flows synchronously across the array between neighbors, usually with different data flowing in different directions. 1 “Systolic Arrays & Their Applications, J. Bleak” EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
4
Examples of Systolic Arrays
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
5
Example 11 Calculate the force of Planets Conventional method: N2
Systolic method: N We will need one processing element for each body, lets call them planets. 1 “Systolic Arrays & Their Applications, J. Bleak” EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
6
B2 B3 B1 B4 B6 B5 Six planets in orbit with different masses, and different forces acting on each other, so are systolic array will look like this. EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
7
Each processor will hold the newtonian force formula:
Fij = Gmimj/d2ij , G being the gravitational constant. Then load the array with values. B1 B2 B3 B4 B5 B6 Now that the array has the mass and the coordinates of Each body we can begin our computation. EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
8
Fij = Gmimj/d2ij B6, B5, B4, B3, B2, B1 B1m B1c B2m B2c B3m B3c B4m
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
9
Fij = Gmimj/d2ij B6, B5, B4, B3, B2 B1m B1c B2m B2c B3m B3c B4m B4c
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
10
Fij = Gmimj/d2ij B6, B5, B4, B3 B1m B1c B2m B2c B3m B3c B4m B4c B5*B1
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
11
Fij = Gmimj/d2ij B6, B5, B4 B1m B1c B2m B2c B3m B3c B4*B1 B5*B2 B6*B3
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
12
Fij = Gmimj/d2ij B6, B5 B1m B1c B2m B2c B3*B1 B4*B2 B5*B3 B6*B4
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
13
Fij = Gmimj/d2ij B6 B1m B1c B2*B1 B3*B2 B4*B3 B5*B4 B6*B5
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
14
Fij = Gmimj/d2ij Done Done Done Done Done Done
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
15
Example 21 Calculate Matrix Multiplication Conventional method: N3
Systolic method: N 1 “Systolic Arrays & Their Applications, J. Bleak” EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
16
Example for N=2 N3=23=8 2 Mult. 2 Mult. 2 Mult. 2 Mult.
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
17
Finding C[i,j] What is the algorithm to find C[i,j]?
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
18
Matrix Multiplication (Conventional)
For I = 1 to N For J = 1 to N For K = 1 to N C[I,J] = C[I,J] + A[J,K] * B[K,J]; end This is N3 computation EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
19
C++ Code for Matrix Multiplication
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
20
Systolic Array Matrix Computation
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
21
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
22
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
23
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
24
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
25
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
26
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
27
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
28
* = Lets try this using a systolic array. 5 3 2 2 5 4 3 2 P1 P2 P3 P4 P5 P6 P7 P8 P9
29
Clock tick: 1 5 3 2 2 5 4 3 2 2 4 3*3 P1 P2 P3 P4 P5 P6 P7 P8 P9 9
30
Clock tick: 2 5 3 2 2 5 3 2 4*2 3*4 3 5 2*3 P1 P2 P3 P4 P5 P6 P7 P8 P9 17 12 6
31
Clock tick: 3 5 3 2 2*3 4*5 3*2 3 5*2 2*4 3*3 P1 P2 P3 P4 P5 P6 P7 P8 P9 23 32 6 16 8 9
32
Clock tick: 4 5 2*2 4*3 3*3 5*5 2*2 5 2*2 3*4 P1 P2 P3 P4 P5 P6 P7 P8 P9 23 36 18 25 33 4 13 12
33
Clock tick: 5 2*5 3*2 5*3 5*3 5*2 3*2 P1 P2 P3 P4 P5 P6 P7 P8 P9 23 36 28 25 39 19 22 6
34
Clock tick: 6 3*5 5*2 2*3 P1 P2 P3 P4 P5 P6 P7 P8 P9 23 36 28 25 39 34 32 12
35
Clock tick: 7 5*5 P1 P2 P3 P4 P5 P6 P7 P8 P9 23 36 28 25 39 34 32 37
36
Same answer! In 2n + 1 time 23 36 28 25 39 34 28 32 37 P1 P2 P3 P4 P5
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
37
Hands-on Simulation Let us do a 3-by-3 Matrix multiplication.
Using Systolic Arrays and Simulink. The PE in systolic array is a Simulink s-function.
38
Simulink model * Use systolic array to find the multiplication of
* = EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
39
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
40
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
41
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
42
Part of “mdlUpdate” EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
43
PE_sfcn_sim.mdl EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
44
A Process Element EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
45
PE is a mask EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
46
PE mask is an S-function
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
47
PE_sfcn.m EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
48
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
49
EEEB0765 DSP fort Embedded Systems http://embedsigproc. wordpress
EEEB0765 DSP fort Embedded Systems Assoc. Prof. Dr. P.Yuvapoositanon
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.