Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ... Verification of Parameterised FPGA Circuit Descriptions with Layout ...

24.04.2013 Views

CHAPTER 6. LAYOUT CASE STUDIES 138 new value delays insert previous state locater compactor next state midelem median value Figure 6.5: Block diagram for the median filter simply insert a value into the correct position in an already sorted list. 6.3.1 Circuit Design Our design is loosely based on a state-machine based design previously described in Ruby [26], however our realisation differs substantially and, we would suggest, is made much simpler by using the full features of Quartz rather than basic Ruby relations 2 . Figure 6.5 shows the basic architecture of our filter, with several blocks that operate on a current state and produce a next state. This is essentially the state transition and output logic of a state machine and this circuit can be composed with appropriate registers using the loop combinator. The two inputs to this filter core are the previous state (a set of sorted values) and a single new value. This new value is inserted into the sorted list by the insert block which implements one stage of an insertion sort. If the state contains n elements then the output of the insert block contains n + 1 elements, one of which (the oldest) must now be removed. As well as being connected to the insert block the new value is also fed into an n-element shift register, which is used to determine the value to remove to make the new state. The locater carries this out, matching the value from n cycles ago with the values in the state until the first match is found. The locater is composed of a row of lct cells, which are shown in Figure 6.6(a). These cells 2 The Ruby design was however refined into a bit-level version, while we will concentrate on the word-level circuit.

CHAPTER 6. LAYOUT CASE STUDIES 139 s a a2 f eq or2 d f2 (a) lct cell (b) del cell in through mode (c) del cell in compact mode Figure 6.6: Cells making up various filter blocks output an array of boolean values (d) which control the operation of the compactor block. The value a is the value the locater is “looking for”, s is one of the elements in the state, f is a boolean indicating whether the value has been located yet. Each lct cell compares its state value with the a value and outputs d and f2 values which control the compactor. The compactor is made up of a row of cells which use multiplexers controlled by the d output of the corresponding lct cell. This mode signal configures the dell cell block into one of two configurations: through mode (Figure 6.6(b)) and compact mode (Figure 6.6(c)). The locater configures all compactor cells to the right of the first detected match to the correct value (the same value could be within the current state multiple times) into through mode. This has the effect of routing the detected value to the right, while the other values are routed straight through. The value that appears on the rightmost output of the compactor is discarded. The compactor outputs the correct n elements of the next state. The midelem block is a simple wiring block which outputs the median value by extracting the middle value from the sorted list. 6.3.2 Layout We arrange the insert, locater and compactor blocks vertically roughly as shown in Figure 6.5. lct cell is formed from an equality checker, composed of a column of and3 gates on top of an or2 gate. del cell is implemented by two multiplexers arranged in adjacent columns. The insert insertion-sort block is built from a row of min2 and max2 sorters, with each bit implemented as a comparator function unit and another function unit operating as a

CHAPTER 6. LAYOUT CASE STUDIES 139<br />

s<br />

a a2<br />

f<br />

eq<br />

or2<br />

d<br />

f2<br />

(a) lct cell (b) del cell in<br />

through mode<br />

(c) del cell in<br />

compact mode<br />

Figure 6.6: Cells making up various filter blocks<br />

output an array <strong>of</strong> boolean values (d) which control the operation <strong>of</strong> the compactor block.<br />

The value a is the value the locater is “looking for”, s is one <strong>of</strong> the elements in the state, f<br />

is a boolean indicating whether the value has been located yet. Each lct cell compares its<br />

state value <strong>with</strong> the a value and outputs d and f2 values which control the compactor.<br />

The compactor is made up <strong>of</strong> a row <strong>of</strong> cells which use multiplexers controlled by the d output<br />

<strong>of</strong> the corresponding lct cell. This mode signal configures the dell cell block into one <strong>of</strong> two<br />

configurations: through mode (Figure 6.6(b)) and compact mode (Figure 6.6(c)).<br />

The locater configures all compactor cells to the right <strong>of</strong> the first detected match to the<br />

correct value (the same value could be <strong>with</strong>in the current state multiple times) into through<br />

mode. This has the effect <strong>of</strong> routing the detected value to the right, while the other values are<br />

routed straight through. The value that appears on the rightmost output <strong>of</strong> the compactor<br />

is discarded. The compactor outputs the correct n elements <strong>of</strong> the next state.<br />

The midelem block is a simple wiring block which outputs the median value by extracting<br />

the middle value from the sorted list.<br />

6.3.2 <strong>Layout</strong><br />

We arrange the insert, locater and compactor blocks vertically roughly as shown in Figure 6.5.<br />

lct cell is formed from an equality checker, composed <strong>of</strong> a column <strong>of</strong> and3 gates on top <strong>of</strong><br />

an or2 gate. del cell is implemented by two multiplexers arranged in adjacent columns.<br />

The insert insertion-sort block is built from a row <strong>of</strong> min2 and max2 sorters, <strong>with</strong> each<br />

bit implemented as a comparator function unit and another function unit operating as a

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

Saved successfully!

Ooh no, something went wrong!