Commit Graph

483 Commits

Author SHA1 Message Date
John Demme 585dc1aecc [ESI] Manifest: move version num back, fix bug
Revert version number to 0 to indicate that the JSON schema is not
stable. Also, fix a bug in ROM creation. Bug fix will be tested in a
forthcoming PR.
2024-07-09 09:18:22 +00:00
John Demme 4a452e010c
[ESI] Add read-side MMIO back (#7282)
Use ESI channels/bundles to implement MMIO reads. Replaces the low-level
AXI interface. Keep the XRT AXI-based interface as-is for now.
2024-07-05 02:22:59 -07:00
John Demme be4484854b [PyCDE] Fixing ESI-based integration tests 2024-07-03 12:59:13 +00:00
John Demme dfeb6d7bfb
[ESI Runtime] Incorporate RPC server into ESICppRuntime (#7241)
Since the gRPC server is now going to be used in multiple places AND the RPC server now uses ports 'n' stuff from ESICppRuntime, it is appropriate to move RpcServer into ESICppRuntime proper. This also significantly simplifies the build.

No new code, just movement and CMake changes.
2024-07-01 07:01:08 -07:00
John Demme 34c73c35c8
[ESI Runtime] Read ports now invoke callbacks (#7186)
We've switched from a polling 'pull' method to a callback-based 'push'
mechanism for read ports. Polling (via std::futures) is built on top of
the push mechanism.

The read-ordering problem has also been fixed by using std::futures
exclusively for polling schemes. They also allow for poll-wait-notify
schemes without any changes on our part.
2024-06-24 11:38:18 -07:00
John Demme 88eeb265f4
[ESI Runtime] Replace Cap'nProto with gRPC (#7217)
After spending a truly obnoxious amount of time fighting capnp and
libkj, we made the decision to switch to another RPC system. We're no
longer modeling and serializing message types in Capnp and we don't need
the performance which capnp/libkj RPC promises, so there's really no
need for the additional complexity. A slower system which is thread safe
should work fine.

This commit breaks the build in a pretty horrible way and is not
intended to be merged on its own. It simply breaks up the diff.
2024-06-21 14:22:54 -07:00
Mike Urbach 76d376d40d [OM] Use Object Location in partially evaluated ObjectValue.
When we create partially evaluated ObjectValues, we should use the
Object's Location, rather than the location of the field being
evaluated.
2024-06-20 21:12:20 -07:00
Mike Urbach ff6ebe25cc [OM] Expose ObjectValue Location in the Python bindings.
This exposes the ObjectValue Location in the Python bindings using the
C API for MlirLocation. The Location is useful for debugging the
source that created the Object in the first place.
2024-06-20 21:12:20 -07:00
John Demme 1f6c29fb64
[ESI][PyCDE] Callback service (#7153)
Call software functions from hardware.
2024-06-18 22:14:35 -07:00
Schuyler Eldridge d9a3a95cca
[FIRRTL] Bump minimum to 2.0.0, remove partial conect (#5075)
Bump minimum supported FIRRTL to 2.0.0.
"FIRRTL version" is now required as a result.

Remove parsing of the FIRRTL partial connect operator ("<-").  This has,
for a very long time, been almost unreachable from Chisel-emitted FIRRTL
and is now impossible to emit from Chisel.  This has also been completely
removed from the FIRRTL spec in version 2.0.0.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Co-authored-by: Will Dietz <will.dietz@sifive.com>
2024-06-11 11:07:18 -05:00
John Demme 965f6b0407 [Python] Add module name to backedges remaining error message 2024-06-11 03:43:25 +00:00
Morten Borup Petersen 0bf789e607
[Ibis] Divorce symbol and actual names in class and container ops (#7123)
... while factoring out `InnerSymbol`+name logic into a new interface that is also used by Ibis port-like ops. This model could probably be factored into the `hw` dialect, seeing as we're also eventually going to divorce symbol names and actual names in `hw.module`.

Also adds de-aliasing logic to `ContainersToHW`, which is required given that `hw.module` doesn't yet split its symbol and name (#7023).
2024-06-10 10:06:16 +02:00
Luisa Cicolini fa0e61420f
[SMT] Added support for :pattern attribute (#6976) 2024-05-28 11:13:15 +02:00
John Demme cd22351200
[ESI][Runtime] Refactor cosim backend to be thread safe (#7059)
Previously, the cosim backend only supported single threaded workloads
since the RPC calls would happen in the client calling thread. Now, spin
up a "capnp" thread to do all of the RPC interactions.
2024-05-16 19:58:19 -07:00
Martin Erhart 481cb60add
[CombToSMT] Make result of div-by-zero undefined (#7025)
This adapts the conversion pass to match the recently agreed upon definition for division by zero. Integration tests for circt-lec are added to check the behavior. Note that two syntactically equivalent modules are not considered equivalent if they aren't guaranteed to deterministically produce the same outputs. Alternatively, we could consider two undefined output values equivalent by modeling each value as a pair of a boolean and the bit-vector where the boolean determines if the value is undefined, then two outputs are equivalent if either the boolean is true or the boolean is false and the bitvectors match. There are probably use-cases for both, so maybe we'd want a flag to let the user decide.
2024-05-14 08:09:34 +02:00
Hideto Ueno 4a240b9f50
[OM] Add IsolatedFromAbove to OMClass (#7020)
This adds IsolatedFromAbove to OMClassOp and OMClassExternOp. It should make local verification run parallelly.
2024-05-13 15:39:28 +09:00
fzi-hielscher 98db979403
[HWToSMT][circt-lec] Resolve transitive !smt.bool -> i1 -> !smt.bv<1> casts. (#7006) 2024-05-09 23:36:42 +02:00
Martin Erhart 4bf56eed16
[CombToArith] Fix coarsening of division by zero UB (#6945) 2024-05-06 15:59:36 +02:00
Martin Erhart 8e36cea43f
[SMT] Add quantifier support to LLVM lowering (#6973) 2024-05-02 10:09:14 +02:00
John Demme f424ea325c [Arc] Add missing depend to integration tests
Fixes #6948
2024-04-23 21:30:27 +00:00
John Demme 20ef1a2cb1 [ESI][runtime] Opt out of cosim and error out if capnp not found
Fixes a runtime link error on non-capnp builds. Provides an option to
disable ESI cosim. If enabled (the default), produce a CMake error if
capnp is not found.
2024-04-23 21:15:13 +00:00
Martin Erhart 7598a8e067
[circt-lec] Port to SMT dialect based compiler pipeline (#6908) 2024-04-21 08:06:39 +02:00
Martin Erhart da900a210b
[SMTToLLVM] Add support for most expressions (#6905) 2024-04-20 11:21:59 +02:00
Martin Erhart 5cf1ff57f4
[SMT] Add lowering to LLVM IR (#6902) 2024-04-20 10:11:47 +02:00
Martin Erhart 3a08dce574 [ExportSMTLIB] Fix printing of too many closing parentheses
The number of open parentheses should not be propagated to quantifier bodies and the first child expression of 'let' which declares the bound variable
2024-04-20 09:21:17 +02:00
Luisa Cicolini b4b4a7b6b1
[SMT] Added weight attribute support for ExportSMTLIB (#6920) 2024-04-20 08:57:46 +02:00
Morten Borup Petersen 6d4939d89d
[Ibis] Divorce port name (hints) from port symbol names (#6909)
Port symbols now have no effect on the eventual port name of a module. This also implies that multiple ports can have the same namehint, and will be uniqued when lowering `ibis.container` to `hw.module` (see new test in `containers_to_hw.mlir`).
2024-04-11 10:27:01 +02:00
John Demme 83dd12ec37
[Ibis] Introduce 'ibis.design' (#6835)
* Revert "[Ibis] Split ContainerOp in two (#6739)"

This reverts commit d17f2f1a1b.

* [Ibis] Introduce 'ibis.design'

Encapsulate everything into a new op. It's an InnerSymbolTable so that
we can identify _everything_ with inner symbols.

Partial progress.

* Hopefully avoid some msvc warnings

* add topLevel attr to containerop

* bug fixes

* Nest createContainerizePass inside of <ibis::DesignOp>

* Work

* Work

* Working

* Self review

---------

Co-authored-by: Blake Pelton <blakep@microsoft.com>
Co-authored-by: Morten Borup Petersen <morten_bp@live.dk>
2024-04-04 11:55:02 +02:00
Martin Erhart 87020b2ed4
[SMT] Add SMT-LIB export translation (#6870) 2024-03-27 08:57:21 +01:00
Théo Degioanni 83a8292085
[arcilator] Introduce integrated JIT for simulation execution (#6783)
This PR adds a JIT runtime for arcilator, backed by MLIR's ExecutionEngine. This JIT allows executing `arc.sim` operations directly from the arcilator binary.
2024-03-18 10:27:08 +00:00
Mike Urbach 1cc1069969
[OM] Add C API and Python bindings for IntegerAttr to string. (#6787)
Both the upstream MLIR IntegerAttr and OM IntegerAttr are backed by an
arbitrary precision integer. However, the upstream Python bindings
don't have any mechanism to return an integer larger than 64 bits back
to Python, even though Python ints are also arbitrary precision
integers.

To support this, we can handle this where we explicitly convert OM
IntegerAttrs to Python values. The simplest thing is to print a string
representation of the arbitrary precision integer, and parse that to a
Python int. This adds the necessary C API and Python binding for a "to
string" method, and uses it in the attribute_to_var function.

There are smarter ways we can handle the conversion, but the "to
string" API seems generally useful, so I'm using that in the
conversion for now.
2024-03-07 18:46:37 -07:00
Mike Urbach 675716b168
[OM] Add C API and Python bindings for EvaluatorValue::Reference. (#6785)
In some OM dialect constructs, it is possible to receive
EvaluatorValue::Reference values. In the Python bindings, where we are
converting an EvaluatorValue to a Python value, we need to dereference
the Reference, to get at the underlying EvaluatorValue that was set
during evaluation.

This adds the necessary C APIs, and updates the Python bindings to use
them. If we encounter a Reference, we dereference it and recursively
call the converter function.

A Python test was added using an example IR from the Evaluator unit
tests, which delays evaluation and introduces references.
2024-03-05 15:49:35 -07:00
Schuyler Eldridge 077826e06c
[capi][python] Add Emit Dialect
Add the emit dialect to the C-API and to Python.  This is both missing and
is necessary for downstream Python tooling to not break.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2024-03-02 17:14:23 -05:00
John Demme 113fad9b25
[ESI] Move entirely over to the runtime for testing (#6764)
Removes:
- esi-cosim-runner.py
- all of the raw capnp based tests
- the system test (subsumed by other tests)
- cmake target esi-collateral
- runtime distribution from PyCDE
2024-02-28 22:29:29 -08:00
John Demme ef0f434b7c [ESI][Runtime] Rename python module to esiaccel
To be consistent with the wheel.
2024-02-28 03:21:12 +00:00
John Demme 858b8fbc83
[ESI][Runtime] Use `std::future` in channel reads and func calls (#6723) 2024-02-20 08:19:02 -08:00
Nandor Licker 43616805dd
[HW] Encode the option group name in instance choice ops (#6645)
Also renamed `targetNames` to `caseNames` to better match the FIRRTL-level terminology
2024-02-14 13:08:57 +02:00
Will Dietz 4001ec807e
Make circt-verilog available to integration tests. (#6685) 2024-02-12 14:31:46 -05:00
Andrew Lenharth b790c03db3
LLVM bump (#6662)
Co-authored-by: Mike Urbach <mikeurbach@gmail.com>
2024-02-12 10:21:30 -07:00
John Demme 26ac77378e
[ESI][Runtime] Adding support for FuncService (#6673)
Fleshing out support for standard services and addition to the manifest.
2024-02-08 13:41:53 -08:00
Nandor Licker afff815c55
[HW] Lower hw.instance_choice to SV (#6624) 2024-02-05 17:57:08 +02:00
John Demme 6212d2ed21
[ESI] Simplify services by standardizing on `to_client` ports (#6633)
Having a direction on the service ports which just reversed the bundle directions was far too complicated. Standardize on the service always packing the bundle and sending it to the client. Standardizing that way has the additional benefit that this was already the canonical form which all the service generators saw. Remove all to_client verbiage from the IR.
2024-02-01 11:58:50 -08:00
John Demme 5cdff6351f [Python] Register the comb dialect lowerings 2024-01-31 21:20:11 +00:00
John Demme 9890d94a2d [OM][Python] Fix typehint in integration test
In Python3.8, must use `typing.Dict` to subscript types.
2024-01-11 01:11:49 +00:00
John Demme 81de1fe819
[ESI][Runtime] Add type serialization support to Python bindings (#6541)
- Mirror the C++ design and type hierarchy.
- Add [de-]serialization support to/from Python objects.
- Add support for `void` type.
2023-12-28 22:04:35 -08:00
John Demme d990880ffd
[ESI][Runtime] Add design hierarchy printing to esiquery (#6540)
And add a test as well.
2023-12-28 20:01:33 -08:00
John Demme 7910a1e110
[NFC][ESI] Refactor runtime headers and design hierarchy (#6503)
- Rename Accelerator to what it really is: an AcceleratorConnection.
- Rename "Design" to "HWModule". Closer, but a slight overloading of
terms.
- Add "Accelerator" as the root of a design hierarchy. It owns or shares
ownership of everything "immortal".
2023-12-07 17:06:16 -08:00
Jack Koenig b8241c17e8
Bump LLVM (#6494)
* MLIR removed some uses of `const`, especially `.replaceAllUsesWith`
* In MLIR emitc, `call` was renamed to `call_opaque`
2023-12-06 13:27:49 -08:00
John Demme efd8a2beed
[ESI][Integration test] Fix requires and run commands (#6480)
Add rtl-sim to requires and %python before cosim runner.
2023-12-05 10:41:09 -08:00
John Demme 25b69dc4f4
[ESI][Runtime] Filling out the type system (#6476)
Implementing missing classes and exposing to Python. Will build to
proper type-based serialization in Python.
2023-11-30 15:57:21 -08:00