Skip to content
STIMSMITH

Instruction Statement

Concept WIKI v1 · 5/24/2026

An **instruction statement** is a construct in the Genesys-Pro test-template language used to specify which processor instructions should appear in a generated verification test program.[1cb983aa-1f41-47cd-a92f-f83d06e63f5c] It is one of the four statement categories in the language, alongside sequencing-control statements, standard programming constructs, and constraint statements.[1cb983aa-1f41-47cd-a92f-f83d06e63f5c][fb424708-825f-443a-9c10-91dcb3a3904f]

Instruction Statement

An instruction statement is a construct in the Genesys-Pro test-template language used to specify which processor instructions should appear in a generated verification test program.[1] It is one of the four statement categories in the language, alongside sequencing-control statements, standard programming constructs, and constraint statements.[1][2]

Purpose

Instruction statements let verification users describe the essential instruction-level content of a test scenario while leaving selected details for the generator to choose.[1] In Genesys-Pro, users combine instruction statements with other language constructs to build complex test templates that can range from completely random to completely directed.[2]

A template may explicitly specify the instructions to be generated, such as Load, Store, Add, or Sub, while allowing operands or resources to be randomized or constrained.[1]

Properties

Instruction statements can control properties of the generated instruction, including which architectural resources are used.[1] These properties may be specified in several ways:

  • Randomly selected, represented by a ? in the template.[1]
  • Fixed to a specific value, such as a register like R5.[1]
  • Dependent on a previous value, using user-defined variables.[1]

This allows instruction statements to specify only the required aspects of a scenario while delegating other choices to the generation engine.[2]

Example

A test-template example described in the source includes four basic instruction statements: Load, Store, Add, and Sub.[1] In the illustrated scenario, Store instructions are generated to memory addresses ranging from 0x100 to 0x200 in increments of 16 bytes, and each Store is followed by either an Add or a Sub instruction.[1]

The example also shows dependencies between instruction statements: the first source register of each Add instruction is the same as the source register of the preceding Store instruction.[1]

Interaction with sequencing

Instruction statements are commonly embedded inside sequencing-control statements. For example, a Repeat statement can direct the generator to repeatedly emit pairs of Store and Add or Sub instructions while a condition remains true.[2] In the cited example, repetition continues while the variable addr is less than 0x200.[2]

Sequencing constructs can also order, select, permute, or concurrently generate groups of substatements, including instruction statements.[1][2]

Interaction with variables

Instruction statements can use variables defined through standard programming constructs in the template language.[2] In the example, the variable addr is initialized to 0x100, used as the target address of a Store instruction, tested in the condition of a Repeat statement, and incremented during generation.[2][1]

Role in test generation

After a test template is formulated, the Genesys-Pro generation engine translates the scenario into a constraint satisfaction problem and solves it using a CSP engine suited to test-program generation.[1] After each instruction is generated, Genesys-Pro sends it to an architectural simulator so the generator can maintain an accurate view of architectural resources and compute expected results for resources involved in the test.[1]

The resulting generated test program is then run in a design simulation environment, which compares actual design results with expected results and may also use mechanisms such as assertions and coherency monitors to detect violations.[1]

See also

  • Sequencing-control statement — controls ordering, selection, repetition, permutation, and concurrent generation of substatements.[1][2]
  • Constraint statement — biases random generation decisions toward interesting test areas and may be mandatory or prioritized nonmandatory.[2]
  • Standard programming constructs — include variable definitions, assignments, expressions, and assertions used inside test templates.[2]