An on-chip all-digital PV-monitoring architecture for digital IPs