Dynamic method for generating pseudo-random test patterns for testing the function of Hardware Designs