CIRCT  20.0.0git
ESIOps.h
Go to the documentation of this file.
1 //===- ESIOps.h - ESI operations --------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // ESI Ops are defined in tablegen.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef CIRCT_DIALECT_ESI_ESIOPS_H
14 #define CIRCT_DIALECT_ESI_ESIOPS_H
15 
19 
22 
23 #include "mlir/IR/OpImplementation.h"
24 #include "mlir/Interfaces/InferTypeOpInterface.h"
25 #include "mlir/Interfaces/SideEffectInterfaces.h"
26 
27 namespace circt {
28 namespace esi {
29 /// Describes a service port. In the unidirection case, either (but not both)
30 /// type fields will be null.
32  hw::InnerRefAttr port;
33  ChannelBundleType type;
34 };
35 
36 // Check that the channels on two bundles match allowing for AnyType.
37 // NOLINTNEXTLINE(misc-no-recursion)
38 LogicalResult checkInnerTypeMatch(Type expected, Type actual);
39 /// Check that the channels on two bundles match allowing for AnyType in the
40 /// 'svc' bundle.
41 LogicalResult checkBundleTypeMatch(Operation *req,
42  ChannelBundleType svcBundleType,
43  ChannelBundleType reqBundleType,
44  bool skipDirectionCheck);
45 
46 } // namespace esi
47 } // namespace circt
48 
49 #include "circt/Dialect/ESI/ESIInterfaces.h.inc"
50 
51 #define GET_OP_CLASSES
52 #include "circt/Dialect/ESI/ESI.h.inc"
53 
54 #endif
LogicalResult checkBundleTypeMatch(Operation *req, ChannelBundleType svcBundleType, ChannelBundleType reqBundleType, bool skipDirectionCheck)
Check that the channels on two bundles match allowing for AnyType in the 'svc' bundle.
Definition: ESIOps.cpp:486
LogicalResult checkInnerTypeMatch(Type expected, Type actual)
Definition: ESIOps.cpp:393
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
Definition: esi.py:1
Describes a service port.
Definition: ESIOps.h:31
ChannelBundleType type
Definition: ESIOps.h:33
hw::InnerRefAttr port
Definition: ESIOps.h:32