Techniques are disclosed for automatically generating test instructions
for use in testing a microprocessor design. A configuration file includes a plurality
of knobs which specify a probability distribution of a plurality of microprocessor
instructions. A random code generator takes the configuration file as an input
and generates test instructions which are distributed according to the probability
distribution specified by the knobs. The test instructions are executed on the
microprocessor design. The microprocessor behaviors that are exercised by the test
instructions are measured and a fitness value is assigned to the configuration
file using a fitness function. The configuration file and its fitness value are
added to a pool of configuration files. A configuration file synthesizer uses a
genetic algorithm to synthesize a new configuration file from the pool of existing
configuration files. This process may be repeated to generate configuration files
which increasingly exercise microprocessor behaviors which are of interest.