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|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
- text-to-code
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- verilog
|
| 10 |
+
- systemverilog
|
| 11 |
+
- rtl-design
|
| 12 |
+
- llm-evaluation
|
| 13 |
+
- electronic-design-automation
|
| 14 |
+
pretty_name: IC-RTL Benchmark
|
| 15 |
+
size_categories:
|
| 16 |
+
- n<1K
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# IC-RTL: Industrial-Scale RTL Design Benchmark
|
| 20 |
+
|
| 21 |
+
[](https://arxiv.org/abs/2601.18067)
|
| 22 |
+
[](https://opensource.org/licenses/MIT)
|
| 23 |
+
|
| 24 |
+
## 📖 Overview
|
| 25 |
+
|
| 26 |
+
This repository contains a collection of industrial-level RTL design challenges selected from the National Taiwan Integrated Circuit Design Contest and handcrafted problems, complete with our reference implementations and specs. Each challenge targets specific algorithms or hardware modules used in industry. We present this collection as the **ICRTL benchmark**, designed to evaluate PPA (Power, Performance, Area) optimization on complex problems — a level of difficulty previously unexplored in the application of LLMs to RTL design.
|
| 27 |
+
|
| 28 |
+
This dataset is hosted here as a `jsonl` file (`train.jsonl`) for easy integration with ML pipelines.
|
| 29 |
+
|
| 30 |
+
> **Official Benchmark for the paper:**
|
| 31 |
+
> **[EvolVE: Evolutionary Search for LLM-based Verilog Generation and Optimization](https://arxiv.org/abs/2601.18067)**
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## ⚡ Quick Start: Reconstructing the Environment
|
| 36 |
+
|
| 37 |
+
To run the benchmarks (using the testbenches and auxiliary files), **you must first reconstruct the directory structure** from the dataset.
|
| 38 |
+
|
| 39 |
+
Run the following Python script to download the dataset and restore the full environment locally:
|
| 40 |
+
|
| 41 |
+
```python
|
| 42 |
+
import os
|
| 43 |
+
from datasets import load_dataset
|
| 44 |
+
|
| 45 |
+
# 1. Load the dataset from Hugging Face
|
| 46 |
+
# Replace 'weiber2002/IC-RTL' with your actual username if different
|
| 47 |
+
dataset = load_dataset("weiber2002/IC-RTL")
|
| 48 |
+
|
| 49 |
+
print("Downloading and reconstructing IC-RTL benchmark...")
|
| 50 |
+
|
| 51 |
+
# 2. Iterate through tasks and set up the environment
|
| 52 |
+
for sample in dataset['train']:
|
| 53 |
+
task_name = sample['task_id']
|
| 54 |
+
print(f" -> Restoring: {task_name}")
|
| 55 |
+
|
| 56 |
+
# Create directory for the task
|
| 57 |
+
os.makedirs(task_name, exist_ok=True)
|
| 58 |
+
|
| 59 |
+
# Restore Testbench
|
| 60 |
+
with open(os.path.join(task_name, "test.sv"), "w", encoding="utf-8") as f:
|
| 61 |
+
f.write(sample['testbench'])
|
| 62 |
+
|
| 63 |
+
# Restore Initial RTL Template
|
| 64 |
+
if sample['rtl_code']:
|
| 65 |
+
with open(os.path.join(task_name, "initial.sv"), "w", encoding="utf-8") as f:
|
| 66 |
+
f.write(sample['rtl_code'])
|
| 67 |
+
|
| 68 |
+
# Restore Specification
|
| 69 |
+
with open(os.path.join(task_name, "problem_spec.md"), "w", encoding="utf-8") as f:
|
| 70 |
+
f.write(sample['description'])
|
| 71 |
+
|
| 72 |
+
# Restore all auxiliary files (hex, dat) preserving their paths
|
| 73 |
+
if sample['auxiliary_files']:
|
| 74 |
+
for filename, content in sample['auxiliary_files'].items():
|
| 75 |
+
file_path = os.path.join(task_name, filename)
|
| 76 |
+
|
| 77 |
+
# Ensure subdirectories exist (e.g., Q1_LBP/data/inst.hex)
|
| 78 |
+
os.makedirs(os.path.dirname(file_path), exist_ok=True)
|
| 79 |
+
|
| 80 |
+
# Write content (handling potential binary/text differences)
|
| 81 |
+
mode = "w" if isinstance(content, str) else "wb"
|
| 82 |
+
encoding = "utf-8" if isinstance(content, str) else None
|
| 83 |
+
|
| 84 |
+
with open(file_path, mode, encoding=encoding) as f:
|
| 85 |
+
f.write(content)
|
| 86 |
+
|
| 87 |
+
print("\n✅ Reconstruction Complete! You can now follow the 'How to Run' instructions below.")
|
| 88 |
+
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
## 🧩 Challenges Overview
|
| 94 |
+
|
| 95 |
+
The benchmark consists of 6 core problems (`Q1` through `Q6`), each containing the problem specification, testbench, and reference solution foundation.
|
| 96 |
+
|
| 97 |
+
| ID | Problem Name | Description |
|
| 98 |
+
| --- | --- | --- |
|
| 99 |
+
| **Q1** | **LBP** (Local Binary Pattern) | Design an accelerator to compute Local Binary Patterns for 128x128 grayscale images. |
|
| 100 |
+
| **Q2** | **GEMM** (Systolic Array) | Implement a Systolic Array based matrix processing unit. |
|
| 101 |
+
| **Q3** | **CONV** (Convolution) | Develop a hardware accelerator for 2D convolution operations on 64x64 images. |
|
| 102 |
+
| **Q4** | **HC** (Huffman Coding) | Create a hardware Huffman Coding generator for lossless compression. |
|
| 103 |
+
| **Q5** | **JAM** (Job Assignment Machine) | Implement an exhaustive search solver for the Job Assignment problem (finding min cost assignment). |
|
| 104 |
+
| **Q6** | **DT** (Distance Transform) | Design an engine to compute the Distance Transform (chessboard distance) for binary images. |
|
| 105 |
+
|
| 106 |
+
---
|
| 107 |
+
|
| 108 |
+
Each `Q*` folder typically contains:
|
| 109 |
+
|
| 110 |
+
* `00_TB/`: Testbench files.
|
| 111 |
+
* `ref_solution/`: Initial RTL templates or reference solutions.
|
| 112 |
+
* `referenced_spec/`: Detailed problem specifications (look for `human.md`).
|
| 113 |
+
* `result/`: Directory for storing simulation/synthesis results.
|
| 114 |
+
* `01_run.sh`: Shell script for open-source flow execution.
|
| 115 |
+
|
| 116 |
+
---
|
| 117 |
+
|
| 118 |
+
## 🚀 How to Run
|
| 119 |
+
|
| 120 |
+
There are two primary ways to run the designs: using the provided open-source scripts (Icarus Verilog + Yosys) or the commercial tool flow (VCS).
|
| 121 |
+
|
| 122 |
+
> **Note:** For the full execution scripts (e.g., `01_run.sh`, `VCS/` folder) and dependencies, please refer to our **[GitHub Repository](https://github.com/weiber2002/ICRTL)** if they are not included in the dataset reconstruction.
|
| 123 |
+
|
| 124 |
+
### Method 1: Open-Source Flow (Icarus Verilog & Yosys)
|
| 125 |
+
|
| 126 |
+
Each problem folder contains a `01_run.sh` script that runs simulation using `iverilog` and synthesis using `yosys`.
|
| 127 |
+
|
| 128 |
+
**Prerequisites:**
|
| 129 |
+
|
| 130 |
+
* `iverilog` (Icarus Verilog)
|
| 131 |
+
* `yosys` (Yosys Open SYnthesis Suite)
|
| 132 |
+
|
| 133 |
+
**Steps:**
|
| 134 |
+
|
| 135 |
+
1. Navigate to the problem directory (e.g., `Q1_LBP`).
|
| 136 |
+
2. Execute the run script:
|
| 137 |
+
```bash
|
| 138 |
+
cd Q1_LBP
|
| 139 |
+
bash 01_run.sh
|
| 140 |
+
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
3. Check `result/` for logs:
|
| 145 |
+
* `latency.log`: Simulation output.
|
| 146 |
+
* `area.log`: Synthesis area report.
|
| 147 |
+
|
| 148 |
+
---
|
| 149 |
+
|
| 150 |
+
## 🔗 Citation
|
| 151 |
+
|
| 152 |
+
If you use **ICRTL** or the **EvolVE** framework in your research, please cite our paper:
|
| 153 |
+
|
| 154 |
+
```bibtex
|
| 155 |
+
@article{hsin2026evolve,
|
| 156 |
+
title={EvolVE: Evolutionary Search for LLM-based Verilog Generation and Optimization},
|
| 157 |
+
author={Hsin, Wei-Po and Deng, Ren-Hao and Hsieh, Yao-Ting and Huang, En-Ming and Hung, Shih-Hao},
|
| 158 |
+
journal={arXiv preprint arXiv:2601.18067},
|
| 159 |
+
year={2026},
|
| 160 |
+
url={[https://arxiv.org/abs/2601.18067](https://arxiv.org/abs/2601.18067)}
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
```
|