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 82<br />

SB ′ :: BlockEnv → Block → (SizeFunc × SizeFunc)<br />

SB ′ β block bid d1 . . . dn ∼ r attributes { height = h. width = w. } { τ1 id1 . . . τp idp.<br />

stmts } =<br />

let m = S ′ βstmts in<br />

(λd1 . . .dn r. let (id1, . . . , idp) = (ι(id1, . . .,idp). m) in w,<br />

λd1 . . . dn r. let (id1, . . . , idp) = (ι(id1, . . . , idp). m) in h)<br />

Figure 4.9: Converting Quartz size expressions into Quartz<strong>Layout</strong> size functions<br />

automatic. Figure 4.8 gives the definition <strong>of</strong> the function Bβ which gives the semantics <strong>of</strong> a<br />

block as a logical predicate. This function gives Quartz a formal semantics in HOL, using an<br />

environment β which maps block identifiers to their definitions.<br />

The function in Figure 4.8 is implemented in the Quartz compiler layout processing module.<br />

The only difference between the formal definition and the compiler implementation is that the<br />

function B ′ β is not executed, instead the modelling <strong>of</strong> block instantiation <strong>with</strong>in Quartz<strong>Layout</strong><br />

(Section 4.4.2) is used. For example, the semantics <strong>of</strong> the map n R combinator, as generated<br />

by the compiler, are described by:<br />

λ(n, R)io. ∀j. (0 ≤ j ∧ j ≤ n − 1) −→ B ′ βR(i[j], o[j])<br />

In Isabelle’s ASCII syntax this is written as (note that “o” has been replaced <strong>with</strong> “o ” since<br />

“o” is a reserved keyword in Isabelle/HOL):<br />

% (n, R) i o . ALL (j::int). ((0

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

Saved successfully!

Ooh no, something went wrong!