Random Binary Generation
Definition
In the referenced RISC-V vector accelerator verification work, Random Binary Generation refers to creating random or constrained-random RISC-V assembly tests/binaries and using them as executable stimulus for functional verification. The project used the RISCV-DV generator, described in the paper as a Google-developed tool that generates random RISC-V assembly tests, to provide vector instructions to the Vector Processing Unit (VPU). [C1]
Role in the verification flow
Random binaries complemented a reusable and extendable UVM verification environment that implemented the protocol between the Open Vector Interface (OVI) and the VPU and checked completed instruction correctness. The random-binary flow was part of a broader infrastructure including constrained-random test generation, simulation, error reporting, and CI/CD. [C2]
The paper’s verification infrastructure also used Spike as a reference model and scalar-core-like executor: Spike executed scalar instructions, provided vector instructions to the UVM environment in program order, and returned reference results for comparison against the device under test. [C3]
RISCV-DV adaptations
The project’s VPU implemented RVV version 0.7.1, while the available RISCV-DV support targeted a later RVV version. The authors therefore adapted RISCV-DV to fit their needs. Reported additions included: [C4]
- Generating
vsetvliinstructions through the code. - Modifying memory-operation generation so element width and vector length could change.
- Adding an option to select the initialization pattern of data pages.
- Constraining memory addresses accessed by tests to avoid memory exceptions, especially for vector indexed memory instructions.
- Adapting the generator to RVV 0.7.1.
Instruction blacklisting during bring-up
Because some design modules were under development for much of the verification process, the team initially blacklisted many instructions in generated tests so that each iteration could still produce functional tests. As errors were fixed, instructions were gradually removed from the blacklist until all implemented instructions were enabled. [C5]
Regression scale and observed outcome
The paper reports that the team ran 24 random tests every night between April and July, then increased to 50 nightly tests from August through the end of November before RTL freeze. Each test contained approximately 500 vector instructions. Across the process, the verification effort found 3005 errors and reached 95.79% functional coverage. [C6]
Practical purpose
Within this project, Random Binary Generation served as a way to continuously exercise the vector accelerator with varied instruction streams, integrate those tests into CI, and support coverage closure. The paper specifically attributes the verification results to automated constrained-random test generation, simulation and error reporting, and CI/CD infrastructure. [C2]