A Novel Algorithm and Architecture for High Speed Pattern Matching in Resource-Limited Silicon Solution