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 3. GENERATING PARAMETERISED LIBRARIES WITH LAYOUT 46<br />

block beside (block R (‘a, ‘b) ∼ (‘d, ‘x), block S (‘x, ‘c) ∼ (‘e, ‘f))<br />

(‘a a, (‘b b, ‘c c)) ∼ ((‘d d, ‘e e), ‘f f)<br />

attributes {<br />

width = width((a,b) ;R ;(d, is )) + width((is, c) ; S ; (e, f)).<br />

height = max (height ((a, b) ;R ;(d, is )), height((is, c) ; S ; (e, f))).<br />

}<br />

{<br />

‘x is.<br />

(a, b) ; R ; (d, is) at (0,0).<br />

(is , c) ; S ; (e, f) at (width((a, b) ; R ; (d, is )), 0).<br />

}<br />

Figure 3.7: A placed interpretation <strong>of</strong> the Quartz beside combinator<br />

non-optimal) static approximation to this value.<br />

The function is defined recursively over the structure <strong>of</strong> statements, <strong>with</strong> three basic cases.<br />

Assignments and assertions are given size expressions (0,0) since they are assumed to take<br />

up no space. Block instantiations have size expressions that are the size <strong>of</strong> the instantiation<br />

itself added to its x and y placed position. Conditional generation statements produce a<br />

conditional expression. Iteration statements are the most interesting construct, here the<br />

maxf function is used to select the maximum size values as the loop variable varies between<br />

its lower and upper limit. If the loop upper bound is less than its lower bound (e2 < e1 in<br />

Figure 3.6) then the loop never executes and this is reflected in the semantics for maxf which<br />

returns zero in these circumstances.<br />

3.5 <strong>Parameterised</strong> Quartz <strong>with</strong> Placement<br />

These concepts can be brought together to write Quartz code <strong>with</strong> relative placement using<br />

explicit co-ordinates.<br />

3.5.1 Laid-out Combinators<br />

In Figure 3.7 a version <strong>of</strong> the R↔S (beside) combinator which has been laid out <strong>with</strong> relative<br />

positioning is illustrated. The block R is placed at the origin and the block S is beside it<br />

<strong>with</strong> a y-<strong>of</strong>fset <strong>of</strong> zero and an x-<strong>of</strong>fset <strong>of</strong> the width <strong>of</strong> the R block.

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

Saved successfully!

Ooh no, something went wrong!