Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ... Verification of Parameterised FPGA Circuit Descriptions with Layout ...

24.04.2013 Views

CHAPTER 5. SPECIALISATION 124 Yin ACCin Qin y x Figure 5.11: Virtex-II cell configuration to create a parallel multiplier ACCout Yin Pout SLICE LOGIC Xin Xout Qin Pin Xin (a) Standard cell design Yout SUMout Yin Pout ACCin Pin ACCout Qin SUMout (b) Specialised X=0 Figure 5.12: Functional cells for parallel multiplier block multcell ((wire acc in, wire y in), (wire acc out, wire p out, wire x out)) ∼ ((wire q in, wire p in, wire x in), (wire sum out, wire y out)) attributes { height = 1. width = 1. }{ wire xored sig. y out = y in. x out = x in. acc out = acc in. (x in, y in, q in) ; mult lut ; xored sig at (0,0). (p in, xored sig) ; xorcy ; sum out at (0,0). ((x in, y in), p in) ; fst mult and ;muxcy xored sig ;p out at (0,0). } Figure 5.13: Quartz description of the multiplier cell Yout SUMout

CHAPTER 5. SPECIALISATION 125 block mult (int n) (wire y[n], wire x[n]) ∼ (wire z[n]) { wire zeros[n]. int j. for j = 0..n−1 { zeros[j] = false. } . (zeros, y) ; zip 2 ; rev n ; converse (pi1) ; grid (n, n, multcell) ; [converse (zip 3), map (n, pi1) ; rev n] ; ((zeros, zeros, x), z) at (0,0). } Figure 5.14: Quartz description of the multiplier grid designed specifically for a real circuit architecture and thus has different data-flow. When the value of the x input is known the circuit can be specialised. When x = 0, the individual cell can be replaced by the arrangement shown in Figure 5.12(b). Because the x bit value is common to the entire column the entire column can be eliminated and replaced with an iterative wiring arrangement that directly connects the sum out outputs of the previous column to the sum out output of the current column displaced vertically by one cell. This is described in a spec multcol block which produces a specialised multiplier with unnecessary rows eliminated. Rather than using the grid combinator, we describe a multiplier with column-level special- isation using irow and this spec multcol block. spec multcol is parameterised by a boolean array of the bit values of static signal x and the index parameterisation of irow is used to extract the correct value for each column. This is just one way of describing this behaviour, an alternative would be to zip the boolean vector with the other column inputs and use the standard row combinator. The general and specialised multipliers can be overloaded so that the correct instance of mult is selected depending on whether a static or dynamic x value is specified. 5.5.2 Results We expect the performance of the specialised multiplier to depend on the precise value of the x input, since 0s in the x value do not require any computation at all. Therefore we synthe-

CHAPTER 5. SPECIALISATION 124<br />

Yin<br />

ACCin<br />

Qin<br />

y<br />

x<br />

Figure 5.11: Virtex-II cell configuration to create a parallel multiplier<br />

ACCout<br />

Yin<br />

Pout<br />

SLICE LOGIC<br />

Xin<br />

Xout<br />

Qin Pin<br />

Xin<br />

(a) Standard cell design<br />

Yout<br />

SUMout<br />

Yin<br />

Pout<br />

ACCin<br />

Pin<br />

ACCout<br />

Qin<br />

SUMout<br />

(b) Specialised X=0<br />

Figure 5.12: Functional cells for parallel multiplier<br />

block multcell ((wire acc in, wire y in), (wire acc out, wire p out, wire x out)) ∼<br />

((wire q in, wire p in, wire x in), (wire sum out, wire y out))<br />

attributes { height = 1. width = 1. }{<br />

wire xored sig.<br />

y out = y in.<br />

x out = x in.<br />

acc out = acc in.<br />

(x in, y in, q in) ; mult lut ; xored sig at (0,0).<br />

(p in, xored sig) ; xorcy ; sum out at (0,0).<br />

((x in, y in), p in) ; fst mult and ;muxcy xored sig ;p out at (0,0).<br />

}<br />

Figure 5.13: Quartz description <strong>of</strong> the multiplier cell<br />

Yout<br />

SUMout

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

Saved successfully!

Ooh no, something went wrong!