200 likes | 462 Views
Enrique Montealegre CDA 4150 Computer Architecture Dr. Montagne Fall 2005. Systolic Array HW. Using the linear array explained in class, create a PowerPoint presentation to show all the steps to execute two matrix vector products simultaneously, say: y = Ax and w = Bz.
E N D
Enrique Montealegre CDA 4150 Computer Architecture Dr. Montagne Fall 2005 Systolic Array HW
Using the linear array explained in class, create a PowerPoint presentation to show all the steps to execute two matrix vector products simultaneously, say: y = Ax and w = Bz. The matrices must be 3 x 3 matrices and the systolic array must have only 5 processing elements. a) How many steps are necessary to carry out the simultaneous computations? b) Assuming that the input vector is called the carrier vector, where in the carrier vector are the elements of x stored? c) Where in the output vector are the elements of w stored? Problem
Matrix Multiplication To calculate Y we follow this formula: y1 = a11*x1 + a12*x2 + a13*x3 y2 = a21*x1 + a22*x2 + a23*x3 y3 = a31*x1 + a32*x2 + a33*x3 To calculate W we follow this formula: w1 = b11*z1 + b12*z2 + b13*z3 w2 = b21*z1 + b22*z2 + b23*z3 w3 = b31*z1 + b32*z2 + b33*z3
Set Matrix A a33 a23 a32 a13 a22 a31 a12 a21 a11 y1 y2 y3 x3 x2 x1
Set Matrix B b33 b23 a33 b32 b13 a23 b22 a32 b31 a13 a22 a31 b12 b21 a12 a21 b11 a11 y1 w1 y2 w2 y3 w3 z3 x3 z2 x2 z1 x1
T0 b33 b23 a33 b32 b13 a23 b22 a32 b31 a13 a22 a31 b12 b21 a12 a21 b11 a11 w1 y2 w2 y3 w3 y1 z3 x3 z2 x2 z1 x1
T1 b33 b23 a33 b32 b13 a23 b22 a32 b31 a13 a22 a31 b12 b21 a12 a21 b11 a11 y2 w2 y3 w3 y1 w1 z3 x3 z2 x2 z1 x1
T2 b33 b23 a33 b32 b13 a23 b22 a32 b31 a13 b12 a22 b21 a31 a12 b11 a21 w2 y3 w3 y1 w1 y2 a11 z3 x3 z2 x2 z1 x1 y1 = a11*x1
T3 b33 b23 a33 b32 b13 a23 b22 a32 b31 a13 b12 b21 a31 a22 y3 w3 y1 w1 y2 w2 a12 b11 a21 z3 x3 z2 x2 z1 x1 y1 = a11*x1 + a12*x2 y2 = a21* x1 w1 = b11*z1
T4 b33 a33 b32 b23 b13 a23 b22 a32 b31 w3 y1 w1 y2 w2 y3 a13 b12 a22 b21 a31 z3 x3 z2 x2 z1 x1 y1 = a11*x1 + a12*x2 + a13*x3 y2 = a21* x1+ a22*x2 y3 = a31*x1 w1 = b11*z1 + b12*z2 w2 = b21*z1
T5 b33 a33 b32 y1 b23 w1 y2 w2 y3 w3 b13 a23 b22 a32 b31 z3 x3 z2 x2 z1 y1 = in output vector y2 = a21* x1+ a22*x2 + a23*x3 y3 = a31* x1+ a32*x2 w1 = b11*z1+ b12*z2 + b13*z3 w2 = b21*z1+ b22*z2 w3 = b31*z1
T6 y1 w1 b33 y2 w2 y3 w3 b23 a33 b32 z3 x3 z2 x2 y1 = in output vector y2 = complete answer y3 = a31* x1+ a32*x2 + a33*x3 w1 = in output vector w2 = b21*z1+ b22*z2 + b23*z3 w3 = b31*z1+ b32*z2
T7 y1 w1 y2 w2 y3 w3 b33 z3 x3 z2 y1 = in output vector y2 = in output vector y3 = complete answer w1 = in output vector w2 = complete answer w3 = b31*z1+ b32*z2 + b33*z3
T8 y1 w1 y2 w2 y3 w3 z3 x3 y1 = in output vector y2 = in output vector y3 = complete answer w1 = in output vector w2 = in output vector w3 = complete answer
T9 y1 w1 y2 w2 y3 w3 z3 y1 = in output vector y2 = in output vector y3 = in output vector w1 = in output vector w2 = in output vector w3 = complete answer
T10 y1 w1 y2 w2 y3 w3 y1 = in output vector y2 = in output vector y3 = in output vector w1 = in output vector w2 = in output vector w3 = in output vector
Answers • How many steps are necessary to carry out the simultaneous computations? It took 11 steps b) Assuming that the input vector is called the carrier vector, where in the carrier vector are the elements of x stored? input vector c) Where in the output vector are the elements of w stored? output vector x3 x2 x1 w1 w2 w3