Matrix Multiplication Application
The NxN matrix multiplication splits the computation of the matrix product up into single multiplications and additions. This way, the application "matrix multiplication" is split up into single processes, each of which only performs a multiplication followed by an addition:
Single coefficients of the resulting matrix are computed by appropriately connecting the processes. For instance, an entire column of the resulting matrix is computed as follows:
By using N of these structures, the N columns of the result are computed:
To feed the structure and to retrieve the result, an input generator and an output consumer is used. The input generator has ports which provide the factors of the input matrices. Note that each matrix coefficient is the input of N multiplication/addition processes. Since each port can be connected to only one channel, for each matrix coefficient N ports are required. Likewise, there are NxN ports required to feed zeros to the first layer of multiplication/addition processes. The output consumer has NxN ports which are connected to the last layer of multiplication/addition processes to receive the result.