An Automatic Functional Stress Pattern Generation Technique Suitable for SoC Reliability Characterization