File size: 1,355 Bytes
3d941b7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44e7d5b
 
 
 
 
8892724
09adb61
 
 
36a9043
 
 
 
09adb61
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: desc
    dtype: string
  - name: testbench
    list:
    - name: content
      dtype: string
    - name: name
      dtype: string
  - name: verified
    dtype: string
  splits:
  - name: test
    num_bytes: 267825
    num_examples: 50
  download_size: 113144
  dataset_size: 267825
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test-*
---

# RTLLM V2.0

Huggingface Datasets format of RTLLM 2.0.

I'm not the author of this work; please refer to [original repository](https://github.com/hkust-zhiyao/RTLLM) to get more info.

Columns:
- `desc`: Design description;
- `testbench`: All testbench-related files, including `testbench.v`, `makefile`, etc.;
  - `name`: File name;
  - `content`: File content;
- `verified`: Verified implementation; The `verified_` prefix is removed.

Example usage:

```python
dataset = datasets.load_dataset("observerw/RTLLM", split="test")
for item in dataset:
    with tempfile.TemporaryDirectory() as tempdir:
        generation = LLM.generate(item["desc"])
        (Path(tempdir) / "impl.v").write_text(generation)
        for tb in item["testbench"]: # write all testbench-related files into temp dir
            (Path(tempdir) / tb["name"]).write_text(tb["content"])

        subprocess.run(["make"], cwd=tempdir)
```