On-chip generation of sine-wave signals for low cost functional test