Patent ID: 8892949

Claim:
A method, in a data processing system, for effectively validating execution units within a processor, the method comprising: generating, by a processor, a branch test pattern for execution by an execution unit that is under validation testing, wherein generating the branch test pattern further comprises: copying, by the processor, a set initial nodes (I) to a set of available nodes (N); randomly picking, by the processor, a node ‘n’ from the set of available nodes (N), wherein N is a set of nodes that still need to be processed; removing, by the processor, the node ‘n’ from the set of available nodes (N) to avoid picking the same node for a subsequent iteration; updating, by the processor, a deadlock prevention table (DPT) of node ‘n’ to avoid picking another node that leads to an infinite loop or deadlock; removing, by the processor, all nodes in the DPT of node ‘n’ from the set of available nodes I−‘n’ in order to create a candidate list (C) from which taken/not-taken nodes are randomly selected; determining, by the processor, whether there are at least two nodes in the candidate list (C); responsive to at least two nodes being in the candidate list (C), randomly selecting, by the processor, two nodes {x, y} from the candidate list (C) for a taken path (x) and a not-taken path (y); adding, by the processor, node ‘n’ to a deadlock prevention table (DPT) of node ‘x’ and a deadlock prevention table (DPT) of node ‘y’; determining, by the processor, whether the candidate list (C) contains only one element or less than one element; responsive to the candidate list (C) containing only one element or less than one element, designating, by the processor, a last used node ‘n’ or remaining node ‘n’ as an end node; and generating, by the processor, the branch test pattern; for each execution pattern in a set of execution patterns: selecting, by the processor, an execution pattern from the set of execution patterns thereby forming a selected execution pattern; loading, by the processor, the selected execution pattern into a condition register; executing, by an execution unit, the branch test pattern based on the selected execution pattern in the condition register; responsive to the branch test pattern ending, comparing, by the processor, values output from the execution unit during execution of the branch test pattern to a set of expected results for the selected execution pattern; and determining, by the processor, whether there is a match of the comparison of the values output from the execution unit during execution of the branch test pattern to the set of expected results for the selected execution pattern; and responsive to a match of the comparison for each execution pattern in the set of execution patterns, validating, by the processor, the execution unit.