Self-Diagnosing Switch Matrix