Skip to content

Commit 057c1a0

Browse files
oharboeclaude
andcommitted
Add genben GA_94 demo: 5-stage pipelined RISC-V CPU through placement
GenBen is a benchmark suite for LLM-generated hardware designs. GA_94 is a 5-stage pipelined RISC-V CPU (22 modules, 14K cells on ASAP7). Patches fix upstream _ref suffixes and trailing commas in port lists via patch_cmds in MODULE.bazel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1549221 commit 057c1a0

File tree

6 files changed

+66
-3
lines changed

6 files changed

+66
-3
lines changed

MODULE.bazel

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,20 @@ http_archive(
260260
urls = ["https://github.com/profitmonk/tensor_accelerator/archive/ae1078d296a995925c81f5ae643a4574d5971589.tar.gz"],
261261
)
262262

263+
http_archive(
264+
name = "genben",
265+
build_file = "//genben:external.BUILD.bazel",
266+
patch_cmds = [
267+
# Remove _ref suffix from all module names so the top module is just "CPU"
268+
"sed -i 's/_ref\\b//g' data/Design/GA_94/ref.v",
269+
# Fix trailing commas before ); in port lists (illegal in strict Verilog)
270+
"sed -i -E ':a;N;$!ba;s/,([[:space:]]*\\);)/\\1/g' data/Design/GA_94/ref.v",
271+
],
272+
sha256 = "22a27982fc10d9fba27828a955a551d017bf0195bede283a0f9ae58de50cead8",
273+
strip_prefix = "GenBen-a103f9a892e31bd1c410fe23663bc89f029c6fe9",
274+
urls = ["https://github.com/ChatDesignVerification/GenBen/archive/a103f9a892e31bd1c410fe23663bc89f029c6fe9.tar.gz"],
275+
)
276+
263277
http_archive(
264278
name = "pymtl3",
265279
build_file = "//pymtl3:external.BUILD.bazel",

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ results. See [PHILOSOPHY.md](PHILOSOPHY.md) for the approach.
7070
| [pymtl3](pymtl3/) | Stream checksum unit (pymtl3) | ASAP7 || 0.42 GHz | 1,678 | 192 | `46ea257` | `ea5ca68` | 2026-03-24 | Done |
7171
| [cva6](cva6/) | RISC-V CPU (CVA6 cv32a60x, HPDcache) | ASAP7 || 0.29 GHz | 80,306 | 15,189 | | `02e11e3` | 2026-03-25 | Place |
7272
| [tensor_accelerator](tensor_accelerator/) | 4-level hierarchical TPU (4×TPC, systolic arrays) | ASAP7 |||| 44,562 | | `ae1078d` | 2026-03-25 | CTS |
73+
| [genben](genben/) | 5-stage pipelined RISC-V CPU (GenBen GA_94) | ASAP7 ||| 14,032 || | `a103f9a` | 2026-03-25 | Place |
7374

7475
<details>
7576
<summary>Column descriptions</summary>
@@ -99,9 +100,9 @@ _Run `/demo-update <project>` to refresh statistics after a build._
99100
|:--------:|:--------:|:--------:|:--------:|:--------:|
100101
| [<img src="docs/gemmini_8x8/route.webp" width="150">](gemmini_8x8/) | [<img src="docs/gemmini_8x8_abutted/route.webp" width="150">](gemmini_8x8_abutted/) | [<img src="docs/gemmini/route.webp" width="150">](gemmini/) | [<img src="docs/coralnpu/route.webp" width="150">](coralnpu/) | [<img src="docs/pymtl3/route.webp" width="150">](pymtl3/) |
101102

102-
| [cva6](cva6/) | [tensor_accelerator](tensor_accelerator/) |
103-
|:--------:|:--------:|
104-
| [<img src="docs/cva6/route.webp" width="150">](cva6/) | [<img src="docs/tensor_accelerator/place.webp" width="150">](tensor_accelerator/) |
103+
| [cva6](cva6/) | [tensor_accelerator](tensor_accelerator/) | [genben](genben/) |
104+
|:--------:|:--------:|:--------:|
105+
| [<img src="docs/cva6/route.webp" width="150">](cva6/) | [<img src="docs/tensor_accelerator/place.webp" width="150">](tensor_accelerator/) | [<img src="docs/genben/place.webp" width="150">](genben/) |
105106

106107
## Upcoming
107108

docs/genben/place.webp

1.01 MB
Loading

genben/BUILD.bazel

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
load("//:defs.bzl", "demo_flow", "demo_gallery_image", "demo_stage_images")
2+
3+
demo_flow(
4+
name = "CPU",
5+
verilog_files = ["@genben//:rtl"],
6+
arguments = {
7+
# --- Synthesis ---
8+
"SYNTH_HIERARCHICAL": "1",
9+
"SYNTH_MINIMUM_KEEP_SIZE": "0",
10+
# --- Floorplan & Placement ---
11+
"CORE_UTILIZATION": "40",
12+
"PLACE_DENSITY": "0.65",
13+
# --- Speed defaults (remove to improve QoR) ---
14+
"GPL_ROUTABILITY_DRIVEN": "0",
15+
"GPL_TIMING_DRIVEN": "0",
16+
"SKIP_CTS_REPAIR_TIMING": "1",
17+
"SKIP_INCREMENTAL_REPAIR": "1",
18+
"SKIP_LAST_GASP": "1",
19+
"FILL_CELLS": "",
20+
"TAPCELL_TCL": "",
21+
},
22+
sources = {
23+
"SDC_FILE": [":constraints.sdc"],
24+
},
25+
substeps = True,
26+
)
27+
28+
demo_gallery_image(
29+
name = "CPU_gallery",
30+
src = ":CPU_place",
31+
)
32+
33+
demo_stage_images(
34+
name = "CPU_images",
35+
module = "CPU",
36+
stages = ["floorplan", "place", "cts", "route"],
37+
)

genben/constraints.sdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 1000ps = 1 GHz — aggressive target for ASAP7
2+
set clk_name clk_i
3+
set clk_port_name clk_i
4+
set clk_period 1000
5+
6+
source $::env(PLATFORM_DIR)/constraints.sdc

genben/external.BUILD.bazel

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
filegroup(
2+
name = "rtl",
3+
srcs = ["data/Design/GA_94/ref.v"],
4+
visibility = ["//visibility:public"],
5+
)

0 commit comments

Comments
 (0)