An Embedded Low-Cost CMOS Time Interval Measurement Core with 0.5ns Measurable Period for SoC Application