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

}<br />

(s, control) ; compactor clk bits n ; s2 at (0,0).<br />

block filter core (int n, int bits) (wire clk) (wire newval[bits ], wire s[n][ bits ]) ∼<br />

(‘t s2[n][ bits ], ‘t median[bits]) →<br />

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

below ( nextstate clk bits n , insert median bits n) ;<br />

snd pi2.<br />

/∗∗ Median filter, ”n” + 1 size window for ”bits” bit values.<br />

@input n Window size<br />

@input bits Number <strong>of</strong> bits in data values<br />

@input clk Clock signal<br />

@input newval Current input value<br />

@output median Current output (median) value<br />

∗/<br />

block filter (int n, int bits) (wire clk) (‘t newval) ∼ (‘t median)<br />

→ loop ( filter core (n, bits) clk).<br />

D.1.2 Theory max2<br />

theory max2 = mux + comp_lut:<br />

section {* Function definitions *}<br />

consts<br />

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

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

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

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

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

defs<br />

struct_def: "struct == % bits (a, b) c. EX (a_geq_b::(wire)vector). (a_geq_b =<br />

bool2wire True) & (ALL (j::int). ((0

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

Saved successfully!

Ooh no, something went wrong!