CIRCT 24.0.0git
Loading...
Searching...
No Matches
SVTypes.h
Go to the documentation of this file.
1//===- SVTypes.h - Declare SV dialect types ----------------------*- 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// This file declares the types for the SV dialect.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_SV_TYPES_H
14#define CIRCT_DIALECT_SV_TYPES_H
15
17#include "mlir/IR/Attributes.h"
18#include "mlir/IR/BuiltinAttributes.h"
19
20#define GET_TYPEDEF_CLASSES
21#include "circt/Dialect/SV/SVTypes.h.inc"
22
23namespace circt {
24namespace sv {
25using InOutType = circt::hw::InOutType;
26
27/// Return the element type of an InOutType or null if the operand isn't an
28/// InOut type.
29mlir::Type getInOutElementType(mlir::Type type);
30
31/// Return the element type of a NetType or null if the operand isn't a Net
32/// type.
33mlir::Type getNetElementType(mlir::Type type);
34
35/// Return the element type of a VarType or null if the operand isn't a Var
36/// type.
37mlir::Type getVarElementType(mlir::Type type);
38
39/// Return the element type of an ArrayType or UnpackedArrayType, or null if the
40/// operand isn't an array.
41mlir::Type getAnyHWArrayElementType(mlir::Type type);
42} // end namespace sv
43} // end namespace circt
44
45#endif // CIRCT_DIALECT_SV_TYPES_H
mlir::Type getVarElementType(mlir::Type type)
Return the element type of a VarType or null if the operand isn't a Var type.
Definition SVTypes.cpp:66
mlir::Type getAnyHWArrayElementType(mlir::Type type)
Return the element type of an ArrayType or UnpackedArrayType, or null if the operand isn't an array.
circt::hw::InOutType InOutType
Definition SVTypes.h:25
mlir::Type getNetElementType(mlir::Type type)
Return the element type of a NetType or null if the operand isn't a Net type.
Definition SVTypes.cpp:54
mlir::Type getInOutElementType(mlir::Type type)
Return the element type of an InOutType or null if the operand isn't an InOut type.
Definition SVTypes.cpp:42
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition sv.py:1