CS/COE 535

Acceleration of Algorithms in Reconfigurable Hardware

Lockwood, Fall 2003

Machine Problem 2

Bloom Filters for String Matching

 

Assigned

Monday, October 13th, 2003

Due Date

Monday, October 27th, 2003 by 4pm

Purpose:

Bloom filters as string matchers

Points

 (100 points)

Introduction

Bloom Filters

In Lecture 5 we learned about bloom filters and their uses for string/signature matching.  In this machine problem, we are going to implement a bloom filter to be used to do signature matching.  Bloom filters are very good at performing large membership queries very quickly.  Some important things of note about bloom filters include:

Hash Function

In Lecture 6 and Lecture 6b we learned about hashing techniques that can be implemented in hardware.  Since the bloom filter uses a hash function to set a bit vector, a simple hash function will also need to be implemented.  In this assignment we will compute 10 different hash functions.  By calculating 10 hash functions, the false positive probability becomes f = (1/2)^10 = 0.001.  The ith hash function is defined as:

In this machine problem, the set of {di1, di2, di3, ...., dib} is a set of random 12-bit values.  To put this equation in words, for each bit in a character string, if that bit is equal to '1', xor the random value associated with that bit with the current result.  For example, suppose you have to calculate a 3-bit hash value and you are given the follow parameters:

d = {"011", "100", "001", "011", "110"}  -- the random values

X = 01011  -- the input string

The resulting hash value will be 100 xor 011 xor 110 = 001   

Note that the only difference between the 10 hash functions will be the set of random values, d.

References

Directions:

Table 1: Symbol Key

Of Interest

Modify

Synthesizable

Table 2: New files in MP2_distribution.tar

MP2_Distribution/sim/ Simulation Folder

 

 

 

makefile

Example make file used to automate compilation and simulation.

 

 

 

mp2_wave.do

Wave list including top level of snort_app.vhd and cpp_rules_programmer.vhd

 

 

 

mp2_test.dat

Test data packets.

 

 

 

 

MP2_Distribution/backend/ Backend Folder

 

fifo_256_by_32.edn

Alert Generator specific fifo.

 

 

 

fifo_512_by_36.edn

Input Controller specific fifo.


 

MP2_Distribution/java/ Java Folder

 

BitSetter.java

Java Program to create Control Packets for setting bits in block ram.

 

 

MP2_Distribution/syn/ Synthesis Source Folder

 

Nothing yet, but you will add a snort_app.prj file.

MP2_Distribution/vhdl/ VHDL Source Folder

 

alert_generator.vhd

UDP Alert message generator

 

 

alert_generator_fsm.vhd

Packet generator control FSM

 

 

 

random_values.vhd

VHDL file with constant for calculating hash functions.

 

 

large_bloom_filter.vhd

Top level file for your bloom filter

 

fifo_256_by_32.vhd

Fifo Used by the alert generator

 

 

 

fifo_512_by_36.vhd

Fifo Used by the input controller

 

 

 

input_controller_fsm.vhd

FSM controlling input controller.

 

 

input_controller.vhd

Converts 32-bit words to byte stream.

 

 

options_processor.vhd

Wrapper around the Bloom Filter and Input Controller.

 

snort_app.vhd

Top Level Design Unit (modified)

 

Things to Turn In:

Bonus Opportunities:

Submission:

PAR Speed

 

Here is a checklist of the things you need to turn in: