© 2018 IOP Publishing Ltd. High-precision phase detection is critical to the timing and synchronization system for particle accelerators. A live calibration signal is introduced to femtosecond-level phase detection in order to measure the relative phase jitter between a reference wave and a radio frequency (RF) signal, and compensate for the cable electrical length drift due to the thermal variation effect. Non-IQ sampling and 2-stage cascaded integrator-comb filters are integrated into the field-programmable gate array-based digital signal processing to reduce spectrum aliasing and suppress noise. Fine adjustment of hardware components has been made to ensure the isolation between different signals and the linearity over the full-range power level. We have achieved a 6.3 fs root mean square timing jitter for a 2856 MHz RF signal in a single channel, compared to the theoretical limit of 5.1 fs for the current hardware component.