Skip to content
STIMSMITH

init_gpr

CodeArtifact

init_gpr is a function in the riscv_asm_program_gen assembly-generation flow of the CHIPS Alliance riscv-dv RISC-V random instruction generator. In the documented gen_program() sequence, init_gpr() is called after program-header generation and initializes RISC-V general-purpose registers with random values.

First seen 5/26/2026
Last seen 5/28/2026
Evidence 1 chunks
Wiki v1

WIKI

Overview

init_gpr is a code artifact referenced as part of the riscv_asm_program_gen SystemVerilog assembly-program generation flow in the CHIPS Alliance open-source riscv-dv random instruction generator for RISC-V processor verification. The broader riscv_asm_program_gen class is described as generating the complete RISC-V assembly program used to verify RISC-V IP, including initialization, instruction, data, stack, page-table, interrupt, and exception-handling sections. [C1]

Role in program generation

READ FULL ARTICLE →

NEIGHBORHOOD

No graph connections found for this entity yet. It may appear in future ingestion runs.

explore full graph →

RELATIONSHIPS

3 connections
riscv_asm_program_gen part of → 100% 2e
init_gpr is a function within riscv_asm_program_gen for initializing general purpose registers.
gen_program ← uses 100% 2e
gen_program calls init_gpr to initialize general purpose registers.
general purpose register initialization implements → 100% 1e
init_gpr implements the functionality to initialize general purpose registers with random values.

CITATIONS

6 sources
6 citations — click to expand
[1] The CHIPS Alliance riscv-dv generator is an open-source RISC-V random instruction generator for processor verification, and riscv_asm_program_gen generates complete RISC-V assembly programs with sections such as initialization, instruction, data, stack, page table, interrupt, and exception handling. RISC-V source class riscv_asm_program_gen, the brain behind ...
[2] gen_program_header() fills the instruction stream with header content and calls gen_section("_start", str). RISC-V source class riscv_asm_program_gen, the brain behind ...
[3] gen_program() calls init_gpr(), whose functionality is to initialize general-purpose registers with random values. RISC-V source class riscv_asm_program_gen, the brain behind ...
[4] gen_program() is the main function that generates all sections of the program by calling other riscv_asm_program_gen functions. RISC-V source class riscv_asm_program_gen, the brain behind ...
[5] gen_program() calls get_directed_instr_stream(), and add_directed_instr_stream() is used to select the ratio of directed instruction generation. RISC-V source class riscv_asm_program_gen, the brain behind ...
[6] After init_gpr(), directed instruction stream generation randomizes instructions and selects rs1, rs2, and rd based on instruction type, producing assembly using GPRs x0 through x31. RISC-V source class riscv_asm_program_gen, the brain behind ...