Fault diagnosis in scan-based bist using both time and space information