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 3. GENERATING PARAMETERISED LIBRARIES WITH LAYOUT 50<br />

block row (int n, block R (‘a, ‘b) ∼ (‘c, ‘a)) (‘a l , ‘b t[n]) ∼<br />

(‘c b[n], ‘a r)<br />

attributes {<br />

height = maxf(k=0..n−1, height((is[k], t[k]) ;R ; (b[k], is [k+1]))).<br />

width = sum(k=0..n−1, width ((is[k], t[k]) ;R ; (b[k], is [k+1]))).<br />

} {<br />

// Wires: l = left , t = top, b = bottom, r = right<br />

int i. ‘a is [n+1].<br />

is [0] = l.<br />

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

(is [ i ], t[ i ]) ; R ; (b[i ], is [ i+1])<br />

at (sum(k=0..i−1,width((is[k], t[k]) ; R ; (b[k], is [k+1]))), 0).<br />

} .<br />

r = is[n].<br />

}<br />

block fadd (wire cin, (wire a, wire b)) ∼ (wire ans, wire cout)<br />

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

block rippleadd (int n) (wire a[n], wire b[n]) ∼ (wire ans[n+1])<br />

attributes {<br />

height = 1.<br />

width = 2 ∗ n.<br />

} {<br />

wire cin.<br />

cin = false.<br />

(cin, (a, b)) ; snd (zip 2) ; row (n, fadd) ; apr n ; ans at (0,0).<br />

}<br />

(0,0)<br />

Figure 3.11: A simple placed ripple adder<br />

fadd fadd fadd fadd<br />

Figure 3.12: The ripple adder laid out on a grid for n = 4<br />

(8,1)

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

Saved successfully!

Ooh no, something went wrong!