CIRCT
19.0.0git
|
#include "PassDetails.h"
#include "circt/Dialect/FIRRTL/AnnotationDetails.h"
#include "circt/Dialect/FIRRTL/FIRRTLInstanceGraph.h"
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"
#include "circt/Dialect/FIRRTL/FIRRTLTypes.h"
#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"
#include "circt/Dialect/FIRRTL/Passes.h"
#include "circt/Support/Debug.h"
#include "circt/Support/FieldRef.h"
#include "circt/Support/InstanceGraph.h"
#include "circt/Support/InstanceGraphInterface.h"
#include "mlir/IR/Dominance.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/Threading.h"
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Classes | |
struct | llvm::DenseMapInfo< ResetSignal > |
Namespaces | |
llvm | |
Macros | |
#define | DEBUG_TYPE "infer-resets" |
Functions | |
bool | operator== (const ResetDomain &a, const ResetDomain &b) |
bool | operator!= (const ResetDomain &a, const ResetDomain &b) |
static std::pair< StringAttr, FModuleOp > | getResetNameAndModule (Value reset) |
Return the name and parent module of a reset. More... | |
static StringAttr | getResetName (Value reset) |
Return the name of a reset. More... | |
static Value | createZeroValue (ImplicitLocOpBuilder &builder, FIRRTLBaseType type, SmallDenseMap< FIRRTLBaseType, Value > &cache) |
Construct a zero value of the given type using the given builder. More... | |
static Value | createZeroValue (ImplicitLocOpBuilder &builder, FIRRTLBaseType type) |
Construct a null value of the given type using the given builder. More... | |
static bool | insertResetMux (ImplicitLocOpBuilder &builder, Value target, Value reset, Value resetValue) |
Helper function that inserts reset multiplexer into all ConnectOp s with the given target. More... | |
template<typename T > | |
static T & | operator<< (T &os, const ResetKind &kind) |
static unsigned | getMaxFieldID (FIRRTLBaseType type) |
static unsigned | getFieldID (BundleType type, unsigned index) |
static unsigned | getFieldID (FVectorType type) |
static unsigned | getIndexForFieldID (BundleType type, unsigned fieldID) |
static bool | isUselessVec (FIRRTLBaseType oldType, unsigned fieldID) |
static bool | isUselessVec (FieldRef field) |
static bool | getDeclName (Value value, SmallString< 32 > &string) |
static bool | getFieldName (const FieldRef &fieldRef, SmallString< 32 > &string) |
static bool | typeContainsReset (Type type) |
Check whether a type contains a ResetType . More... | |
static FIRRTLBaseType | updateType (FIRRTLBaseType oldType, unsigned fieldID, FIRRTLBaseType fieldType) |
Update the type of a single field within a type. More... | |
#define DEBUG_TYPE "infer-resets" |
Definition at line 33 of file InferResets.cpp.
|
static |
Construct a null value of the given type using the given builder.
Definition at line 155 of file InferResets.cpp.
References builder, and createZeroValue().
|
static |
Construct a zero value of the given type using the given builder.
Definition at line 98 of file InferResets.cpp.
References builder, circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case(), circt::calyx::direction::get(), and circt::firrtl::FIRRTLBaseType::getConstType().
Referenced by createZeroValue().
|
static |
Definition at line 652 of file InferResets.cpp.
Referenced by getFieldName().
|
static |
Definition at line 596 of file InferResets.cpp.
References assert(), and getMaxFieldID().
Referenced by getFieldName(), isUselessVec(), and updateType().
|
static |
Definition at line 604 of file InferResets.cpp.
|
static |
Definition at line 675 of file InferResets.cpp.
References empty, getDeclName(), circt::FieldRef::getFieldID(), getFieldID(), getIndexForFieldID(), and circt::FieldRef::getValue().
|
static |
Definition at line 606 of file InferResets.cpp.
References assert(), and getMaxFieldID().
Referenced by getFieldName(), isUselessVec(), and updateType().
|
static |
Definition at line 583 of file InferResets.cpp.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case().
Referenced by getFieldID(), and getIndexForFieldID().
|
inlinestatic |
Return the name of a reset.
The reset value must either be a module port or a wire/node operation.
Definition at line 93 of file InferResets.cpp.
References getResetNameAndModule().
|
static |
Return the name and parent module of a reset.
The reset value must either be a module port or a wire/node operation.
Definition at line 80 of file InferResets.cpp.
Referenced by getResetName().
|
static |
Helper function that inserts reset multiplexer into all ConnectOp
s with the given target.
Looks through SubfieldOp
, SubindexOp
, and SubaccessOp
, and inserts multiplexers into connects to these subaccesses as well. Modifies the insertion location of the builder. Returns true if the resetValue
was used in any way, false otherwise.
Definition at line 166 of file InferResets.cpp.
References builder.
|
static |
Definition at line 646 of file InferResets.cpp.
References circt::firrtl::getBaseType(), circt::FieldRef::getFieldID(), circt::FieldRef::getValue(), and isUselessVec().
|
static |
Definition at line 620 of file InferResets.cpp.
References assert(), getFieldID(), and getIndexForFieldID().
Referenced by isUselessVec().
|
inline |
Definition at line 74 of file InferResets.cpp.
|
static |
Definition at line 287 of file InferResets.cpp.
|
inline |
Definition at line 71 of file InferResets.cpp.
|
static |
Check whether a type contains a ResetType
.
Definition at line 715 of file InferResets.cpp.
|
static |
Update the type of a single field within a type.
Definition at line 1190 of file InferResets.cpp.
References assert(), circt::calyx::direction::get(), circt::firrtl::FIRRTLBaseType::getConstType(), getFieldID(), getIndexForFieldID(), and circt::firrtl::FIRRTLBaseType::isConst().