On-chip delay measurement for FPGAs