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 159<br />

block matmultcell (int n) (wire x in[n], wire y in[n], wire z in[n]) ∼<br />

(wire z out[n], wire y out[n], wire x out[n]) {<br />

x out = x in.<br />

y out = y in.<br />

((x in, y in), z in) ; fst (mult n) ; add n; z out at (0,0).<br />

}<br />

block matmult (int bits) (int x, int y, int z)<br />

(wire mat1[y][z ][ bits ], wire mat2[z][x][ bits ]) ∼ (wire mat3[y][x][ bits ]) {<br />

wire emptymat[y][x][bits].<br />

wire mat trans[z][y][ bits ].<br />

int i , j, k.<br />

for i = 0..y−1 {<br />

for j = 0..x−1 {<br />

for k = 0..bits−1 { emptymat[i][j ][ k] = false. } . } . } .<br />

mat1 ; word transpose bits (y, z) ; mat trans at (0,0).<br />

(mat trans, mat2, emptymat) ;<br />

cube (x, y, z, matmultcell bits) ;<br />

converse (tplapl 2) ;<br />

pi1 ;<br />

mat3 at (0,0).<br />

}<br />

Figure 6.24: Quartz description <strong>of</strong> the 3D matrix multiplier<br />

In the implementation <strong>of</strong> the functional cell we use the column ripple adder developed in<br />

Section 6.2 and the placed parallel multiplier we described in Chapter 5.<br />

We can pipeline this circuit by inserting registers on the z data path, since this is the<br />

accumulator path. We can derive a general pipelining arrangement for nd using a retiming<br />

theorem for a column:<br />

Theorem 27 coln R = fst ( ˜<br />

n D) ; coln (R ; D) ; [D −n , ˜<br />

n D−1 ]<br />

We can apply this to the n-dimensional combinator description to give a theorem for the<br />

one-dimensional pipelining <strong>of</strong> an n-dimensional structure:<br />

Theorem 28<br />

ndn R = tplaprn−1 −1 ; fst (zip n−1 ; ˜<br />

in D) ; tplaprn−1 ;<br />

ndn (R ; tplapln−1 −1 ; fst D ; tplapln−1)<br />

tplapln−1 −1 ; [D −in , zip n−1 ; ˜<br />

in D−1 ; zip n−1 −1 ] ; tplapln−1

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

Saved successfully!

Ooh no, something went wrong!