Overview
Assembly-level test program generation is an automated verification technique used to produce test programs written in the assembly language of a target microprocessor. These generated programs are then executed (typically on a simulation model or the hardware itself) to check functional correctness of the processor against its specification.
The technique addresses the difficulty of manually authoring assembly-level stimulus that systematically covers instruction behaviors, addressing modes, operand combinations, and interactions between instructions. By automating program synthesis from formal specifications, the technique supports coverage-directed functional verification of complex instruction set architectures.
Approach
A characteristic instantiation of the technique uses the following elements, as described in the published description of the MicroTESK framework:
- Formal specification of the target. The architecture of the microprocessor under verification is described using a formal specification language. This specification encodes the configuration of the processor (instructions, addressing modes, registers, exceptions, etc.) and serves as the source of knowledge from which tests are generated.
- Test situation formulation. Verification goals are expressed as "test situations" derived from the formal specification. A test situation describes the class of instruction sequences, operand values, and architectural states that the user wants the generated test to exercise.
- Ruby-based generation language. Generation tasks are described in a special language based on Ruby, which allows engineers to formulate verification goals in terms of the test situations defined above rather than writing ad‑hoc test scaffolding.
- Automated assembly emission. The generator, driven by the Ruby-based task description and the formal specification, produces assembly-language test programs that realize the requested test situations.
This specification-driven approach is intended to simplify configuring the framework and to improve the level of test coverage compared with manually written test suites.
Industrial Application
The technique has been applied in industrial verification projects for major microprocessor architectures. According to the published project description, the MicroTESK framework implementing this approach has been successfully used in projects targeting the ARMv8 and MIPS64 instruction set architectures.
See also
- MicroTESK — framework that implements assembly-level test program generation.
- Functional verification of microprocessors — the broader verification discipline of which this technique is a part.