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

block map (int n, block R ‘a ∼ ‘b) (‘a i[n]) ∼ (‘b o[n])<br />

attributes {<br />

width = width(i[0] ;R ; o[0]) .<br />

height = height(i[0] ; R ; o[0]) ∗ n.<br />

} {<br />

int j.<br />

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

i [j] ; R ; o[j] at (0, height(i[0] ; R ; o[0]) ∗ j).<br />

} .<br />

}<br />

(0, 3 * height R)<br />

(0, 2 * height R)<br />

(0, 1 * height R)<br />

(0, 0)<br />

Figure 3.8: The Quartz map n R combinator <strong>with</strong> naive layout information<br />

R<br />

R<br />

R<br />

R<br />

(a) Naive layout<br />

(width R, 4 * height R)<br />

(0, 3 * height R)<br />

(0, 2 * height R)<br />

(0, 1 * height R)<br />

(0, 0)<br />

R<br />

R<br />

R<br />

R<br />

(width R, 4 * height R)<br />

(b) Failure <strong>of</strong> naive layout<br />

(0, height i[0];R;o[0] +<br />

height i[1];R;o[1] +<br />

height i[2];R;o[2])<br />

(0, height i[0];R;o[0] +<br />

height i[1];R;o[1])<br />

(0, height i[0];R;o[0])<br />

Figure 3.9: Different layouts for map n R<br />

block map (int n, block R ‘a ∼ ‘b) (‘a i[n]) ∼ (‘b o[n])<br />

attributes {<br />

width = maxf(k=0..n−1, width (i[k] ;R ;o[k])).<br />

height = sum(k=0..n−1, height (i[k] ;R ;o[k])).<br />

} {<br />

int j.<br />

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

i [j] ; R ; o[j] at (0, sum(k=0..j−1,height(i[k] ;R ; o[k]))) .<br />

} .<br />

}<br />

(0, 0)<br />

R<br />

R<br />

R<br />

R<br />

(c) General layout<br />

(max width R,<br />

sum(j=0..3, height i[j];R;o[j])<br />

Figure 3.10: The Quartz map n R combinator <strong>with</strong> general layout information

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

Saved successfully!

Ooh no, something went wrong!