CIRCT  18.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  enum class Direction { toClient, toServer };
33 
34  hw::InnerRefAttr port;
36  ChannelBundleType type;
37 
38  StringRef directionAsString() {
39  return direction == ServicePortInfo::Direction::toClient ? "toClient"
40  : "toServer";
41  }
42 };
43 
44 } // namespace esi
45 } // namespace circt
46 
47 #include "circt/Dialect/ESI/ESIInterfaces.h.inc"
48 
49 #define GET_OP_CLASSES
50 #include "circt/Dialect/ESI/ESI.h.inc"
51 
52 #endif
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
Definition: DebugAnalysis.h:21
Definition: esi.py:1
Describes a service port.
Definition: ESIOps.h:31
StringRef directionAsString()
Definition: ESIOps.h:38
ChannelBundleType type
Definition: ESIOps.h:36
hw::InnerRefAttr port
Definition: ESIOps.h:34