CMOS time-mode smart temperature sensor using programmable temperature compensation devices and $$\Delta \Sigma$$ time-to-digital converter