CIRCT 23.0.0git
Loading...
Searching...
No Matches
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
27namespace circt {
28namespace esi {
29
30/// Trait marking an ESI op that operates on ESI types (e.g. data windows) and
31/// must get lowered after all the "wrapper" ESI types (e.g. channels).
32template <typename ConcreteType>
34 : public mlir::OpTrait::TraitBase<ConcreteType, OperatesOnESITypes> {};
35
36/// Describes a service port. In the unidirection case, either (but not both)
37/// type fields will be null.
39 hw::InnerRefAttr port;
40 ChannelBundleType type;
41};
42
43// Check that two types match, allowing for AnyType in 'expected'.
44// NOLINTNEXTLINE(misc-no-recursion)
45LogicalResult checkInnerTypeMatch(Type expected, Type actual);
46/// Check that the channels on two bundles match allowing for AnyType in the
47/// 'svc' bundle.
48LogicalResult checkBundleTypeMatch(Operation *req,
49 ChannelBundleType svcBundleType,
50 ChannelBundleType reqBundleType,
51 bool skipDirectionCheck);
52
53} // namespace esi
54} // namespace circt
55
56#include "circt/Dialect/ESI/ESIInterfaces.h.inc"
57
58#define GET_OP_CLASSES
59#include "circt/Dialect/ESI/ESI.h.inc"
60
61#endif
Trait marking an ESI op that operates on ESI types (e.g.
Definition ESIOps.h:34
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:524
LogicalResult checkInnerTypeMatch(Type expected, Type actual)
Definition ESIOps.cpp:431
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition esi.py:1
Describes a service port.
Definition ESIOps.h:38
ChannelBundleType type
Definition ESIOps.h:40
hw::InnerRefAttr port
Definition ESIOps.h:39