JHDL 0.3

| JHDL Doc Home Page | Examples Home Page | << | < | > | >>


Edit Distance


This is an example of how jhdl can be used to create a circuit to find the edit distance between a target and source string.

The edit distance is computed by comparing nucleotides of two DNA strings. When matches are found the two stings are considered closer, or in other words, they have a smaller edit distance.
The top level jhdl file for computing the edit distance is called edistance2.java. It creates the appropriate number of bit slices according to the number of characters in the target string, and compiles the characters into the hardware. A left edge slice is used to create the apporpriate start up signals and can be found in left_edge2.java. A modulo 4 counter uses a single bit out of the linear array to count up or down from the original count. Below is a schematic of how this might look.



Each bit slice is made up a single character comparator and a finite state machine for computing whether the counter should go up or down at that stage. The code for each bit slice is in char_slice2.java, char_fsm2.java, and charcomp2.java. Below is schematic of what this level of heirarchy might look like.


The mod4count2.java file contains the guts of the modulo 4 counter. It has a simple up-down counter built out of an add/sub unit. Below is a picture of what it looks like.

The code is for this example can be found here:

| JHDL Doc Home Page | Examples Home Page | << | < | > | >>

Copyright (c) 1998-2003 Brigham Young University. All rights reserved.
Reproduction in whole or in part in any form or medium without express permission of Brigham Young University is prohibited.