CIRCT
24.0.0git
Loading...
Searching...
No Matches
include
circt
Dialect
AXI4
AXI4Ops.h
Go to the documentation of this file.
1
//===----------------------------------------------------------------------===//
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_DIALECT_AXI4_AXI4OPS_H
10
#define CIRCT_DIALECT_AXI4_AXI4OPS_H
11
12
#include "mlir/IR/OpDefinition.h"
13
#include "mlir/IR/OpImplementation.h"
14
15
#include "
circt/Dialect/AXI4/AXI4Dialect.h
"
16
#include "
circt/Dialect/AXI4/AXI4Types.h
"
17
#include "
circt/Dialect/Seq/SeqDialect.h
"
18
#include "
circt/Dialect/Seq/SeqTypes.h
"
19
20
namespace
circt
{
21
namespace
axi4 {
22
namespace
OpTrait
{
23
/// Constrains an op's `!axi4.port` results to at most one use each
24
template
<
typename
ConcreteType>
25
class
PortResultsAtMostOneUse
26
:
public
mlir::OpTrait::TraitBase
<ConcreteType, PortResultsAtMostOneUse> {
27
public
:
28
static
llvm::LogicalResult
verifyTrait
(mlir::Operation *op) {
29
for
(mlir::Value result : op->getResults())
30
if
(mlir::isa<PortType>(result.getType()) && result.hasNUsesOrMore(2))
31
return
op->emitOpError(
32
"port result must have at most one use; route through an "
33
"'axi4.xbar' to fan out to multiple endpoints"
);
34
return
mlir::success();
35
}
36
};
37
}
// namespace OpTrait
38
}
// namespace axi4
39
}
// namespace circt
40
41
#define GET_OP_CLASSES
42
#include "circt/Dialect/AXI4/AXI4.h.inc"
43
44
#endif
// CIRCT_DIALECT_AXI4_AXI4OPS_H
AXI4Dialect.h
AXI4Types.h
SeqDialect.h
SeqTypes.h
circt::axi4::OpTrait::PortResultsAtMostOneUse
Constrains an op's !axi4.port results to at most one use each.
Definition
AXI4Ops.h:26
circt::axi4::OpTrait::PortResultsAtMostOneUse::verifyTrait
static llvm::LogicalResult verifyTrait(mlir::Operation *op)
Definition
AXI4Ops.h:28
mlir::OpTrait::TraitBase
circt
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition
DebugAnalysis.h:21
mlir::OpTrait
Definition
HandshakeOps.h:39
Generated on Thu Sep 10 2026 00:10:54 for CIRCT by
1.9.8