CIRCT  20.0.0git
Seq.cpp
Go to the documentation of this file.
1 //===- Seq.cpp - C interface for the Seq dialect --------------------------===//
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 #include "circt-c/Dialect/Seq.h"
13 
14 #include "mlir/CAPI/Registration.h"
15 
16 using namespace circt::seq;
17 
18 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Sequential, seq, circt::seq::SeqDialect)
19 
21 
22 bool seqTypeIsAClock(MlirType type) {
23  return llvm::isa<ClockType>(unwrap(type));
24 }
25 
26 MlirType seqClockTypeGet(MlirContext ctx) {
27  return wrap(ClockType::get(unwrap(ctx)));
28 }
29 
30 bool seqTypeIsAImmutable(MlirType type) {
31  return llvm::isa<ImmutableType>(unwrap(type));
32 }
33 
34 MlirType seqImmutableTypeGet(MlirType innerType) {
36 }
37 
38 MlirType seqImmutableTypeGetInnerType(MlirType type) {
39  return wrap(llvm::cast<ImmutableType>(unwrap(type)).getInnerType());
40 }
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(CHIRRTL, chirrtl, circt::chirrtl::CHIRRTLDialect) MlirType chirrtlTypeGetCMemory(MlirContext ctx
static void registerPasses()
Definition: CIRCTModule.cpp:45
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
Definition: OM.cpp:113
void registerSeqPasses()
Definition: Seq.cpp:20
MlirType seqImmutableTypeGet(MlirType innerType)
Creates a seq immutable type.
Definition: Seq.cpp:34
MlirType seqImmutableTypeGetInnerType(MlirType type)
Creates a seq immutable type.
Definition: Seq.cpp:38
MlirType seqClockTypeGet(MlirContext ctx)
Creates an seq clock type.
Definition: Seq.cpp:26
bool seqTypeIsAImmutable(MlirType type)
If the type is an immutable type.
Definition: Seq.cpp:30
bool seqTypeIsAClock(MlirType type)
If the type is an clock type.
Definition: Seq.cpp:22
Direction get(bool isOutput)
Returns an output direction if isOutput is true, otherwise returns an input direction.
Definition: CalyxOps.cpp:55
mlir::Type innerType(mlir::Type type)
Definition: ESITypes.cpp:184
Definition: seq.py:1