Skip to content

Commit dcbe132

Browse files
Merge branch 'main' into feature/hw-vectorization-pass
2 parents 1f3df90 + 220b5fb commit dcbe132

File tree

266 files changed

+11314
-3533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+11314
-3533
lines changed

.github/copilot-instructions.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copilot build & test guidance
2+
3+
- Default to the integration docker image in `CIRCT_INTEGRATION_IMAGE` (set by the Copilot setup workflow and the `utils/run-docker.sh` default; currently `ghcr.io/circt/images/circt-integration-test:v19.2`) when compiling or testing.
4+
- Run inside that image via `./utils/run-docker.sh ./utils/run-tests-docker.sh "$CIRCT_INTEGRATION_IMAGE"` or `docker run` with the repo root bind-mounted.
5+
- When cloning or checking out, ensure submodules are present (`git submodule update --init --recursive` if needed).
6+
- Configure builds from the repo root with Ninja, matching the README:
7+
```
8+
cmake -G Ninja llvm/llvm -B build \
9+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
10+
-DLLVM_ENABLE_ASSERTIONS=ON \
11+
-DLLVM_TARGETS_TO_BUILD=host \
12+
-DLLVM_ENABLE_PROJECTS=mlir \
13+
-DLLVM_EXTERNAL_PROJECTS=circt \
14+
-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR=$PWD \
15+
-DLLVM_ENABLE_LLD=ON
16+
```
17+
- Build everything with `ninja -C build check-circt`; use `ninja -C build bin/circt-opt` or `ninja -C build bin/firtool` for tool-only builds.
18+
- Keep Python bindings enabled when needed via `-DMLIR_ENABLE_BINDINGS_PYTHON=ON -DCIRCT_BINDINGS_PYTHON_ENABLED=ON`.
19+
- For PyCDE and the ESI runtime, add `-DCIRCT_ENABLE_FRONTENDS=PyCDE -DESI_RUNTIME=ON` (keep Python bindings on). Test with `ninja -C build check-pycde` (PyCDE only) and `ninja -C build check-pycde-integration` (these integration tests exercise both PyCDE and the ESI runtime and are the only ESIRuntime tests).
20+
- Prefer the integration image and the setup steps workflow for reliable dependencies; only fall back to host builds when explicitly requested.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Copilot setup steps
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
copilot-setup-steps:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Pre-pull integration docker image
17+
env:
18+
CIRCT_INTEGRATION_IMAGE: ghcr.io/circt/images/circt-integration-test:v19.2
19+
run: |
20+
echo "CIRCT_INTEGRATION_IMAGE=$CIRCT_INTEGRATION_IMAGE" >> $GITHUB_ENV
21+
docker pull "$CIRCT_INTEGRATION_IMAGE"
22+
- name: Summarize defaults
23+
run: |
24+
{
25+
echo "### CIRCT Copilot setup"
26+
echo "- Integration image: $CIRCT_INTEGRATION_IMAGE"
27+
echo "- Default build directory: build"
28+
} >> "$GITHUB_STEP_SUMMARY"

.github/workflows/esiRuntimePublish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
config:
20-
- os: ubuntu-24.04
21-
cibw_build: cp38-manylinux_x86_64
2220
- os: ubuntu-24.04
2321
cibw_build: cp39-manylinux_x86_64
2422
- os: ubuntu-24.04
@@ -29,8 +27,8 @@ jobs:
2927
cibw_build: cp312-manylinux_x86_64
3028
- os: ubuntu-24.04
3129
cibw_build: cp313-manylinux_x86_64
32-
- os: windows-2022
33-
cibw_build: cp38-win_amd64
30+
- os: ubuntu-24.04
31+
cibw_build: cp314-manylinux_x86_64
3432
- os: windows-2022
3533
cibw_build: cp39-win_amd64
3634
- os: windows-2022
@@ -41,6 +39,8 @@ jobs:
4139
cibw_build: cp312-win_amd64
4240
- os: windows-2022
4341
cibw_build: cp313-win_amd64
42+
- os: windows-2022
43+
cibw_build: cp314-win_amd64
4444

4545
steps:
4646
- name: Get CIRCT
@@ -68,7 +68,7 @@ jobs:
6868
& "${env:VCPKG_INSTALLATION_ROOT}/vcpkg" --triplet x64-windows install zlib grpc
6969
7070
- name: Install cibuildwheel
71-
run: python -m pip install cibuildwheel==2.23.3
71+
run: python -m pip install cibuildwheel==3.3.0
7272

7373
- name: Build wheels
7474
if: runner.os != 'Windows'

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ For more information, please see our longer [charter document](docs/Charter.md).
5454

5555
## Getting Started
5656

57-
To get started hacking on CIRCT quickly, run the following commands:
57+
To get started hacking on CIRCT quickly, run the following commands. If you want to include `circt-verilog` in the build, add `-DCIRCT_SLANG_FRONTEND_ENABLED=ON` to the cmake call:
5858

5959
```sh
6060
# Clone the repository and its submodules
@@ -69,14 +69,24 @@ cmake -G Ninja llvm/llvm -B build \
6969
-DLLVM_ENABLE_PROJECTS=mlir \
7070
-DLLVM_EXTERNAL_PROJECTS=circt \
7171
-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR=$PWD
72+
-DLLVM_ENABLE_LLD=ON
73+
```
7274

73-
# Run the build
75+
If you want to build everything about the CIRCT tools and libraries, run below command(also runs all tests):
76+
```
7477
ninja -C build check-circt
7578
```
7679

77-
The above builds the CIRCT tools and libraries and runs all regression tests.
78-
If you want to include `circt-verilog` in the build, add `-DCIRCT_SLANG_FRONTEND_ENABLED=ON` to the cmake call.
79-
You can ask ninja to only build a specific library or tool, such as `ninja -C build circt-opt`.
80+
If you want to only build a specific part, for example the `circt-opt` tool:
81+
```sh
82+
ninja -C build bin/circt-opt
83+
```
84+
85+
or the `firtool` tool:
86+
```sh
87+
ninja -C build bin/firtool
88+
```
89+
8090
This will only build the necessary parts of LLVM, MLIR, and CIRCT, which can be a lot quicker than building everything.
8191

8292
### Dependencies

docs/Dialects/FIRRTL/FIRRTLAnnotations.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,20 +1192,24 @@ Example:
11921192

11931193
#### ExtractGrandCentralAnnotation
11941194

1195-
| Property | Type | Description |
1196-
| --- | --- | --- |
1197-
| class | string | sifive.enterprise.grandcentral.ExtractGrandCentralAnnotation |
1198-
| directory | string | Directory where Grand Central outputs go, except a bindfile |
1199-
| filename | string | Filename with full path where the bindfile will be written |
1195+
| Property | Type | Description |
1196+
| --- | --- | --- |
1197+
| class | string | sifive.enterprise.grandcentral.ExtractGrandCentralAnnotation |
1198+
| directory | string | Directory where Grand Central outputs go, except a bindfile |
1199+
| filename | string | Optional filename with full path where the bindfile will be written |
12001200

12011201
This annotation controls where to "extract" Grand Central collateral from the
1202-
circuit. This annotation is mandatory and can only appear once if the full
1202+
circuit. This annotation is mandatory and can only appear once if the full
12031203
Grand Central transform pipeline is run in the SFC. (An error is generated by
12041204
the `ExtractGrandCentralCode` transform.)
12051205

12061206
The directory member has no effect on the filename member, i.e., the directory
12071207
will not be prepended to the filename.
12081208

1209+
The filename is optional. When specified, all binds will be emitted to that
1210+
file. When omitted, each module will have an associated bindfile in `directory`
1211+
named `<module>-bind.sv`.
1212+
12091213
Example:
12101214
```json
12111215
{

docs/Dialects/HW/RationaleHW.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ several major contributions:
4444
1) The `hw` dialect provides unifying structure and
4545
abstractions that are useful for a wide range of hardware modeling problems.
4646
It allows other dialects to "mix in" with it to provide higher level
47-
functionality. `hw` is roughly akin to the "std" dialect in MLIR (but better
48-
curated).
47+
functionality.
4948
2) The `comb` dialect provides a common set of operations for combinational
5049
logic. This dialect is designed to allow easy analysis and transformation.
5150
3) The `sv` dialect provides direct access to a wide variety

docs/GettingStarted.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ To get something that runs fast, use `-DCMAKE_BUILD_TYPE=Release` or
107107
you want debug info to go with it. `Release` mode makes a very large difference
108108
in performance.
109109

110+
To use the verilog frontend add `-DCIRCT_SLANG_FRONTEND_ENABLED=ON`.
111+
110112
If you plan to use the Python bindings, you should also specify
111113
`-DCIRCT_BINDINGS_PYTHON_ENABLED=ON`.
112114

docs/PythonBindings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Running this script through `python3 silicon.py` should print the following MLIR
107107

108108
```mlir
109109
module {
110-
hw.module @magic(%a: i42, %b: i42) -> (c: i42) {
110+
hw.module @magic(in %a: i42, in %b: i42, out c: i42) {
111111
%0 = comb.xor %a, %b : i42
112112
hw.output %0 : i42
113113
}

docs/VerilogGeneration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ The current set of "tool capability" Lowering Options is:
9191
like `assert`, `assume`, and `cover` will always be emitted with a label. If
9292
the statement has no label in the IR, a generic one will be created. Some EDA
9393
tools require verification statements to be labeled.
94+
* `disallowDeclAssignments` (default=`false`). If true, always emit assignments
95+
(both continuous and blocking) separately rather than inlining them in net and
96+
variable declarations.
9497

9598
The current set of "style" Lowering Options is:
9699

0 commit comments

Comments
 (0)