PRO-V is a comprehensive framework for automated Register Transfer Level (RTL) code generation using reinforcement learning and multi-agent systems. The framework addresses the challenge of generating high-quality, functionally correct Verilog code through an iterative verification and refinement process.
Our approach combines:
- Multi-Agent System: Coordinated agents for code generation, testbench creation, simulation, and debugging
- Reinforcement Learning: Policy optimization using verification outcomes as rewards
- Iterative Refinement: Automated debugging loop to fix compilation and simulation errors
Note: Bold indicates best performance, italic indicates second best.
Progressive improvements by adding PRO-V Flow, SFT, and RL to the base model:
| Model / Method | Eval0 | Eval1 | Eval2-80 | Eval2-90 | Eval2-100 |
|---|---|---|---|---|---|
| Qwen3-8B | 0.6 | 0.6 | 0.6 | 0.6 | 0.0 |
| Qwen3-8B w/ CorrectBench | 47.4 | 25.6 | 23.7 | 23.1 | 21.8 |
| Qwen3-8B w/ PRO-V sys | 64.7 | 39.1 | 35.9 | 32.1 | 28.2 |
| PRO-V-DS-8B w/ PRO-V sys | 93.6 | 50.6 | 35.9 | 34.0 | 27.6 |
| PRO-V-R1-8B w/ PRO-V sys | 94.9 | 57.7 | 44.2 | 37.8 | 34.0 |
# Clone the repository
git clone https://github.com/YourRepo/PRO-V.git
cd PRO-V
# Create conda environment
conda create -n pro-v python=3.11
conda activate pro-v
# Install the package
pip install -e .Download the PRO-V-R1-8B model from HuggingFace:
# Using huggingface-cli
huggingface-cli download YujieZhao/PRO-V-R1-8B --local-dir ./models/PRO-V-R1-8B
# Or using git
git lfs install
git clone https://huggingface.co/YujieZhao/PRO-V-R1-8B ./models/PRO-V-R1-8BEdit the model path in the evaluation scripts:
For scripts/run_evaluation_think_simple.sh:
MODEL_PATH="./models/PRO-V-R1-8B"
SERVED_MODEL_NAME="PRO-V-R1-8B"For scripts/run_evaluation_think.sh:
MODEL_PATH="./models/PRO-V-R1-8B"
SERVED_MODEL_NAME="PRO-V-R1-8B"
EXPERIMENT_NAME="pro_v_r1_8b_eval"cd scripts
# Simple evaluation (single process)
bash run_evaluation_think_simple.sh
# Or advanced evaluation (Ray-based parallel processing)
bash run_evaluation_think.shgit clone https://github.com/YourRepo/PRO-V.git
cd PRO-V
# Get submodules (benchmark datasets)
git submodule update --init --recursive
# Create conda environment
conda create -n pro-v python=3.11
conda activate pro-v
# Install the package
pip install -e .Ubuntu (Local Compilation)
apt install -y autoconf gperf make gcc g++ bison flex
git clone https://github.com/steveicarus/iverilog.git && cd iverilog
git checkout v12-branch
sh ./autoconf.sh && ./configure && make -j4
sudo make installMacOS
brew install icarus-verilogVersion Confirmation
Verify the installation:
iverilog -vExpected output (first line):
Icarus Verilog version 12.0 (stable) (v12_0)
# By apt (Ubuntu/Debian)
sudo apt install verilator
# By Homebrew (MacOS)
brew install verilator
# By Compilation
git clone https://github.com/verilator/verilator
cd verilator
autoconf
export VERILATOR_ROOT=`pwd`
./configure
make -j4PRO-V provides two evaluation scripts:
Edit scripts/run_evaluation_think_simple.sh:
# Configure GPU and model
GPU_IDS="0,1" # GPUs to use
MODEL_PATH="./models/PRO-V-R1-8B"
SERVED_MODEL_NAME="PRO-V-R1-8B"
EXPERIMENT_NAME="pro_v_eval"
# Parallelism settings
TP_SIZE=2 # Tensor parallel size
DP_SIZE=1 # Data parallel sizeRun the evaluation:
cd scripts
bash run_evaluation_think_simple.shEdit scripts/run_evaluation_think.sh:
# Configure GPU and model
GPU_IDS="0,1,2,3" # GPUs to use
MODEL_PATH="./models/PRO-V-R1-8B"
SERVED_MODEL_NAME="PRO-V-R1-8B"
EXPERIMENT_NAME="pro_v_eval_parallel"
# Parallelism settings
TP_SIZE=4 # Tensor parallel size
DP_SIZE=1 # Number of replicas
MAX_CONCURRENCY=50 # Concurrent tasksRun the evaluation:
cd scripts
bash run_evaluation_think.shBoth scripts support various parameters:
# Sampling parameters
TEMPERATURE=0 # Temperature for generation
TOP_P=0.95 # Top-p sampling
MAX_TOKEN=20000 # Maximum tokens per generation
# Task filtering
TASK_NUMBERS="1,2,3" # Specific tasks to run
FILTER_INSTANCE="^(Prob011_norgate)$" # RegEx filter
# Benchmark selection
FOLDER_PATH="./verilog-eval/HDLBits/test_benchmark_new.json"Results are saved to outputs/<EXPERIMENT_NAME>/:
outputs/
βββ pro_v_eval/
βββ all_results.json # Aggregated results
βββ overall_stats.json # Statistics
βββ task_1/ # Individual task outputs
βββ task_2/
βββ ...

