Skip to content
STIMSMITH

Constraint Statement

Concept WIKI v1 · 5/24/2026

A **constraint statement** is a statement type in the Genesys-Pro test-template language used to influence generated tests by biasing the generator’s random choices toward “interesting areas” of the test space.[fb424708-825f-443a-9c10-91dcb3a3904f]

Constraint Statement

A constraint statement is a statement type in the Genesys-Pro test-template language used to influence generated tests by biasing the generator’s random choices toward “interesting areas” of the test space.[1]

Context

Genesys-Pro’s template language includes four kinds of statements: basic instruction statements, sequencing-control statements, standard programming constructs, and constraint statements.[1] Users combine these statements to describe verification scenarios and control how much randomness remains in generated tests, ranging from completely random generation to completely directed generation.[1]

Constraint statements are specifically responsible for guiding random generation decisions, rather than directly defining instruction order or conventional program variables.[1]

Function

Constraint statements affect test quality by steering the generator toward selected behaviors or architectural situations considered useful for testing.[1] Users can:

  • activate or deactivate constraints;[1]
  • mark constraints as mandatory;[1]
  • mark constraints as prioritized but nonmandatory.[1]

Sources of Constraints

The available constraints can come from two sources:

  1. Design-specific testing knowledge stored in the model database.[1]
  2. Generic biasing constraints supplied with the generic generation engine and applicable to any processor.[1]

Generic Biasing Constraint Examples

Alignment Bias

An alignment bias causes address generation to prefer addresses aligned at, near, or across specified address boundaries, such as word boundaries, cache-line-size boundaries, or page boundaries.[1]

Cache Bias

A cache bias causes generation of memory access patterns that trigger specified cache events, including hits, misses, and line replacements.[2] Cache warm-loading—initializing cache lines in the generated test—can also help generate such cache events.[2]

Translation Bias

A translation bias is used to trigger address-translation mechanisms.[2] Examples of interesting translation scenarios include translation-table events, translation-path protection events, translation-path reuse, and sharing.[2]

Resource Dependency Bias

A resource dependency bias controls dependencies among resources used by nearby instructions in a test stream.[2] Users can request source-source, source-target, target-source, and target-target dependencies, or request independence between resources so that nearby instructions use different registers.[2]

Parameter Adjustment

Constraint statements can also adjust the meaning or parameters of constraints.[2] In the cited example, a template sets the alignment size to 4 bytes and sets the activation rate of the generic alignment bias to 50% for the test overall.[2] The Load instruction then overrides those settings, changing the alignment size to 16 bytes and the activation rate to 100%.[2] This causes the generator to select a 16-byte-aligned address for the Load instruction.[2]

Example Effect on Register Selection

The evidence also describes a resource dependency bias request causing the generation engine to select register R5 as the target register of a Sub instruction at address 0x508.[2]

See Also

  • Sequencing-control statements — statements such as Select, Repeat, Permute, and Concurrent, which control how substatements are generated and ordered.[1]
  • Standard programming constructs — variable definitions, assignments, expressions, and assertions supported by Genesys-Pro templates.[1]