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.

APPENDIX B. THEORETICAL BASIS FOR LAYOUT REASONING 194<br />

header {* Definition <strong>of</strong> Quartz parallel composition *}<br />

theory ParallelComposition = Block + IntAlgebra:<br />

consts<br />

Par :: "(’a=>’b=>bool, ’a=>’b=>int)block=>(’c=>’d=>bool,’c=>’d=>int)block=>((’a*’c<br />

)=>(’b*’d)=>bool, (’a*’c)=>(’b*’d)=>int)block"<br />

EmptyPar :: "unit=>unit" ("[[ ]]")<br />

section {* Syntax definitions *}<br />

nonterminals<br />

par_args parpatterns<br />

syntax<br />

"_par" :: "(’a=>’b=>bool,’a=>’b=>int)block => par_args => ((’a*’c)=>(’b*’d)=><br />

bool,(’a*’c)=>(’b*’d)=>int)block"<br />

("[[ _ , _ ]]")<br />

"_par_arg" :: "(’a=>’b=>bool,’a=>’b=>int)block => par_args" ("_")<br />

"_par_args" :: "(’c=>’d=>bool,’c=>’d=>int)block => par_args => par_args" ("_,/ _<br />

")<br />

"_parpattern" :: "[pttrn, parpatterns] => pttrn" ("’[[_,/ _’]]")<br />

"" :: "pttrn => parpatterns" ("_")<br />

"_parpatterns" :: "[pttrn, parpatterns] => parpatterns" ("_,/ _")<br />

translations<br />

"[[ x, y ]]" == "Par x y"<br />

"_par x (_par_args y z)" == "_par x (_par_arg (_par y z))"<br />

defs<br />

par_def: "Par A B == (| Def = % (d1, d2) (r1, r2). (Def A) d1 r1 & (Def B) d2 r2,<br />

Height = % (d1,d2) (r1, r2). (Height A) d1 r1 + (Height B) d2<br />

r2,<br />

Width = % (d1, d2) (r1, r2). max ((Width A) d1 r1) ((Width B)<br />

d2 r2) |)"<br />

section {* Expansion theorems *}<br />

theorem par2height: "Height (((a,b) ;;; [[ F, G ]] ;;; (c, d))) = (Height F) a c + (<br />

Height G) b d"<br />

by (simp add: par_def)<br />

theorem par2width: "Width ((a,b) ;;; [[ F , G ]] ;;; (c, d)) = max ((Width F) a c) ((<br />

Width G) b d)"<br />

by (simp add: par_def)<br />

section {* Properties <strong>of</strong> parallel composition *}<br />

theorem width_par_ge0: "!! P Q x y. [| !! x y. 0

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

Saved successfully!

Ooh no, something went wrong!