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 true if a type is a valid element type of a NetType.
36bool isValidNetElementType(mlir::Type type);
37
38/// Return the element type of a VarType or null if the operand isn't a Var
39/// type.
40mlir::Type getVarElementType(mlir::Type type);
41
42/// Return true if a type is a valid element type of a VarType.
43bool isValidVarElementType(mlir::Type type);
44
45/// Return the element type of an ArrayType or UnpackedArrayType, or null if the
46/// operand isn't an array.
47mlir::Type getAnyHWArrayElementType(mlir::Type type);
48} // end namespace sv
49} // end namespace circt
50
51#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:119
bool isValidNetElementType(mlir::Type type)
Return true if a type is a valid element type of a NetType.
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:79
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:67
bool isValidVarElementType(mlir::Type type)
Return true if a type is a valid element type of a VarType.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition sv.py:1