Integration of design and diagnosis into a common process