Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "String Recognition Simple case: recognize 1101 “ ” 0 “1” 0 “11” 0 Reset 1 “110” 0 101 “1101” 1 1 1 0 0 0 0."— Presentation transcript:

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

2 String Recognition General rules: 1.Create string matching tree 2.State output = 1 if a “pattern” is contained along the path 3.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 1.Create string matching tree 2.State output = 1 if a “pattern” is contained along the path 3.Add failure edges: find longest “suffix” of string seen so far and transition to the corresponding “prefix” state “ ” 0 “1” 0 “11” 0 Reset “110” 0 “1101” 1 “10” 0 “101” 1 “1011” 1 1101 0 11

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

5 String Recognition using Shift Registers Example: 1111, 1011, 101 1.Use N bit shift register if longest pattern has N bits 2.Create an AND gate for pattern 3.OR together AND gates 4.Caveat: result is invalid for the first N cycles S3S3 FF S2S2 S1S1 S0S0 INPUT OUTPUT


Download ppt "String Recognition Simple case: recognize 1101 “ ” 0 “1” 0 “11” 0 Reset 1 “110” 0 101 “1101” 1 1 1 0 0 0 0."

Similar presentations


Ads by Google