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.

CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 87<br />

is handled by checking the statements against themselves <strong>with</strong> a new identifier substituted<br />

for the loop variable. Intersection is only permitted if the two loop variables are the same and<br />

thus describing one iteration <strong>of</strong> the loop, which will obviously intersect totally <strong>with</strong> itself.<br />

The intersection theorem generated for map illustrates this, containing only the case checking<br />

that loop iterations do not overlap:<br />

theorem "Î(n::int) (R::((’t395⇒ ’t396⇒ bool,’t395⇒ ’t396⇒ int)block)) (i::(’t395)vector) (o<br />

::(’t396)vector). ∀ (j::int). ((0 ≤ j) ∧ (j ≤ (n − 1))) −→ Def (i ;;; R ;;; o ) ; ∀ (<br />

qs691::’t395) (qs692::’t396). 0 ≤ (Height (qs691 ;;; R ;;; qs692)) ; ∀ (qs691 ::’ t395) (qs692<br />

::’ t396). 0 ≤ (Width (qs691 ;;; R ;;; qs692)) =⇒<br />

∀ (j :: int) (j ’:: int). ((0 ≤ j) ∧ (j ≤ (n − 1)) ∧ (0 ≤ j’) ∧ (j’ ≤ (n − 1)) ∧ (j’ = j)) −→<br />

(((0 + (Width (i ;;; R ;;; o ))) ≤ 0) | ((0 + (Width (i ;;; R ;;; o ))) ≤<br />

0) | ((sum (0, j’ − 1, λ qs403. Height (i ;;; R ;;; o )) + (Height (i ;;; R ;;; o ))) ≤ sum (0, j − 1, λqs403. Height (i ;;; R ;;; o )))<br />

| ((sum (0, j − 1, λqs403. Height (i ;;; R ;;; o )) + (Height (i ;;;<br />

R ;;; o ))) ≤ sum (0, j’ − 1, λqs403. Height (i ;;; R ;;; o ))))"<br />

It is important to note that the algorithms given in Figure 4.10 and Figure 4.11 are pseudo-<br />

code and the implementation in the Quartz compiler differs slightly. For example, the com-<br />

piler carries out a large number <strong>of</strong> optimisations to eliminate unnecessary goals that are<br />

defined as being true. In addition, rather than generating one large intersection theorem<br />

the compiler splits it on a statement by statement basis into multiple theorems to make the<br />

individual pro<strong>of</strong>s a little simpler.<br />

While containment and intersection theorems are not used elsewhere, the validity theorems<br />

<strong>of</strong>ten are. It is therefore <strong>of</strong>ten useful to “prune” the assumption sets <strong>of</strong> these theorems to<br />

remove assumptions that are not necessary for the pro<strong>of</strong>. When these theorems are used in<br />

other pro<strong>of</strong>s the assumptions will themselves become pro<strong>of</strong> goals and pro<strong>of</strong>s can be simplified<br />

if the number <strong>of</strong> assumptions is minimised.

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

Saved successfully!

Ooh no, something went wrong!