Infrastructures and Algorithms for Testable and Dependable Systems-on-a-Chip