Biased Random Instruction Generation
Definition
Biased random instruction generation is a stimulus-generation paradigm used in functional verification of processors and other programmable designs. Rather than drawing instructions uniformly at random, the generator emits each instruction (and its operands) according to a configurable bias — a set of weights, probabilities, or distributions that control how often each instruction class, addressing mode, or operand pattern appears in the generated test program [Bose2001].
Role in Simulation-Based Design Verification
Functional verification of modern processor designs relies heavily on simulation, and the cost-effectiveness of simulation depends on the quality of the test programs that drive it [Springer-e19b07f5]. Two broad families of automated test-program generation are commonly cited in this context:
- Random / template-based generators such as Genesys-Pro, which combine architectural templates with random selection [Adir2004].
- Biased random instruction generators, in which the selection probabilities themselves become the parameters that must be tuned.
Biasing is introduced because uniform random instruction streams tend to over-test common-case paths and under-test rare or complex interactions. By adjusting the bias, a verification engineer (or an automated tool) can steer the stimulus toward uncovered corner cases.
Generating the Bias
Because the space of possible biases is large and the relationship between bias settings and achieved coverage is highly non-linear, choosing good bias values manually is difficult. This motivates automatic bias generation, in which an algorithm searches the bias space to maximize coverage or other quality metrics. Approaches reported in the verification literature include:
- A genetic algorithm approach that evolves bias parameters to drive coverage higher [Bose2001].
- Evolutionary / genetic test-program induction for microprocessor verification [Corno2002; Corno2004].
- Coverage-directed test generation using Bayesian networks to map coverage feedback to new bias settings [Fine2003; Braun2004; Fine2004-patent].
These automatic-bias techniques all rely on an underlying biased random instruction generator whose behavior they tune.
Connections to Broader Verification Work
Biased random instruction generation is situated within the wider push, reflected in the International Technology Roadmap for Semiconductors design chapter, to industrialize and scale functional verification [ITRS2005]. It is typically used in conjunction with coverage metrics, since the bias is judged by the coverage it induces rather than by any intrinsic property of the stream itself [Bergeron2003].
See Also
- Genetic approach to automatic bias generation — a specific implementation that evolves bias parameters for a biased random instruction generator.
- Coverage-directed test generation
- Evolutionary test program induction
References
- Adir, A. et al.: Genesys-Pro: Innovations in test program generation for functional processor verification. IEEE Design & Test of Computers 21(2), 84–93 (2004).
- Bergeron, J.: Writing Testbenches: Functional Verification of HDL Models, 2nd edn. Kluwer (2003).
- Bose, M., Shin, J., Rudnick, E.M., Dukes, T., Abadir, M.: A genetic approach to automatic bias generation for biased random instruction generation. CEC2001, pp. 442–448 (2001).
- Braun, M., Fine, S., Ziv, A.: Enhancing the Efficiency of Bayesian Network Based Coverage Directed Test Generation. HLDVT (2004).
- Corno, F. et al.: Evolutionary test program induction for microprocessor design verification. ATS 2002, pp. 368–373 (2002).
- Corno, F. et al.: Automatic Test Program Generation: A Case Study. IEEE Design & Test of Computers 21(2), 102–109 (2004).
- Fine, S., Levinger, M., Ziv, A.: Apparatus and method for coverage directed test. US Patent US2004249618, IBM (2004).
- Fine, S., Ziv, A.: Coverage directed test generation for functional verification using Bayesian networks. DAC 2003, pp. 286–291 (2003).
- International Technology Roadmap for Semiconductors, Design Chapter, 2005 edn.