# Random test generator

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Random_test_generator
> Markdown URL: https://mediated.wiki/source/Random_test_generator.md
> Source: https://en.wikipedia.org/wiki/Random_test_generator
> Source revision: 1304365148
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Type of functional verification unit for hardware design

This article needs more citations. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Random test generator" – news · newspapers · books · scholar · JSTOR (January 2019) (Learn how and when to remove this message)

**Random test generators** (often abbreviated RTG or ISG[1] for Instruction Stream Generator or Instruction Sequence Generator[1]) are a type of [computer software](/source/Computer_software) that is used in [functional verification](/source/Functional_verification) of [microprocessors](/source/Microprocessor). Their primary use lies in providing input stimulus to a [device under test](/source/Device_under_test).

In a [simulation](/source/Logic_simulation)/[testbench](/source/Test_bench) verification environment, the simulator processes input created by the RTG and coverage monitors may be used to verify that the generator is properly testing the design.[2]

Random test generators range in scope from simple [scripts](/source/Scripting_language) and parameterized [macros](/source/Macro_(computer_science)) that can be created in a matter of weeks to full featured systems requiring extensive software development. Random test generators are most often created by the designing organizations.

## Table Based Generators

Table based test generators are the simplest RTGs available. Creation of such generators can be accomplished relatively quickly, and maintenance requirements are often low. These generators work by capturing knowledge of the design's [instruction set architecture](/source/Instruction_set_architecture) and storing it in a [relational database](/source/Relational_database) for later use. Because of their simplistic nature, table based generators may be used by less skilled personnel to create interesting tests. There is a drawback to these generators however, as their implementation is generally restricted to simple architectures. Usage on more complex ISAs may result in an inability to reach [corner cases](/source/Corner_case) or create complex scenarios. Table based generators may also generate invalid tests at times.

## Static Generators

Static generators are similar to table based generators with the exception that the majority of the instruction, operand and data selection reside in complex [procedural code](/source/Procedural_code). Static generators are capable of producing more random behavior than table based generators, but still have trouble hitting many corner-cases. In addition, the skill level required to create and maintain such a tool rises sharply once this level of sophistication is reached.

## Dynamic Generators

Dynamic generators incorporate significant knowledge about the architecture being tested. They enhance the ability of less-skilled users to generate complex tests that can hit hard-to-reach corner cases without stumbling on subtle programming pitfalls. This added knowledge, flexibility and ease-of-use is reflected in a more complex generator, and consequently the cost of creating and maintaining the generator are greater than for table-based or static generators.

## References

1. ^ [***a***](#cite_ref-:0_1-0) [***b***](#cite_ref-:0_1-1) [*Introduction to FORCE-RISCV*](https://github.com/openhwgroup/force-riscv), OpenHW Group, February 21, 2023, retrieved February 25, 2023

1. **[^](#cite_ref-2)** ["Random Test Generator - Bridging the gap | BCS"](https://www.bcs.org/membership-and-registrations/member-communities/software-testing-specialist-group/the-tester/newsletter-archive/random-test-generator-bridging-the-gap/). *www.bcs.org*. Retrieved February 25, 2023.

## External links

- [IBM Genesys Pro](http://www.haifa.ibm.com/dept/svt/papers/simulation/meth_date99.pdf) [Archived](https://web.archive.org/web/20060316083416/http://www.haifa.ibm.com/dept/svt/papers/simulation/meth_date99.pdf) March 16, 2006, at the [Wayback Machine](/source/Wayback_Machine)

- [Obsidian Software RAVEN](http://www.obsidiansoft.com)

- [MicroTESK](http://forge.ispras.ru/projects/microtesk), an [open-source](/source/Open-source) ISG developed by the [Russian Academy of Sciences](/source/Russian_Academy_of_Sciences)

- [IEEE article - A universal random test generator for functional verification of microprocessors and system-on-chip](https://ieeexplore.ieee.org/document/1383278)

---
Adapted from the Wikipedia article [Random test generator](https://en.wikipedia.org/wiki/Random_test_generator) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Random_test_generator?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
