Skip to content

Commit

Permalink
[ESI] Remove last references to capnp (#7315)
Browse files Browse the repository at this point in the history
The cosim document was 90% out of date. Added a note regarding
documentation status.
  • Loading branch information
teqdruid authored Jul 12, 2024
1 parent b68c01d commit 462f6b5
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pycdePublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Build additional c++ deps
shell: pwsh
run: |
& "${env:VCPKG_INSTALLATION_ROOT}/vcpkg" --triplet x64-windows install zlib capnproto
& "${env:VCPKG_INSTALLATION_ROOT}/vcpkg" --triplet x64-windows install zlib
- name: Get CIRCT
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions docs/Dialects/ESI/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

The Elastic Silicon Interconnect dialect aims to aid in accelerator system construction.

**WARNING**: The ESI dialect has evolved significantly since its inception while
these documents have not. As such, large parts are significantly out-of-date.

[TOC]

## Application channels
Expand Down
166 changes: 0 additions & 166 deletions docs/Dialects/ESI/cosim.md

This file was deleted.

17 changes: 7 additions & 10 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,13 @@ dependencies are installed on your system. They are:
- libfl2 # Ubuntu only (ignore if gives error)
- libfl-dev # Ubuntu only (ignore if gives error)

7) **Install Cap'nProto** (optional, affects ESI dialect only)

Some of the ESI dialect code requires [libcapnp](https://capnproto.org/), 0.9.1 or newer.
(Specifically, the [cosimulation](Dialects/ESI/cosim.md) component.) Most of
the ESI cosim integration tests also require the python bindings: pycapnp.
The `utils/get-capnp.sh` script downloads, compiles, and installs a known
good version to a directory within the circt source code. It optionally
installs pycapnp via 'pip3'. The capnp compile requires libtool.
Alternatively, you can use a docker image we provide via
`utils/run-docker.sh`.
7) **Install GRPC** (optional, affects ESI runtime only)

The ESI runtime requires GRPC for cosimulation. The `utils/get-grpc.sh` script
installs a known good version of GRPC to a directory within the CIRCT source
code. Alternatively, you can install GRPC using your package manager, though the
version may not be compatible with the ESI runtime so results may vary.


8) **Install OR-Tools** (optional, enables additional schedulers)

Expand Down
5 changes: 2 additions & 3 deletions docs/PyCDE/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ python -m pip install -r frontends/PyCDE/python/requirements.txt

Although not scrictly needed for PyCDE develoment, scripts for some tools you
might want to install are located in utils/
(Cap'n Proto, Verilator, OR-Tools):
(Verilator, OR-Tools):

```bash
utils/get-capnp.sh
utils/get-verilator.sh
utils/get-or-tools
utils/get-or-tools.sh
```

Install PyCDE with CMake. PyCDE requires cmake version >= 3.21:
Expand Down
28 changes: 0 additions & 28 deletions frontends/PyCDE/auditwheel.sh

This file was deleted.

1 change: 0 additions & 1 deletion frontends/PyCDE/integration_test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ config.yosys_path = "@YOSYS_PATH@"
config.quartus_path = "@QUARTUS_PATH@"
config.vivado_path = "@VIVADO_PATH@"
config.questa_path = "@QUESTA_PATH@"
config.esi_capnp = "@ESI_CAPNP@"
config.esi_runtime = "@ESI_RUNTIME@"
config.esi_runtime_path = "@ESIRuntimePath@"
config.iverilog_path = "@IVERILOG_PATH@"
Expand Down
3 changes: 1 addition & 2 deletions frontends/PyCDE/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ manylinux-x86_64-image = "ghcr.io/circt/images/pycde-build"

[tool.cibuildwheel.linux]
# Use our internal auditwheel script so as to not mess up the collateral.
repair-wheel-command = "frontends/PyCDE/auditwheel.sh {dest_dir} {wheel}"
environment-pass = [
"SCCACHE_GHA_ENABLED",
"ACTIONS_CACHE_URL",
Expand All @@ -39,7 +38,7 @@ environment-pass = [
"SETUPTOOLS_SCM_DEBUG",
"BUILD_TYPE",
"RUN_TESTS",
"COMPILER_LAUNCHER"
"COMPILER_LAUNCHER",
]

[project]
Expand Down
6 changes: 5 additions & 1 deletion frontends/PyCDE/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ def run(self):
"-DCIRCT_ENABLE_FRONTENDS=PyCDE",
"-DLLVM_EXTERNAL_PROJECTS=circt",
"-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR={}".format(circt_dir),
"-DESI_RUNTIME=ON",
]
# ESI runtime not currently supported on Windows.
if os.name == "nt":
cmake_args += ["-DESI_RUNTIME=OFF"]
else:
cmake_args += ["-DESI_RUNTIME=ON"]
if "COMPILER_LAUNCHER" in os.environ:
cmake_args += [
f"-DCMAKE_C_COMPILER_LAUNCHER={os.environ['COMPILER_LAUNCHER']}",
Expand Down
6 changes: 0 additions & 6 deletions frontends/PyCDE/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,3 @@ install(IMPORTED_RUNTIME_ARTIFACTS PyCDE_CIRCTPythonCAPI
DESTINATION python_packages/pycde/circt/_mlir_libs
COMPONENT PyCDE
)
install(RUNTIME_DEPENDENCY_SET PyCDE_RUNTIME_DEPS
DESTINATION python_packages/pycde/circt/_mlir_libs
PRE_EXCLUDE_REGEXES .*
PRE_INCLUDE_REGEXES capnp kj
COMPONENT PyCDE
)
1 change: 0 additions & 1 deletion frontends/PyCDE/test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ config.yosys_path = "@YOSYS_PATH@"
config.quartus_path = "@QUARTUS_PATH@"
config.vivado_path = "@VIVADO_PATH@"
config.questa_path = "@QUESTA_PATH@"
config.esi_capnp = "@ESI_CAPNP@"
config.iverilog_path = "@IVERILOG_PATH@"
config.bindings_python_enabled = @CIRCT_BINDINGS_PYTHON_ENABLED@

Expand Down
4 changes: 2 additions & 2 deletions lib/Dialect/ESI/runtime/cosim_dpi_server/Cosim_DpiPkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import "DPI-C" sv2cCosimserverEpRegister =
function int cosim_ep_register(
// The endpoint ID.
input string endpoint_id,
// The capnp type id which the _RPC client_ is sending us.
// The ESI type id which the _RPC client_ is sending us.
input string from_host_type_id,
// The send types max size, in bytes.
input int from_host_type_size,
// The capnp type id which we are sending to the _RPC client_.
// The ESI type id which we are sending to the _RPC client_.
input string to_host_type_id,
// The recv types max size, in bytes.
input int to_host_type_size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void log(char *epId, bool toClient, const MessageData &msg) {
// Separate 32-bit words.
if (i % 4 == 0 && i > 0)
fprintf(logFile, " ");
// Separate 64-bit words (capnp word size)
// Separate 64-bit words
if (i % 8 == 0 && i > 0)
fprintf(logFile, " ");
fprintf(logFile, " %02x", b);
Expand Down
2 changes: 1 addition & 1 deletion lib/Dialect/ESI/runtime/cpp/lib/backends/Cosim.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- Cosim.cpp - Connection to ESI simulation via capnp RPC -------------===//
//===- Cosim.cpp - Connection to ESI simulation via GRPC ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand Down
4 changes: 0 additions & 4 deletions test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@
tools.append('verilator')
config.available_features.add('verilator')

# Enable ESI's Capnp tests if they're supported.
if config.esi_capnp != "":
config.available_features.add('capnp')

if config.zlib == "1":
config.available_features.add('zlib')

Expand Down
1 change: 0 additions & 1 deletion test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ config.circt_obj_root = "@CIRCT_BINARY_DIR@"
config.circt_tools_dir = "@CIRCT_TOOLS_DIR@"
config.circt_shlib_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
config.verilator_path = "@VERILATOR_PATH@"
config.esi_capnp = "@ESI_CAPNP@"
config.zlib = "@HAVE_ZLIB@"
config.scheduling_or_tools = "@SCHEDULING_OR_TOOLS@"
config.llhd_sim_enabled = @CIRCT_LLHD_SIM_ENABLED@
Expand Down

0 comments on commit 462f6b5

Please sign in to comment.