1 / 5

String Recognition

String Recognition. Simple case: recognize 1101. 0. 0. “ ” 0. “1” 0. “11” 0. “110” 0. “1101” 1. 1. 1. 0. 1. Reset. 0. 1. 0. 1. String Recognition. General rules: Create string matching tree State output = 1 if a “pattern” is contained along the path

abra-weaver
Download Presentation

String Recognition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. String Recognition • Simple case: recognize 1101 0 0 “ ” 0 “1” 0 “11” 0 “110” 0 “1101” 1 1 1 0 1 Reset 0 1 0 1

  2. String Recognition • General rules: • Create string matching tree • State output = 1 if a “pattern” is contained along the path • Add failure edges: find longest “suffix” of string seen so far and transition to the corresponding “prefix” state

  3. String Recognition • Example: 1101, 1011, 101 • Create string matching tree • State output = 1 if a “pattern” is contained along the path • Add failure edges: find longest “suffix” of string seen so far and transition to the corresponding “prefix” state “ ” 0 “1” 0 “11” 0 “110” 0 “1101” 1 1 1 0 1 Reset 0 “10” 0 “101” 1 “1011” 1 1 1

  4. String Recognition • Example: 1101, 1011, 101 • Create string matching tree • State output = 1 if a “pattern” is contained along the path • Add failure edges: find longest “suffix” of string seen so far and transition to the corresponding “prefix” state 0 1 0 “ ” 0 “1” 0 “11” 0 “110” 0 “1101” 1 1 1 0 1 Reset 0 0 0 1 “10” 0 “101” 1 “1011” 1 1 1 0 0 1

  5. String Recognition using Shift Registers • Example: 1111, 1011, 101 • Use N bit shift register if longest pattern has N bits • Create an AND gate for pattern • OR together AND gates • Caveat: result is invalid for the first N cycles S3 S2 S1 S0 FF FF FF FF INPUT OUTPUT

More Related