10 #ifndef CONVERSION_SEQTOSV_FIRMEMLOWERING_H
11 #define CONVERSION_SEQTOSV_FIRMEMLOWERING_H
18 #include "llvm/ADT/MapVector.h"
70 llvm::MapVector<FirMemConfig, SmallVector<seq::FirMemOp, 1>>;
74 std::tuple<FirMemConfig *, hw::HWModuleGeneratedOp, seq::FirMemOp>;
87 ArrayRef<MemoryConfig> mems);
93 ArrayRef<seq::FirMemOp> memOps);
FIR memory lowering helper.
UniqueConfigs collectMemories(ArrayRef< hw::HWModuleOp > modules)
Groups memories by their kind from the whole design.
void lowerMemoriesInModule(hw::HWModuleOp module, ArrayRef< MemoryConfig > mems)
Lowers a group of memories from the same module.
hw::HWGeneratorSchemaOp schemaOp
FirMemLowering(ModuleOp circuit)
hw::HWModuleGeneratedOp createMemoryModule(FirMemConfig &mem, ArrayRef< seq::FirMemOp > memOps)
Creates the generated module for a given configuration.
FlatSymbolRefAttr getOrCreateSchema()
Find the schema or create it if it does not exist.
DenseMap< hw::HWModuleOp, size_t > moduleIndex
std::tuple< FirMemConfig *, hw::HWModuleGeneratedOp, seq::FirMemOp > MemoryConfig
Information required to lower a single memory in a module.
llvm::MapVector< FirMemConfig, SmallVector< seq::FirMemOp, 1 > > UniqueConfigs
A vector of unique FirMemConfigs and all the FirMemOps that use it.
Namespace globalNamespace
FirMemConfig collectMemory(seq::FirMemOp op)
Determine the exact parametrization of the memory that should be generated for a given FirMemOp.
A namespace that is used to store existing names and generate new names in some scope within the IR.
Default symbol cache implementation; stores associations between names (StringAttr's) to mlir::Operat...
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
size_t hash_combine(size_t h1, size_t h2)
C++'s stdlib doesn't have a hash_combine function. This is a simple one.
The configuration of a FIR memory.
llvm::hash_code hashValue() const
bool operator==(const FirMemConfig &other) const
SmallVector< int32_t, 1 > writeClockIDs
static bool isEqual(const circt::FirMemConfig &lhs, const circt::FirMemConfig &rhs)
static circt::FirMemConfig getTombstoneKey()
static circt::FirMemConfig getEmptyKey()
static unsigned getHashValue(const circt::FirMemConfig &cfg)