24.04.2013 Views

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 6. LAYOUT CASE STUDIES 158<br />

Matrix 1<br />

Empty matrix<br />

Result matrix<br />

Matrix 2<br />

(a) Matrix multiplier arrangement<br />

x_in<br />

mult<br />

add<br />

z_in<br />

y_in<br />

z_out<br />

(b) Functional cell<br />

Figure 6.23: Implementing a 3D matrix multiplier<br />

N-dimensional circuits have many potential uses in describing operations on multi-dimensional<br />

data and have already been discussed for some applications [42, 43]. They could potentially<br />

be used to provide a quick route for translating imperative for loop algorithms into hard-<br />

ware, extending existing work on mapping nested loop algorithms into multi-dimensional<br />

arrays [39].<br />

In this work we shall concentrate on describing a single circuit, a matrix multiplier, using<br />

the three-dimensional cube combinator.<br />

6.6.3 A 3D Matrix Multiplier<br />

A cubical circuit description can be used to combine two dimensional data and generate a<br />

two dimensional output. This is ideal for describing matrix multiplication as we can describe<br />

a circuit which has data from the two source matrices moving unchanged through the array<br />

while the output matrix is accumulated along a different axis. Figure 6.23(a) illustrates this<br />

arrangement.<br />

The cubical circuit can be made up <strong>of</strong> cells that function as shown in Figure 6.23(b). Fig-<br />

ure 6.24 shows the Quartz description for the matrix multiplier. Note that the first matrix<br />

must be transposed in order to correctly arrange the elements <strong>of</strong> the matrix for the circuit,<br />

nevertheless this is an extremely simple description <strong>of</strong> multiplying a y ×z matrix and a z ×x<br />

matrix to produce a y × x matrix as output.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!