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 D. CIRCUIT LAYOUT CASE STUDIES 280<br />

apply (auto intro: sum_ge0 maxf_ge0 sum_ge0_frange maxf_ge0_frange sum_nsub1_plusf<br />

maxf_encloses apr.height_ge0 apr.width_ge0 max2.height_ge0 max2.width_ge0 min2.<br />

height_ge0 min2.width_ge0 fork.height_ge0 fork.width_ge0 row.height_ge0 row.<br />

width_ge0)<br />

done<br />

end<br />

D.1.6 Theory lct cell<br />

theory lct_cell = or2 + eq:<br />

section {* Function definitions *}<br />

consts<br />

struct:: "int=>((wire*(wire)vector)*(wire)vector)=>(wire*(wire*(wire)vector))=><br />

bool"<br />

height:: "int=>((wire*(wire)vector)*(wire)vector)=>(wire*(wire*(wire)vector))=><br />

int"<br />

width:: "int=>((wire*(wire)vector)*(wire)vector)=>(wire*(wire*(wire)vector))=>int<br />

"<br />

lct_cell:: "(int=>((wire*(wire)vector)*(wire)vector)=>(wire*(wire*(wire)vector))<br />

=>bool, int=>((wire*(wire)vector)*(wire)vector)=>(wire*(wire*(wire)vector))=><br />

int)block"<br />

defs<br />

struct_def: "struct == % bits ((f, a), s) (d, (f2, a2)). EX (a_eq_s::wire). (a2 =<br />

a) & (d = f) & Def ((a, s) ;;; eq $ bits ;;; a_eq_s) & Def ((a_eq_s, f) ;;;<br />

or2 ;;; f2)"<br />

height_def: "height == % bits ((f, a), s) (d, (f2, a2)). let a_eq_s = (THE (<br />

a_eq_s::wire). (a2 = a) & (d = f) & Def ((a, s) ;;; eq $ bits ;;; a_eq_s) &<br />

Def ((a_eq_s, f) ;;; or2 ;;; f2)) in max (Height ((a_eq_s, f) ;;; or2 ;;; f2)<br />

) ((max ((Height ((a_eq_s, f) ;;; or2 ;;; f2)) + (Height ((a, s) ;;; eq $<br />

bits ;;; a_eq_s))) 0))"<br />

width_def: "width == % bits ((f, a), s) (d, (f2, a2)). let a_eq_s = (THE (a_eq_s<br />

::wire). (a2 = a) & (d = f) & Def ((a, s) ;;; eq $ bits ;;; a_eq_s) & Def ((<br />

a_eq_s, f) ;;; or2 ;;; f2)) in max (Width ((a_eq_s, f) ;;; or2 ;;; f2)) ((max<br />

(Width ((a, s) ;;; eq $ bits ;;; a_eq_s)) 0))"<br />

lct_cell_def: "lct_cell == (| Def = struct, Height = height, Width = width |)"<br />

declare width_def [simp]<br />

declare height_def [simp]<br />

declare struct_def [simp]<br />

section {* Validity <strong>of</strong> width and height functions *}<br />

theorem height_ge0_int : "!! (bits::int) (f::wire) (a::(wire)vector) (s::(wire)vector<br />

) (d::wire) (f2::wire) (a2::(wire)vector). 0

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

Saved successfully!

Ooh no, something went wrong!