systolic 4x4 matrix qr decomposition xiangfeng wang mark chen
TRANSCRIPT
Systolic 4x4 Matrix QR Decomposition
Xiangfeng Wang
Mark Chen
Matrix Triangularization
Given matrix Aij
To triangularize A, we find a square orthogonal matrix Q and left multiply it with A.
44434241
34333231
24232221
14131211
aaaa
aaaa
aaaa
aaaa
A
Matrix Triangularization
For example, given Q23
Left multiplying Q23 with A will zero the A32 value.
1000
00
00
0001
23 cs
scQ
Matrix Triangularization
Using this principle, by setting up our Q correctly
Left multiplying this Q with A will eliminate all value below the main diagonal of A.
))()(( 433242213141 QQQQQQQ
QR Decomposition
*44a
14a 13a 12a *11a
24a 23a *22a 21a
34a *33a 32a31a
43a 42a 41a
*11
12
13
14
'
'
'
'
a
a
a
a
*22
23
24
'
'
'
a
a
a *33
34
'
'
a
a*44'a
QR Decomposition
The circular cell simply “reflects” or changes the direction of the data flow
The square cell performs two functions. For token values (marked with a *), it will perform the sine and cosine values and store it. For all other values it will apply the sine and cosine values and then pass it along its respective path.
x
y
1x 2x
1y
2y
QR Decomposition
*44a
14a 13a 12a *11a
24a 23a *22a 21a
34a *33a 32a31a
43a 42a 41a
*11
12
13
14
'
'
'
'
a
a
a
a
*22
23
24
'
'
'
a
a
a *33
34
'
'
a
a*44'a
Generating the Sine and Cosine
Sine
Cosine
x
y
X’
Y’
y’ = x*c + y*s x’ = y*c – x*s
sine cosine
X’Y’
x=1, y=2, = actan(1/2) = 0.4636, sin = 0.4472, cos = 0.8944y’= 2.2361, x’ = 1.0646e-004, time for the calculation ~25 cycles
Generating and Applying the Rotation
Simulation
We finished one computational unit. We will build the whole System and figure out the right timing…