CIRCT 20.0.0git
Loading...
Searching...
No Matches
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
13
14#include "mlir/CAPI/Registration.h"
15
16using namespace circt::seq;
17
18MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Sequential, seq, circt::seq::SeqDialect)
19
20void registerSeqPasses() { circt::seq::registerPasses(); }
21
22bool seqTypeIsAClock(MlirType type) {
23 return llvm::isa<ClockType>(unwrap(type));
24}
25
26MlirType seqClockTypeGet(MlirContext ctx) {
27 return wrap(ClockType::get(unwrap(ctx)));
28}
29
30bool seqTypeIsAImmutable(MlirType type) {
31 return llvm::isa<ImmutableType>(unwrap(type));
32}
33
34MlirType seqImmutableTypeGet(MlirType innerType) {
35 return wrap(ImmutableType::get(unwrap(innerType)));
36}
37
38MlirType 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 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
Definition seq.py:1