CIRCT 20.0.0git
Loading...
Searching...
No Matches
HWTypeInterfaces.h
Go to the documentation of this file.
1//===- HWTypeInterfaces.h - Declare HW type interfaces ----------*- 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 type interfaces for the HW Dialect.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_HW_HWTYPEINTERFACES_H
14#define CIRCT_DIALECT_HW_HWTYPEINTERFACES_H
15
16#include "circt/Support/LLVM.h"
17#include "mlir/IR/Types.h"
18
19namespace circt {
20namespace hw {
21namespace FieldIdImpl {
22uint64_t getMaxFieldID(Type);
23
24std::pair<::mlir::Type, uint64_t> getSubTypeByFieldID(Type, uint64_t fieldID);
25
26::mlir::Type getFinalTypeByFieldID(Type type, uint64_t fieldID);
27
28std::pair<uint64_t, bool> projectToChildFieldID(Type, uint64_t fieldID,
29 uint64_t index);
30
31std::pair<uint64_t, uint64_t> getIndexAndSubfieldID(Type type,
32 uint64_t fieldID);
33
34uint64_t getFieldID(Type type, uint64_t index);
35
36uint64_t getIndexForFieldID(Type type, uint64_t fieldID);
37
38} // namespace FieldIdImpl
39} // namespace hw
40} // namespace circt
41
42#include "circt/Dialect/HW/HWTypeInterfaces.h.inc"
43
44#endif // CIRCT_DIALECT_HW_HWTYPEINTERFACES_H
std::pair< uint64_t, uint64_t > getIndexAndSubfieldID(Type type, uint64_t fieldID)
uint64_t getFieldID(Type type, uint64_t index)
std::pair<::mlir::Type, uint64_t > getSubTypeByFieldID(Type, uint64_t fieldID)
std::pair< uint64_t, bool > projectToChildFieldID(Type, uint64_t fieldID, uint64_t index)
::mlir::Type getFinalTypeByFieldID(Type type, uint64_t fieldID)
uint64_t getIndexForFieldID(Type type, uint64_t fieldID)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition hw.py:1