A pattern matching unit includes a selection unit to divide an input datum
and one or more reference templates into input bit-fields corresponding
reference bit-fields, respectively. The number of bits in the input and
reference bit-fields is programmable. A distance unit is also included to
determine one or more distance measures between the input bit-fields and
the corresponding reference bit-fields. The distance measures associated
with reference bit-fields are combined into one or more net distance
measures corresponding to the one or more reference templates.