Definition
Directed random stimulus is a stimulus-generation style that combines directed setup with randomized scenario generation. In the processor-verification example described by Chen, it is presented as a second scenario type alongside constrained-random scenarios and directed scenarios. Its purpose is to make hard-to-hit bug classes more likely than they would be under pure random stimulus alone. [1]
Use in processor verification
Directed random stimulus is useful when pure random inputs are unlikely to expose specific numerical corner cases. For arithmetic operations, the cited example notes that rounding and overflow bugs can be difficult to find with purely random numbers. A directed-random scenario can address this by preloading part of data memory with special values, such as walking patterns of 0s and 1s, values close to zero, and values close to minimum or maximum numeric limits. The scenario can then read those values from memory before executing an arithmetic instruction stream. [1]
Relationship to other scenario types
The cited stimulus-generation flow distinguishes three scenario styles:
- Constrained-random scenarios, such as constraining a long sequence to computational operations only.
- Directed random scenarios, which bias or seed the generated stimulus toward specific hard-to-hit data conditions while still using randomized instruction streams.
- Directed scenarios, such as reading a pre-assembled program as a directed scenario. [1]
A scenario generator can work with all three types. Given a set of scenario objects, it randomly selects and randomizes one scenario, repeating the process until a user-specified stopping condition is reached. [2]
Practical role
Directed random stimulus is therefore useful as a middle ground: it is more targeted than unconstrained pure random stimulus, but less fixed than a fully directed scenario or pre-assembled program trace. This makes it suitable for focusing verification effort on specific risk areas while retaining the broader exploration benefits of randomization. [1]