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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPENDIX C. PLACED COMBINATOR LIBRARIES 217<br />

rule impdisj_34<strong>of</strong>4,<br />

rule loop_sum_overlap2,<br />

(simp add: overlap0’’)+) |<br />

auto intro: sum_ge0 maxf_ge0 sum_nsub1_plusf maxf_encloses)<br />

done<br />

end<br />

C.1.6 (tri)<br />

/∗∗ Triangle. Ruby /\. Place a triangle <strong>of</strong> R blocks between the n−element<br />

vectors i and o. Tri is an increasing triangle , irt is decreasing ∗/<br />

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

attributes {<br />

height = if (n 1) {<br />

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

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

} .<br />

} .<br />

}<br />

theory tri = rcomp:<br />

section {* Function definitions *}<br />

consts<br />

struct:: "(int*((’t415=>’t415=>bool,’t415=>’t415=>int)block))=>(’t415)vector=>(’<br />

t415)vector=>bool"<br />

height:: "(int*((’t415=>’t415=>bool,’t415=>’t415=>int)block))=>(’t415)vector=>(’<br />

t415)vector=>int"<br />

width:: "(int*((’t415=>’t415=>bool,’t415=>’t415=>int)block))=>(’t415)vector=>(’<br />

t415)vector=>int"<br />

tri:: "((int*((’t415=>’t415=>bool,’t415=>’t415=>int)block))=>(’t415)vector=>(’<br />

t415)vector=>bool, (int*((’t415=>’t415=>bool,’t415=>’t415=>int)block))=>(’<br />

t415)vector=>(’t415)vector=>int)block"<br />

defs<br />

struct_def: "struct == % (n, R) i o_. (n >= 0) & (o_ = i) & (if n > 1 then<br />

ALL (j::int). ((1

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

Saved successfully!

Ooh no, something went wrong!