Design methodology to characterize and compensate for process and temperature variation in digital systems