Home › Practice › Accelerators › One cell of a systolic array (PE)

One cell of a systolic array (PE)

EasyRTLAcceleratorssequential

Instead of one huge multiplier circuit, build one tiny cell and tile it into a grid. Each cell does a MAC and also passes its inputs on to its neighbours, like a bucket line. This idea is called a systolic array (H. T. Kung and Charles Leiserson described it in the 1970s; "systolic" because data pulses through the grid like blood through a heart). The matrix-multiply unit in Google's TPU, and in many AI chips, is a grid of multiply-accumulate cells; the systolic array is one well known way to wire them.

Concept first. The cell is called a PE (processing element). A number a enters from the left and a number b enters from the top. The cell multiplies the two it sees right now and adds the product to its own total. At the same time it saves a and b so that, one tick later, the cell to its right can see a and the cell below can see b. Passing on costs one tick, and that one tick of delay is what makes the whole grid work.

Solve in your browser →

No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.

More in this track

← 2x2 matrix multiply2x2 systolic array →