Commit Graph

8551 Commits

Author SHA1 Message Date
Hailong Sun bacc4c8944
[Moore] Add extra class declaration for RefType. (#7244) 2024-06-27 17:27:10 +08:00
Andrew Young 19713ea85c
[FIRRTL] lower-layers.mlir: fix incorrect op name in test (#7232) 2024-06-26 15:01:40 -07:00
Girish Pai bf7c4e722e
Bump LLVM (#7223) 2024-06-26 13:19:37 -07:00
John Demme 20e08c092c
[ESI Runtime] Rename cmake targets, create full build one (#7238)
- Rename C++ library to ESICppRuntime.
- Create new ESIRuntime target which builds everything.
- Modify gRPC install to not include libz. (Avoids cmake warnings.)
2024-06-26 10:36:26 -07:00
Will Dietz 3f0dcf4405
[FIRRTL] Allow layers under when and match. (#7234)
Behavior is same as-if the contained operations were
not under a layer.
2024-06-26 08:35:10 -05:00
Morten Borup Petersen 03626d4a93
[ESI] Fix possible nullptr exception in RpcServer
`impl` isn't being default-initialized on the `RpcServer`, but instead constructed in `RpcServer::run`. Hence, if `RpcServer` is destructed before `run` is called, a nullptr exception may occur.
2024-06-26 14:19:26 +02:00
John Demme 551e1382bd
[CI] Revert to working image and disable ESI runtime (#7237)
Disable ESI runtime build until #7236 can be figured out.
2024-06-25 22:03:20 -07:00
John Demme cc51aa5dd0 [ESI Runtime] Fix python build 2024-06-24 21:01:46 +00: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 90954e2ae8 [NFC][ESI Runtime] Ridding cosim backend of std namespace
Deleted `using namespace std` and fixing the resulting errors.
2024-06-21 23:00:09 +00:00
John Demme dac5c69c25 [Python] Pybind11 version, setup.py documentation
Pybind11 2.10 has a bug related to binding enums. Somehow exposed by a
totally unrelated commit 62cb3d109e.
Upgrading past 2.10 fixed it.

Also fixing some setup.py comments.
2024-06-21 22:56:50 +00: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
Andrew Lenharth ac858d88a1 [NFC] Double anon namespace fix 2024-06-21 13:06:53 -05:00
Will Dietz d342694c7e [FIRRTL] LowerClasses: Fix ignored LogicalResult. 2024-06-21 08:55:40 -05:00
Hideto Ueno 45736b3f48 [CI] Run CI Cache GC more often and remove windows-key as well 2024-06-21 01:32:45 -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
Hideto Ueno f4920aa24b
[LowerClass] Run path tracking sequentially (#7221)
This fixes a race condition was introduced by [0] for now by removing parallesim
[0] d00a1d2bdf
2024-06-21 12:49:29 +09:00
Will Dietz e89910aac8 [LTL][NFC] Remove unused static method. 2024-06-20 13:50:12 -05:00
Amelia Dobis ef30e1f20a
[FIRRTL][Verif][LTL] Replace `ltl.disable` with an enable folded into `verif.assert` (#7150)
This PR gets rid of the `ltl.disable` op and intrinsic in favor of having an enable operand on the verif assert like ops. This made it trivial to fix an incorrect when condition folding for `AssertProperty`. Most of the PR relates to fixing the chaos that was caused by removing `ltl.disable`.
2024-06-20 11:24:37 -07:00
Andrew Young a3f726dc7f
README.md: remove link to broken build (#7222)
The build flow which attempted to build CIRCT against LLVM head was
deleted a long time ago, and our README should not be referencing it.
2024-06-20 10:55:28 -07:00
Hideto Ueno 62cb3d109e
[HW] Clean up HWTypes (#7209)
* Port some of customAssemblyFormat to declarative assembly-format. HW uses unconventional printer so we still need to use a custom directive though. 
* Replace manual `get` declarations with TypeBuilderWithInferredContext in several places
* Make banner consistent with others
2024-06-21 02:28:16 +09:00
Andrew Young 5087c1072a [FIRRTL] SpecializeLayers: rename test to be unique
This renames the name of a test case which is use with CHECK-LABEL,
which works best when the test names are all unique.
2024-06-20 09:35:57 -07:00
Andrew Young c3538f2344 [FIRRTL] SpecializeLayers: fix race condition
This pass processes all modules and layers in parallel, and since this
could result in the operation being deleted, could lead to crash when
two side-by-side ops are removed at the same time and try to modify each
other's next and previous pointers.  This changes the pass to handle the
part of the specialization which can delete the operation in serial.
2024-06-20 09:35:57 -07:00
Andrew Lenharth 2f382b2c5a
[FIRRTL] LHSType wrapper to indicate writable values. (#7117)
This is to enable a split between writable identifiers and readable identifiers.  This removed flow from the dialect eventually.
2024-06-20 10:21:00 -05:00
Hailong Sun c7f4557b4c
[Moore] Fix the stacking fault caused by cast<Variable> and remove unused headers. (#7219) 2024-06-20 15:56:11 +08:00
Hideto Ueno 13ba02f9e0 [CI] Set `actions: write` permission to GarbageCollectCICache github action
Also update the bash script
2024-06-19 23:30:50 -07:00
Hideto Ueno 40992c0e6a [CI] Actually remove cache for short integration tests
The github action looks working fine so actually turn on.
https://github.com/llvm/circt/actions/runs/9592557284/job/26451332772

This commit also increases the number to prevent erasing too much
2024-06-19 23:20:50 -07:00
Hideto Ueno 1aa88e33b6
[CI] Add a job to remove cache created by short integrations tests (#7214)
This PR adds a CI job that deletes caches created by short integrations tests. Almost 10GB is used by short integrations test and I think it's sufficient to have keep most recent ones. By doing that we should be able to keep cache for nightly-integration tests. This PR adds CI job that calls `gh cache delete $id` for results of `gh cache list -k ccache-short-clang-Release-ON-ON`.   

```
gh cache list -k ccache-short-clang-Release-ON-ON -L 50

Showing 27 of 27 caches in llvm/circt

ID     KEY                                         SIZE        CREATED               ACCESSED
66695  ccache-short-clang-Release-ON-ON-2024-0...  360.61 MiB  about 10 minutes ago  about 10 minutes ago
66694  ccache-short-clang-Release-ON-ON-2024-0...  360.33 MiB  about 15 minutes ago  about 15 minutes ago
66665  ccache-short-clang-Release-ON-ON-2024-0...  357.96 MiB  about 13 hours ago    about 22 minutes ago
66692  ccache-short-clang-Release-ON-ON-2024-0...  359.77 MiB  about 1 hour ago      about 1 hour ago
66675  ccache-short-clang-Release-ON-ON-2024-0...  354.45 MiB  about 8 hours ago     about 8 hours ago
66674  ccache-short-clang-Release-ON-ON-2024-0...  358.33 MiB  about 8 hours ago     about 8 hours ago
66673  ccache-short-clang-Release-ON-ON-2024-0...  359.41 MiB  about 8 hours ago     about 8 hours ago
66672  ccache-short-clang-Release-ON-ON-2024-0...  358.70 MiB  about 9 hours ago     about 8 hours ago
66667  ccache-short-clang-Release-ON-ON-2024-0...  358.85 MiB  about 11 hours ago    about 11 hours ago
66663  ccache-short-clang-Release-ON-ON-2024-0...  359.24 MiB  about 16 hours ago    about 13 hours ago
66664  ccache-short-clang-Release-ON-ON-2024-0...  381.06 MiB  about 13 hours ago    about 13 hours ago
66597  ccache-short-clang-Release-ON-ON-2024-0...  357.85 MiB  about 1 day ago       about 14 hours ago
66650  ccache-short-clang-Release-ON-ON-2024-0...  374.79 MiB  about 21 hours ago    about 16 hours ago
66661  ccache-short-clang-Release-ON-ON-2024-0...  376.57 MiB  about 17 hours ago    about 17 hours ago
66660  ccache-short-clang-Release-ON-ON-2024-0...  375.24 MiB  about 17 hours ago    about 17 hours ago
66659  ccache-short-clang-Release-ON-ON-2024-0...  377.82 MiB  about 17 hours ago    about 17 hours ago
66609  ccache-short-clang-Release-ON-ON-2024-0...  354.95 MiB  about 1 day ago       about 17 hours ago
66658  ccache-short-clang-Release-ON-ON-2024-0...  359.28 MiB  about 17 hours ago    about 17 hours ago
66651  ccache-short-clang-Release-ON-ON-2024-0...  358.97 MiB  about 20 hours ago    about 17 hours ago
66657  ccache-short-clang-Release-ON-ON-2024-0...  375.18 MiB  about 19 hours ago    about 19 hours ago
66656  ccache-short-clang-Release-ON-ON-2024-0...  364.31 MiB  about 20 hours ago    about 20 hours ago
66655  ccache-short-clang-Release-ON-ON-2024-0...  369.52 MiB  about 20 hours ago    about 20 hours ago
66654  ccache-short-clang-Release-ON-ON-2024-0...  363.87 MiB  about 20 hours ago    about 20 hours ago
66653  ccache-short-clang-Release-ON-ON-2024-0...  369.72 MiB  about 20 hours ago    about 20 hours ago
66652  ccache-short-clang-Release-ON-ON-2024-0...  374.89 MiB  about 20 hours ago    about 20 hours ago
66647  ccache-short-clang-Release-ON-ON-2024-0...  374.50 MiB  about 21 hours ago    about 21 hours ago
66649  ccache-short-clang-Release-ON-ON-2024-0...  361.49 MiB  about 21 hours ago    about 21 hours ago
```
2024-06-20 15:16:20 +09:00
cepheus 560257cd4c
[Moore] Support unconnected behavior (#7202) 2024-06-20 11:12:31 +08:00
John Demme 1f6c29fb64
[ESI][PyCDE] Callback service (#7153)
Call software functions from hardware.
2024-06-18 22:14:35 -07:00
Andrew Young 0e13467021 [FIRRTL] AnnotationSet: clang-tidy clean 2024-06-18 18:39:27 -07:00
Andrew Young 961d7467e7 [FIRRTL] AnnotationSet: remove unused functionality 2024-06-18 18:39:27 -07:00
Andrew Young 76ef34a530 [FIRRTL] AnnotationSet: add static variadic hasAnnotation
This annotation helper is more convenient to use due to being variadic,
and slightly more efficient as it will not create an empty array
attribute if the target has no annotations.
2024-06-18 18:39:27 -07:00
Andrew Young e2e8e6536b [FIRRTL] AnnotationSet: array attr is never null
We have a fast path when removing annotations that checks if the
underylying array attr is null, which should be impossible.  Remove this
code path and add some asserts.
2024-06-18 18:39:27 -07:00
Will Dietz 6f2aadcb02
[FIRRTL] Fast-path removeAnnotations for operations having none. (#7203)
Common pattern of walk/visit many operations looking for annotations
and removing along the way is taking considerable amount of time
in ArrayAttr::get.  It may make sense to rework AnnotationSet to
not promise a non-null ArrayAttr but for now add a fast-path
where it matters -- in removeAnnotations(Operation *op, predicate).
2024-06-18 14:52:16 -05:00
Prithayan Barua 6cbca83fe5
[HW] Move the CombDataFlow op interface from FIRRTL to HW (#7195)
Move the `CombDataFlow` op interface from `FIRRTL` to `HW` dialect.
The op interface is better suited to reside in the `HW` dialect, along with
 other interfaces like the `HWModuleLike`.
This makes it more convenient for non-`FIRRTL` dialects to implement ops using
 this interface, without introducing a new dependence on the `FIRRTL` dialect,
 assuming  `HW` dependence already exists.
2024-06-18 10:55:05 -07:00
Andrew Young f2d4bb5284 [FIRRTL][CheckCombLoops] Verify that detection works with region ops 2024-06-18 08:45:43 -07:00
Andrew Young b98d7f65e5 [FIRRTL][CheckCombLoops] rename test to match pass name, nfc 2024-06-18 08:45:43 -07:00
Andrew Young 6201aae645 [firtool] Move SpecializeLayers before LowerLayers
We can't specialize away layers after they are lowered, so this pass was
placed in the wrong spot in the pipeline. It was a last minute change to
move specialize layers after checking for combinational loops which
caused this bug, as we need to make sure that all diagnostic passes run
before we start deleting logic, otherwise we can hide errors from the
user.  This adds a few tests that layer specialization is working as
intended, and that it doesn't prevent detection of errors.
2024-06-18 08:45:22 -07:00
Andrew Young 28986b8b98 [firtool] verify that comb loop checking resolves last connects 2024-06-18 08:45:22 -07:00
Andrew Young baec1a1db1
[FIRRTL][SpecializeLayers] Fix incorrect CF leading to double free (#7200)
As a part of specializing layers we have to remove any HierPathOps which
included a reference to deleted instances.  If any member of the path
array is contained in the deleted references list, we need to delete the
op.  There was incorrect use of `continue` which caused us to continue
processing the path instead of skipping to the next path operation,
which could lead to a double free when multiple instances in the path
were removed.
2024-06-18 08:42:26 -07:00
fzi-hielscher d340ca137c
[NFCI][OM][SSP][SystemC] Refactor TableGen Pass includes (#7184) 2024-06-18 14:52:24 +02:00
fzi-hielscher 15ae39ec07
[NFCI][DC][FSM][Handshake][Pipeline] Refactor TableGen Pass includes (#7181) 2024-06-18 13:26:12 +02:00
Andrew Young a49e31d60e
[FIRRTL][SpecializeLayers] Update doc with proper attribute name (#7199) 2024-06-17 19:34:50 -07:00
Andrew Lenharth 6b6855910a [NFC] Add more clang options. From my reading of the docker file, most of them don't actually work since most clang versions are not installed. But regardless, do this in anticipation of different clang versions 2024-06-17 14:35:48 -05:00
Andrew Lenharth 89bc24690d [NFC][FIRRTL] Narrow type for SizedType. 2024-06-17 11:28:48 -05:00
Andrew Lenharth 0046bab73a [NFC][FIRRTL] Narrow SizedPassiveType to FIRRTLBaseType 2024-06-17 11:23:59 -05:00
Hideto Ueno 97da411151
[ExportVerilog] Fix two state type emission of aggregate types (#7189)
This PR fixes an issue that `emitAsTwoStateType` flag was not propagated for aggregate types.

This PR also fixes a bug that ctypes (int/shortint etc) are used as an inner type of packed types (e.g. `int [2:0]` is invalid) according to SV spec 6.8.
2024-06-18 01:14:50 +09:00
Hideto Ueno d1545f4f5a [LowerDPI] Fix the incorrect input type checking
LowerDPI checks that improted DPI functions have the same function
signatures over their call sites. This fixes a bug that mistakenly
regards operand types of call op as input types. Call op has clock and
enable operands so operand types are not equal to input types of
DPI functions.
2024-06-17 08:44:51 -07:00