--- license: apache-2.0 configs: - config_name: RuC-cve2-32k data_files: - split: train path: RuC-cve2-32k.jsonl - config_name: RuC-tt07-32k data_files: - split: train path: RuC-tt07-32k.jsonl --- # RuC Datasets ## Summary RuC is a grammar-driven, rule-selectable benchmark generator that automatically produces RTL code-completion tasks from input hardware description sources. It uses the target HDL grammar to mask syntactically defined code regions and prompts a model to regenerate them using the surrounding unmasked code as context. **Paper**: https://arxiv.org/abs/2604.27780 RuC-datasets is a collection of hardware design datasets processed with the RuC framework and used for the experiments presented in the paper. The repository currently contains two datasets: - `RuC-cve2-32k` - `RuC-tt07-32k` Although both datasets share the same schema and preprocessing pipeline, they originate from different source corpora and should be treated as separate datasets. ## Dataset Structure Each dataset is distributed as a JSONL file where each row corresponds to a single hardware design sample. Each sample contains the following fields: - `sample_i` Unique sample identifier. - `topmodule` Name of the top-level Verilog/SystemVerilog module. - `code` Full HDL source code of the design. - `mask_idx` Indices of the rule occurrences selected by RuC for masking. - `all_mask_idx` Complete set of candidate rule occurrences eligible for masking. ## Dataset Origins ### RuC-tt07-32k Derived from the NotSoTiny shuttle tt07 dataset: https://huggingface.co/datasets/HPAI-BSC/NotSoTiny-25-12 Designs were filtered to retain samples containing fewer than 32000 tokens. The original source files are Verilog (.v) designs. ### RuC-cve2-32k Derived from the CVE2 RISC-V core maintained by OpenHWGroup. The CVE2 codebase was preprocessed using vppreproc and filtered to retain samples containing fewer than 32000 tokens. The original source files are SystemVerilog (.sv) designs. ## RuC usage These datasets are intended to be used together with the RuC framework: https://github.com/HPAI-BSC/RuC To use the samples directly with the RuC framework, each JSON sample must be reconstructed into the original directory layout expected by RuC. For each sample: ``` RuC-cve2-32k / ├── .sv ├── mask_idx.json └── all_mask_idx.json ``` ``` RuC-tt07-32k / ├── .v ├── mask_idx.json └── all_mask_idx.json ``` Where: - `.sv` or `.v` contains the contents of the code field. - `mask_idx.json` contains the contents of the `mask_idx` field. - `all_mask_idx.json` contains the contents of the `all_mask_idx` field. The required HDL extension depends on the dataset: - .sv for `RuC-cve2-32k` - .v for `RuC-tt07-32k` ## Additional Information ### License The dataset is released under the Apache License 2.0. ### Citation Information ``` @misc{domingo2026ruchdlagnosticrulecompletion, title={RuC: HDL-Agnostic Rule Completion Benchmark Generation}, author={Arnau Ayguadé Domingo and Miquel Alberti-Binimelis and Cristian Gutierrez-Gomez and Emanuele Parisi and Razine Moundir Ghorab and Miquel Moreto and Gokcen Kestor and Dario Garcia-Gasulla}, year={2026}, eprint={2604.27780}, archivePrefix={arXiv}, primaryClass={cs.AR}, url={https://arxiv.org/abs/2604.27780}, } ```