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

lengths (save on the interface points). This kind <strong>of</strong> structure can be realised by a recursive<br />

combinator which alternates between a horizontal and vertical layout for each sub-tree. A<br />

Quartz description <strong>of</strong> this combinator can be seen in Figure 4.19. Functionally this combi-<br />

nator is identical to a standard binary-tree arrangement, although the layout description is<br />

quite complicated.<br />

The verification <strong>of</strong> this kind <strong>of</strong> combinator is especially important, as we saw <strong>with</strong> the irreg-<br />

ular grid example, since the complex layout is relatively more likely to contain errors. The<br />

semantic definition, height and width functions for this block are recursive and defined using<br />

Isabelle primrec constructs. The use <strong>of</strong> multiple internal signals requires special handling.<br />

We have used tuples <strong>of</strong> internal signals to bind them in a single predicate, however Isabelle’s<br />

handling <strong>of</strong> tuples does not allow these to be split easily, so it is better to re-define the internal<br />

signals individually binding them <strong>with</strong> identical copies <strong>of</strong> the predicate, where other signals<br />

are existentially quantified <strong>with</strong>in it. This leads to definitions that are long and contain a<br />

great deal <strong>of</strong> redundancy but makes pro<strong>of</strong>s substantially easier and since the pro<strong>of</strong> tool is<br />

designed to handle large definitions and pro<strong>of</strong> scripts easily this is a trade-<strong>of</strong>f worth making.<br />

Validity theorems are proved by induction on n and then use <strong>of</strong> the auto method. Contain-<br />

ment theorems require a combination <strong>of</strong> auto <strong>with</strong> some primitive deduction. Intersection is<br />

proved automatically <strong>with</strong> the expansion <strong>of</strong> the definition <strong>of</strong> the half block.<br />

4.7.4 Surround<br />

In Section 3.6 we introduced the surround combinator which describes a square block sur-<br />

rounded by interface elements. Figure 4.20 illustrates the generic instantiation <strong>of</strong> this com-<br />

binator <strong>with</strong> an A block surrounded by B, C, D and E interface elements. It is important<br />

to note that this combinator is general and could describe situations where the interface<br />

elements are the same, or absent (replaced by the identity block).<br />

The Quartz description for this block given in Figure 3.14 (Page 3.14) is similarly general.<br />

It must describe a correct layout for situations where the sizes <strong>of</strong> the blocks <strong>with</strong>in the<br />

combinator vary arbitrarily. In fact, during the verification <strong>of</strong> this combinator we discovered<br />

an error in the block placement which would probably have otherwise remained undiscovered.

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

Saved successfully!

Ooh no, something went wrong!