CIRCT  20.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 open array type.
44 MLIR_CAPI_EXPORTED MlirType mooreOpenArrayTypeGet(MlirType elementType);
45 /// Create a packed array type.
46 MLIR_CAPI_EXPORTED MlirType mooreArrayTypeGet(unsigned size,
47  MlirType elementType);
48 /// Create an unpacked open array type.
49 MLIR_CAPI_EXPORTED MlirType mooreOpenUnpackedArrayTypeGet(MlirType elementType);
50 /// Create an unpacked array type.
51 MLIR_CAPI_EXPORTED MlirType mooreUnpackedArrayTypeGet(unsigned size,
52  MlirType elementType);
53 /// Create an unpacked associative array type.
54 MLIR_CAPI_EXPORTED MlirType mooreAssocArrayTypeGet(MlirType elementType,
55  MlirType indexType);
56 /// Create an unpacked queue type.
57 MLIR_CAPI_EXPORTED MlirType mooreQueueTypeGet(MlirType elementType,
58  unsigned bound);
59 /// Checks whether the passed UnpackedType is a two-valued type.
60 MLIR_CAPI_EXPORTED bool mooreIsTwoValuedType(MlirType type);
61 /// Checks whether the passed UnpackedType is a four-valued type.
62 MLIR_CAPI_EXPORTED bool mooreIsFourValuedType(MlirType type);
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif // CIRCT_C_DIALECT_MOORE_H
MlirType elementType
Definition: CHIRRTL.cpp:29
MLIR_CAPI_EXPORTED MlirType mooreChandleTypeGet(MlirContext ctx)
Create a chandle type.
Definition: Moore.cpp:40
MLIR_CAPI_EXPORTED bool mooreIsTwoValuedType(MlirType type)
Checks whether the passed UnpackedType is a two-valued type.
Definition: Moore.cpp:91
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 mooreOpenArrayTypeGet(MlirType elementType)
Create a packed open array type.
Definition: Moore.cpp:64
MLIR_CAPI_EXPORTED MlirType mooreStringTypeGet(MlirContext ctx)
Create a string type.
Definition: Moore.cpp:35
MLIR_CAPI_EXPORTED MlirType mooreOpenUnpackedArrayTypeGet(MlirType elementType)
Create an unpacked open array type.
Definition: Moore.cpp:72
MLIR_CAPI_EXPORTED MlirType mooreQueueTypeGet(MlirType elementType, unsigned bound)
Create an unpacked queue type.
Definition: Moore.cpp:87
MLIR_CAPI_EXPORTED MlirType mooreUnpackedArrayTypeGet(unsigned size, MlirType elementType)
Create an unpacked array type.
Definition: Moore.cpp:77
MLIR_CAPI_EXPORTED MlirType mooreArrayTypeGet(unsigned size, MlirType elementType)
Create a packed array type.
Definition: Moore.cpp:68
MLIR_CAPI_EXPORTED bool mooreIsFourValuedType(MlirType type)
Checks whether the passed UnpackedType is a four-valued type.
Definition: Moore.cpp:95
MLIR_CAPI_EXPORTED MlirType mooreVoidTypeGet(MlirContext ctx)
Create a void type.
Definition: Moore.cpp:30
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 mooreAssocArrayTypeGet(MlirType elementType, MlirType indexType)
Create an unpacked associative array type.
Definition: Moore.cpp:82