Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ... Verification of Parameterised FPGA Circuit Descriptions with Layout ...

24.04.2013 Views

APPENDIX D. CIRCUIT LAYOUT CASE STUDIES 290 theorem width_ge0: "!! (clk::wire) (bits::int) (n::int) (a::(wire)vector) (s::((wire) vector)vector) (s2::((wire)vector)vector) (d::bool). 0 ((0::int)

APPENDIX D. CIRCUIT LAYOUT CASE STUDIES 291 (rule allI)+, (case_tac "0 ((wire)vector*((wire)vector)vector)=>(((wire)vector) vector*(wire)vector)=>bool" height:: "(int*int)=>wire=>((wire)vector*((wire)vector)vector)=>(((wire)vector) vector*(wire)vector)=>int" width:: "(int*int)=>wire=>((wire)vector*((wire)vector)vector)=>(((wire)vector) vector*(wire)vector)=>int" filter_core:: "((int*int)=>wire=>((wire)vector*((wire)vector)vector)=>(((wire) vector)vector*(wire)vector)=>bool, (int*int)=>wire=>((wire)vector*((wire) vector)vector)=>(((wire)vector)vector*(wire)vector)=>int)block" defs struct_def: "struct == % (n, bits) clk (newval, s) (s2, median). Def ((newval, s) ;;; fst $ (fork ;; fst $ (rcomp $ (n, map $ (bits, fd $ clk)))) ;; below $ ( nextstate $ clk $ bits $ n, insert_median $ bits $ n) ;; snd $ (pi2) ;;; (s2, median))" height_def: "height == % (n, bits) clk (newval, s) (s2, median). Height ((newval, s) ;;; fst $ (fork ;; fst $ (rcomp $ (n, map $ (bits, fd $ clk)))) ;; below $ (nextstate $ clk $ bits $ n, insert_median $ bits $ n) ;; snd $ (pi2) ;;; ( s2, median))" width_def: "width == % (n, bits) clk (newval, s) (s2, median). Width ((newval, s) ;;; fst $ (fork ;; fst $ (rcomp $ (n, map $ (bits, fd $ clk)))) ;; below $ ( nextstate $ clk $ bits $ n, insert_median $ bits $ n) ;; snd $ (pi2) ;;; (s2, median))" filter_core_def: "filter_core == (| Def = struct, Height = height, Width = width |)" declare width_def [simp] declare height_def [simp] declare struct_def [simp] section {* Validity of width and height functions *} theorem height_ge0_int : "!! (n::int) (bits::int) (clk::wire) (newval::(wire)vector) (s::((wire)vector)vector) (s2::((wire)vector)vector) (median::(wire)vector). 0

APPENDIX D. CIRCUIT LAYOUT CASE STUDIES 291<br />

(rule allI)+,<br />

(case_tac "0 ((wire)vector*((wire)vector)vector)=>(((wire)vector)<br />

vector*(wire)vector)=>bool"<br />

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

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

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

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

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

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

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

defs<br />

struct_def: "struct == % (n, bits) clk (newval, s) (s2, median). Def ((newval, s)<br />

;;; fst $ (fork ;; fst $ (rcomp $ (n, map $ (bits, fd $ clk)))) ;; below $ (<br />

nextstate $ clk $ bits $ n, insert_median $ bits $ n) ;; snd $ (pi2) ;;; (s2,<br />

median))"<br />

height_def: "height == % (n, bits) clk (newval, s) (s2, median). Height ((newval,<br />

s) ;;; fst $ (fork ;; fst $ (rcomp $ (n, map $ (bits, fd $ clk)))) ;; below<br />

$ (nextstate $ clk $ bits $ n, insert_median $ bits $ n) ;; snd $ (pi2) ;;; (<br />

s2, median))"<br />

width_def: "width == % (n, bits) clk (newval, s) (s2, median). Width ((newval, s)<br />

;;; fst $ (fork ;; fst $ (rcomp $ (n, map $ (bits, fd $ clk)))) ;; below $ (<br />

nextstate $ clk $ bits $ n, insert_median $ bits $ n) ;; snd $ (pi2) ;;; (s2,<br />

median))"<br />

filter_core_def: "filter_core == (| Def = struct, Height = height, Width = width<br />

|)"<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 : "!! (n::int) (bits::int) (clk::wire) (newval::(wire)vector)<br />

(s::((wire)vector)vector) (s2::((wire)vector)vector) (median::(wire)vector). 0

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

Saved successfully!

Ooh no, something went wrong!