A Simple Self-Timed Implementation of A Priority Queue For Dictionary Search Problems
A Simple Self-Timed Implementation of A Priority Queue For Dictionary Search Problems
A Simple Self-Timed Implementation of A Priority Queue For Dictionary Search Problems
I. INTRODUCTION
equence comparison hardware implementations for
applications including dictionary or genetic database
searches are based on quantifying the similarity between a
source string (or sub-string) against a target string (or substring). One of the compared strings can be infinitely long, e.g.
a database. In previous work [1], a superscalar Cellular
Automaton Processor (CAP) implementation was described,
based on Motomuras building block [2], for high performance
sub-string alignment. The output of this machine was a
temporally sparse set of integer pairs, the first number
representing the location of the alignment or the matched substring, and the second representing the significance score. It is
of high interest in such an application to efficiently collect the
most significant outputs, and report through a priority queue.
A. Requirements
The desirable features of the priority queue can be
summarized as follows for the described application area:
1) Simple, compact design: The priority queue typically
services other processors with demanding hardware costs.
Regardless of if the final solution is implemented on a
fully custom chip, or a Field Programmable Gate Array
(FPGA), it needs to have minimal size and low complexity
by taking advantage of the fact that the sorted integers are
unsigned, and have a relatively narrow range of interest. It
is worthwhile to note some similarity scoring schemes
c
978-1-4244-3523-4/09/$25.002009
IEEE
34
RI
RO
transmitter
AO
Transmitter:
Receiver:
^
^
RO
receiver
AI
AO
AI
RO (Request-Out)
AI (Acknowledge-In)
RI (Request-In)
AO (Acknowledge-Out)
...
en
en
en
...
Handshake
PEs
en
Data
Array
Data to be
inserted
=?
en
=?
en
...
=?
...
en
Wired-OR / OR
Comparison
Logic
=?
Valid data
indicator
en
35
Handshake
PEs
Handshake
PEs
ack
readout
Data
Array
readout
=0
Data
Array
=?
=?
=?
=?
Handshake
PEs
readout
=0
Data
Array
Comparison
Logic
5
=?
=?
=?
=?
sortreq#
=0
Fig. 4 Insertion sort for the first occurrence of a key
36
Valid data
indicator
Comparison
Logic
Valid data
indicator
sortreq#
=0
1
drop-one
Wired-OR / OR
Fig. 5a Insertion sort for the repeated key occurrence 1st phase
req
0
req
req
1
Handshake
PEs
ack
readout
=0
Data
Array
=?
=?
=?
=?
5
Comparison
Logic
Valid data
indicator
sortreq#
=0
Wired-OR / OR
Fig. 5b Insertion sort for the repeated key occurrence 2nd phase
Handshake
PEs
readout
Data
Array
Valid data
indicator
1
ack
readout
=1
req
req
req
0
1
ack
Handshake
PEs
Data
Array
B. Prototype Validation
The simulation of Fig. 8 has been replicated on the
functional validation prototype as depicted in Fig. 9(a-h). Only
the highest priority eight entries in the data array are shown on
the 7-Segment displays. The bottom middle LED(s), lighting
up one by one in Figures 9c-e, represent rightmost eight data
valid indicators. The bottom right LEDs, lighting up in Fig. 9f,
are connected to the reqoutr signals in the simulation, and
show the position of the PE flags at the rightmost end of the
priority queue. The results match the simulations, and
successfully demonstrate the correct functionality of the
platform.
Another test run depicted in Fig. 10 on the same prototype
board show eight numbers entered into the same queue size of
16. The left hand picture shows the queue status after the
number sequence has been entered in the random order 2, C, 8,
F, 5, 8, 3, 5, followed by setting readout=1. The picture on the
right shows the status of the queue after three highest priority
numbers have been read out by asserting the ackir_b signal
three times.
IV. CONCLUSION
An original and simple self-timed priority queue
implementation based on insertion sort has been designed, and
implemented using VHDL on a FPGA prototype. The size of
the priority queue is fully scalable through few global
variables. Validation results, a subset of which has been
included into this report, have demonstrated correct operation.
The design meets the requirements of the dictionary search
applications at a minimum hardware cost.
37
Fig. 9g Data array and PE flags (reqoutr) after the first right acknowledge
Fig. 9h Data array and valid indicators after the last right acknowledge
Fig. 10 Data queue and PE flags after entering 8 decimal numbers, sorting
(left), and reading out 3 highest priority numbers from the queue (right)
ACKNOWLEDGMENT
Fig. 9e Second occurrence of number 10 entered
38
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
39