You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chisel/README.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,9 @@ Create a Chisel test bench module that has one `done` top level output signal to
16
16
17
17
See BUILD file in this folder and read the test.bzl on how to set up chisel_bench_test().
18
18
19
-
Unfortunately, there isn't enough disk space in CI to have LLVM + verilator toolchains enabled, so it has been temporarily disabled. To enable, revert the disabling:
Copy file name to clipboardExpand all lines: toolchains/scala/README.md
+22-74Lines changed: 22 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,16 @@ This directory contains Bazel rule wrappers for Chisel hardware design, built on
4
4
5
5
## Architecture
6
6
7
-
The project uses **BCR rules_scala 7.1.5** from Bazel Central Registry as the underlying Scala toolchain. The Chisel wrappers (`chisel_binary`, `chisel_library`, `chisel_test`) provide a convenient API that:
7
+
The project uses **BCR rules_scala 7.1.5 or newer** (as per `MODULE.bazel`) from Bazel Central Registry as the underlying Scala toolchain. The Chisel wrappers (`chisel_binary`, `chisel_library`, `chisel_test`) provide a convenient API that:
8
8
9
-
- Automatically includes Chisel 7.2.0 and its dependencies
10
-
- Pre-configures Scala compiler options for Chisel
11
-
- Sets up Verilator and firtool for hardware simulation (tests only)
9
+
* Automatically includes Chisel and its dependencies
10
+
* Pre-configures Scala compiler options for Chisel
11
+
* Sets up Verilator and firtool for hardware simulation (tests only)
12
12
13
13
## Usage
14
14
15
+
For another minimal working example, please refer to [bazel-chisel-verilator-openroad-demo](https://github.com/MrAMS/bazel-chisel-verilator-openroad-demo).
16
+
15
17
### chisel_library
16
18
17
19
Use for Chisel library targets:
@@ -24,6 +26,7 @@ chisel_library(
24
26
srcs= ["MyModule.scala"],
25
27
visibility= ["//visibility:public"],
26
28
)
29
+
27
30
```
28
31
29
32
### chisel_binary
@@ -39,6 +42,7 @@ chisel_binary(
39
42
main_class="myproject.Generate",
40
43
deps= [":mylib"],
41
44
)
45
+
42
46
```
43
47
44
48
### chisel_test
@@ -53,23 +57,8 @@ chisel_test(
53
57
srcs= ["MyModuleTest.scala"],
54
58
deps= [":mylib"],
55
59
)
56
-
```
57
-
58
-
**Note**: Tests run locally (`tags = ["local"]`) to allow Verilator to generate files during simulation.
59
60
60
-
## Dependencies
61
-
62
-
The following dependencies are automatically included:
63
-
64
-
- Chisel 7.2.0 (`org.chipsalliance.chisel`)
65
-
- Chisel plugin for Scala 2.13.17
66
-
- Circe (JSON library)
67
-
- Shapeless (generic programming)
68
-
- Cats (functional programming)
69
-
70
-
For tests, additional tools are provided:
71
-
- Verilator 5.036 (from BCR)
72
-
- firtool from CIRCT
61
+
```
73
62
74
63
## Verilator Integration
75
64
@@ -81,69 +70,28 @@ The `chisel_test` rule includes workarounds for BCR verilator compatibility:
81
70
82
71
## IDE Support with Bazel BSP
83
72
84
-
This project uses [Bazel BSP](https://github.com/JetBrains/bazel-bsp) (Build Server Protocol) for IDE integration with Metals.
73
+
This project uses [Bazel BSP](https://github.com/JetBrains/bazel-bsp) (Build Server Protocol) for IDE integration. Modern editors like **Zed**, **VS Code**, and **IntelliJ IDEA** can automatically detect and initialize the BSP server via Metals or their respective plugins without manual installation.
85
74
86
75
### Quick Setup
87
76
88
-
1.**Install Bazel BSP**:
89
-
```bash
90
-
cs install bsp
91
-
```
77
+
1.**Configure targets** (`.bazelproject` in project root):
78
+
Ensure your `.bazelproject` lists the targets you want to index. You check this [doc](https://ij.bazel.build/docs/project-views.html) more information.
92
79
93
-
2.**Initialize BSP**:
94
-
```bash
95
-
cd /path/to/bazel-orfs-local
96
-
bsp
97
-
```
98
-
99
-
3.**Configure targets** (`.bazelproject` in project root):
5.**Open in VSCode** and Metals will auto-connect to BSP
80
+
2.**Open in Editor**:
81
+
Open the project directory in your preferred editor (VS Code, Zed, etc.). The editor (via Metals) will detect the `.bazelproject` file and automatically initialize the Bazel BSP connection.
0 commit comments