Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

riscv-seeds-lab

A reproducible lab for generating a RISC-V (RV32IM) program corpus from seven upstream seed/fuzzer tools. The generated programs (.S / ELF32) feed the zkvmBlast SPE seed_loader/seed_lifter pipeline.

The tools: aapg, ctg (riscv-ctg), tests (riscv-tests), torture (riscv-torture), dv (riscv-dv), cascade (an in-repo Cascade-inspired generator), archtest (riscv-arch-test). See corpus/README.md for the per-tool program breakdown and caveats.

Prerequisites

The corpus is already committed under corpus/, so you only need these to regenerate it. Install (macOS / Homebrew shown):

brew install bash git python uv make sbt openjdk@21 \
  riscv-gnu-toolchain riscv-isa-sim   # gcc/objdump + spike

Notes:

  • uv manages the per-tool Python 3.11 venvs.
  • The RISC-V GNU toolchain provides riscv64-unknown-elf-gcc/objdump; spike is used to verify generated programs.

setup_and_generate.sh checks all host prerequisites up front and prints warnings accordingly.

Generate seeds

Everything, from scratch (install + generate)

./setup_and_generate.sh

This installs each tool from its pinned commit, generates all seven corpora, and verifies each tool met its expected program count (356 programs total).

A subset of tools

./setup_and_generate.sh aapg ctg

Valid names: aapg ctg tests torture dv cascade archtest.

Regenerate only (tools already installed)

Skip the install layer and re-run the generators directly:

bash corpus/scripts/generate_corpus.sh          # all tools
bash corpus/scripts/generate_corpus.sh aapg     # one tool

Each gen_<tool>.sh is self-contained (activates its own <tool>/.venv / repo), a failure in one tool does not abort the others.

Layout

setup_and_generate.sh      installation script
corpus/
  README.md                per-tool program breakdown, counts, and caveats
  scripts/
    generate_corpus.sh     generation script
    gen_<tool>.sh          seven per-tool generators
    torture-rv32im.patch   patches riscv-torture from RV64 → RV32IM
    rv32im_babybear.cgf    field-prime coverpoints for the ctg BabyBear seeds
  <tool>/                  generated programs (.S / ELF32), committed
<tool>/                    upstream clones + venvs (gitignored, not vendored)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages