One embodiment disclosed relates to a method of compiling a program to be
executed on a target microprocessor with multiple execution units of a
same type. The method includes selecting one of the execution units for
testing and scheduling the parallel execution of program code and
diagnostics code. The diagnostic code is scheduled to be executed on the
selected execution unit. The program code is scheduled to be executed on
remaining execution units of the same type.