CIRCT 24.0.0git
Loading...
Searching...
No Matches
AXI4Types.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_AXI4TYPES_H
10#define CIRCT_DIALECT_AXI4_AXI4TYPES_H
11
15#include "mlir/IR/Types.h"
16
17#define GET_TYPEDEF_CLASSES
18#include "circt/Dialect/AXI4/AXI4Types.h.inc"
19
20namespace circt {
21namespace axi4 {
22
23/// The five AXI4 channels.
24enum class AXI4Channel { AW, W, B, AR, R };
25
26// Fixed AXI4 field widths (bits).
27constexpr unsigned kLenWidth = 8;
28constexpr unsigned kSizeWidth = 3;
29constexpr unsigned kBurstWidth = 2;
30constexpr unsigned kLockWidth = 1;
31constexpr unsigned kCacheWidth = 4;
32constexpr unsigned kProtWidth = 3;
33constexpr unsigned kQosWidth = 4;
34constexpr unsigned kRegionWidth = 4;
35constexpr unsigned kRespWidth = 2;
36constexpr unsigned kLastWidth = 1;
37
38/// Build the `hw.struct` payload type for one channel of an `!axi4.port`.
39hw::StructType getChannelPayloadType(PortType port, AXI4Channel channel);
40
41} // namespace axi4
42} // namespace circt
43
44#endif // CIRCT_DIALECT_AXI4_AXI4TYPES_H
constexpr unsigned kRespWidth
Definition AXI4Types.h:35
constexpr unsigned kProtWidth
Definition AXI4Types.h:32
constexpr unsigned kLastWidth
Definition AXI4Types.h:36
constexpr unsigned kQosWidth
Definition AXI4Types.h:33
hw::StructType getChannelPayloadType(PortType port, AXI4Channel channel)
Build the hw.struct payload type for one channel of an !axi4.port.
Definition AXI4Types.cpp:56
constexpr unsigned kRegionWidth
Definition AXI4Types.h:34
AXI4Channel
The five AXI4 channels.
Definition AXI4Types.h:24
constexpr unsigned kBurstWidth
Definition AXI4Types.h:29
constexpr unsigned kLenWidth
Definition AXI4Types.h:27
constexpr unsigned kSizeWidth
Definition AXI4Types.h:28
constexpr unsigned kCacheWidth
Definition AXI4Types.h:31
constexpr unsigned kLockWidth
Definition AXI4Types.h:30
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.