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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 75<br />

constdefs<br />

ser :: " [(’ a⇒ ’b⇒ bool,’a⇒ ’b⇒ int)block,(’b⇒ ’c⇒ bool,’b⇒ ’c⇒ int)block]<br />

⇒ (’a⇒ ’c⇒ bool, ’a⇒ ’c⇒ int)block" (infixl ";;" 48)<br />

"ser ≡ (λ B1 B2. (| Def = λx y. ∃ s. (Def B1) x s ∧ (Def B2) s y,<br />

Height = λx y. let s = (THE s. (Def B1) x s ∧ (Def B2) s y) in<br />

max (Height B1 x s) (Height B2 s y),<br />

Width = λx y. let s = (THE s. (Def B1) x s ∧ (Def B2) s y) in<br />

(Width B1 x s) + (Width B2 s y)|))"<br />

Figure 4.5: Part <strong>of</strong> the Quartz<strong>Layout</strong> theory <strong>of</strong> series composition<br />

operation is identified by triple semi-colons in HOL. This eases the job <strong>of</strong> parsing Quart-<br />

z<strong>Layout</strong> definitions and allows it to clearly distinguished from series compositions. A block<br />

instantiation in Quartz<strong>Layout</strong> is therefore represented by the string a ;;; bid $ p1 . . . $<br />

pn ;;; b. This is sufficiently similar to the Quartz syntax to be readable and yet sufficiently<br />

simplified to not require the development <strong>of</strong> AST-transforming ML functions for Isabelle.<br />

The contents <strong>of</strong> a block record are accessed using the functions Def, Height and Width, so<br />

Height (a ;;; bid $ p1 . . . $ pn ;;; b) will return an integer value corresponding to<br />

the height <strong>of</strong> that block instantiation. This is identical to the height() function <strong>of</strong> Quartz<br />

expressions and is used to model this operation.<br />

Block compositions are described in the SeriesComposition and ParallelComposition theories.<br />

Parallel composition is defined as an operation on nested pairs, mirroring the definition <strong>of</strong><br />

Cartesian products used to model Quartz tuples and is syntactically represented using double<br />

square brackets.<br />

Series composition is defined as a left-associative binary operator (identified by double semi-<br />

colons), as illustrated in Figure 4.5. The semantic definition <strong>of</strong> a series composition <strong>of</strong><br />

two blocks is defined <strong>with</strong> an explicit internal signal connecting them, while the definite<br />

description operator is used to parameterise the width and height functions <strong>of</strong> the two blocks<br />

by the correct value to determine the width and height <strong>of</strong> the composition.<br />

The definitions <strong>of</strong> series and parallel composition implement the SIσ β function defined on<br />

Page 43. Series compositions are laid out horizontally <strong>with</strong> the widths summed and the<br />

maximum height selected, while parallel compositions are laid out vertically <strong>with</strong> heights<br />

summed and the maximum width selected.

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

Saved successfully!

Ooh no, something went wrong!