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

The standard block definition has been augmented <strong>with</strong> an set <strong>of</strong> attributes giving height<br />

and width expressions for the block. The width <strong>of</strong> the combinator is described as the sum<br />

<strong>of</strong> the widths <strong>of</strong> the R and S blocks, while the height is the maximum <strong>of</strong> the heights <strong>of</strong> the<br />

R and S blocks. These manually specified size expressions are the same as those that would<br />

have been returned by the inference algorithm SBσ β, simplified <strong>with</strong> the trivial relationship<br />

x + 0 = x.<br />

This laid-out beside combinator can now be used to position blocks relative to each other in<br />

a larger circuit, <strong>with</strong> the added advantage that it can also describe the inter-connection <strong>of</strong><br />

the blocks. This allows the significant problem <strong>of</strong> writing correct explicit layouts to be split<br />

into simpler and more manageable modules: in the instantiation beside(R, S) the internal<br />

arrangement <strong>of</strong> the combinator can be ignored and only the size <strong>of</strong> the entire beside block<br />

needs to be known.<br />

3.5.2 Naive vs General Placement<br />

Figure 3.8 shows a description <strong>of</strong> the Quartz map n R combinator which applies a block to each<br />

element <strong>of</strong> a vector. The block’s function is described using a single loop which instantiates<br />

multiple R blocks, each <strong>of</strong> which is explicitly placed at a set <strong>of</strong> co-ordinates.<br />

The layout produced by this description for n = 4 is shown in Figure 3.9(a). At first glance<br />

this layout appears to be correct: the grey bounding box shows the overall height <strong>of</strong> the map<br />

block specified as a multiple <strong>of</strong> n times the height <strong>of</strong> the R block and the width is the same<br />

as the width <strong>of</strong> R, while each block is placed <strong>with</strong> an x-<strong>of</strong>fset <strong>of</strong> zero and a y-<strong>of</strong>fset calculated<br />

from the number <strong>of</strong> R blocks below it. This layout is in many cases correct, however it<br />

relies on a key assumption: that the size <strong>of</strong> R is the same for all iterations across the vector.<br />

The vector is polymorphic and could be a tuple containing variables which effect the size <strong>of</strong><br />

each R instance yet this would not be reflected in the layout generated by this naive map<br />

implementation. Figure 3.9(b) illustrates the same map block implementation for a situation<br />

where the R instances do not all have the same size: block placement is incorrect - leaving<br />

empty space between blocks or causing them to overlap - and the overall size <strong>of</strong> the whole<br />

block is also too small since two R instances lie outside the bounding box.

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

Saved successfully!

Ooh no, something went wrong!