CIRCT  19.0.0git
Moore.h
Go to the documentation of this file.
1 //===- Moore.h - C interface for the Moore dialect ----------------*- 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 #ifndef CIRCT_C_DIALECT_MOORE_H
10 #define CIRCT_C_DIALECT_MOORE_H
11 
12 #include "mlir-c/IR.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 //===----------------------------------------------------------------------===//
19 // Dialect
20 //===----------------------------------------------------------------------===//
21 
23 
24 //===----------------------------------------------------------------------===//
25 // Types
26 //===----------------------------------------------------------------------===//
27 
28 /// Create a void type.
29 MLIR_CAPI_EXPORTED MlirType mooreVoidTypeGet(MlirContext ctx);
30 /// Create a string type.
31 MLIR_CAPI_EXPORTED MlirType mooreStringTypeGet(MlirContext ctx);
32 /// Create a chandle type.
33 MLIR_CAPI_EXPORTED MlirType mooreChandleTypeGet(MlirContext ctx);
34 /// Create an event type.
35 MLIR_CAPI_EXPORTED MlirType mooreEventTypeGet(MlirContext ctx);
36 /// Create a two-valued simple bit vector type.
37 MLIR_CAPI_EXPORTED MlirType mooreIntTypeGetInt(MlirContext ctx, unsigned width);
38 /// Create a four-valued simple bit vector type.
39 MLIR_CAPI_EXPORTED MlirType mooreIntTypeGetLogic(MlirContext ctx,
40  unsigned width);
41 /// Create a real type.
42 MLIR_CAPI_EXPORTED MlirType mooreRealTypeGet(MlirContext ctx);
43 /// Create a packed unsized dimension type.
44 MLIR_CAPI_EXPORTED MlirType moorePackedUnsizedDimTypeGet(MlirType inner);
45 /// Create a packed range dimension type.
46 MLIR_CAPI_EXPORTED MlirType moorePackedRangeDimTypeGet(MlirType inner,
47  unsigned size,
48  bool upDir, int offset);
49 /// Create a unpacked unsized dimension type.
50 MLIR_CAPI_EXPORTED MlirType mooreUnpackedUnsizedDimTypeGet(MlirType inner);
51 /// Create a unpacked array dimension type.
52 MLIR_CAPI_EXPORTED MlirType mooreUnpackedArrayDimTypeGet(MlirType inner,
53  unsigned size);
54 /// Create a unpacked range dimension type.
55 MLIR_CAPI_EXPORTED MlirType mooreUnpackedRangeDimTypeGet(MlirType inner,
56  unsigned size,
57  bool upDir,
58  int offset);
59 /// Create a unpacked assoc dimension type without index.
60 MLIR_CAPI_EXPORTED MlirType mooreUnpackedAssocDimTypeGet(MlirType inner);
61 /// Create a unpacked assoc dimension type width index.
62 MLIR_CAPI_EXPORTED MlirType
63 mooreUnpackedAssocDimTypeGetWithIndex(MlirType inner, MlirType indexType);
64 /// Create a unpacked queue dimension type without bound.
65 MLIR_CAPI_EXPORTED MlirType mooreUnpackedQueueDimTypeGet(MlirType inner);
66 /// Create a unpacked queue dimension type with bound.
67 MLIR_CAPI_EXPORTED MlirType
68 mooreUnpackedQueueDimTypeGetWithBound(MlirType inner, unsigned bound);
69 /// Checks whether the passed UnpackedType is a two-valued type.
70 MLIR_CAPI_EXPORTED bool mooreIsTwoValuedType(MlirType type);
71 /// Checks whether the passed UnpackedType is a four-valued type.
72 MLIR_CAPI_EXPORTED bool mooreIsFourValuedType(MlirType type);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif // CIRCT_C_DIALECT_MOORE_H
int32_t width
Definition: FIRRTL.cpp:36
MLIR_CAPI_EXPORTED MlirType mooreUnpackedUnsizedDimTypeGet(MlirType inner)
Create a unpacked unsized dimension type.
Definition: Moore.cpp:78
MLIR_CAPI_EXPORTED MlirType mooreChandleTypeGet(MlirContext ctx)
Create a chandle type.
Definition: Moore.cpp:40
MLIR_CAPI_EXPORTED MlirType mooreUnpackedQueueDimTypeGetWithBound(MlirType inner, unsigned bound)
Create a unpacked queue dimension type with bound.
Definition: Moore.cpp:113
MLIR_CAPI_EXPORTED bool mooreIsTwoValuedType(MlirType type)
Checks whether the passed UnpackedType is a two-valued type.
Definition: Moore.cpp:118
MLIR_CAPI_EXPORTED MlirType mooreIntTypeGetInt(MlirContext ctx, unsigned width)
Create a two-valued simple bit vector type.
Definition: Moore.cpp:50
MLIR_CAPI_EXPORTED MlirType mooreStringTypeGet(MlirContext ctx)
Create a string type.
Definition: Moore.cpp:35
MLIR_CAPI_EXPORTED MlirType mooreUnpackedRangeDimTypeGet(MlirType inner, unsigned size, bool upDir, int offset)
Create a unpacked range dimension type.
Definition: Moore.cpp:88
MLIR_CAPI_EXPORTED MlirType mooreUnpackedAssocDimTypeGetWithIndex(MlirType inner, MlirType indexType)
Create a unpacked assoc dimension type width index.
Definition: Moore.cpp:101
MLIR_CAPI_EXPORTED MlirType moorePackedUnsizedDimTypeGet(MlirType inner)
Create a packed unsized dimension type.
Definition: Moore.cpp:65
MLIR_CAPI_EXPORTED MlirType mooreUnpackedAssocDimTypeGet(MlirType inner)
Create a unpacked assoc dimension type without index.
Definition: Moore.cpp:96
MLIR_CAPI_EXPORTED bool mooreIsFourValuedType(MlirType type)
Checks whether the passed UnpackedType is a four-valued type.
Definition: Moore.cpp:123
MLIR_CAPI_EXPORTED MlirType mooreUnpackedArrayDimTypeGet(MlirType inner, unsigned size)
Create a unpacked array dimension type.
Definition: Moore.cpp:83
MLIR_CAPI_EXPORTED MlirType mooreVoidTypeGet(MlirContext ctx)
Create a void type.
Definition: Moore.cpp:30
MLIR_CAPI_EXPORTED MlirType moorePackedRangeDimTypeGet(MlirType inner, unsigned size, bool upDir, int offset)
Create a packed range dimension type.
Definition: Moore.cpp:70
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Moore, moore)
MLIR_CAPI_EXPORTED MlirType mooreEventTypeGet(MlirContext ctx)
Create an event type.
Definition: Moore.cpp:45
MLIR_CAPI_EXPORTED MlirType mooreRealTypeGet(MlirContext ctx)
Create a real type.
Definition: Moore.cpp:60
MLIR_CAPI_EXPORTED MlirType mooreIntTypeGetLogic(MlirContext ctx, unsigned width)
Create a four-valued simple bit vector type.
Definition: Moore.cpp:55
MLIR_CAPI_EXPORTED MlirType mooreUnpackedQueueDimTypeGet(MlirType inner)
Create a unpacked queue dimension type without bound.
Definition: Moore.cpp:108