CIRCT  19.0.0git
SeqOps.h
Go to the documentation of this file.
1 //===- SeqOps.h - Declare Seq dialect operations ----------------*- 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 operation classes for the Seq dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef CIRCT_DIALECT_SEQ_SEQOPS_H
14 #define CIRCT_DIALECT_SEQ_SEQOPS_H
15 
16 #include "mlir/Bytecode/BytecodeOpInterface.h"
17 #include "mlir/IR/OpImplementation.h"
18 #include "mlir/IR/SymbolTable.h"
19 #include "mlir/Interfaces/InferTypeOpInterface.h"
20 #include "mlir/Interfaces/SideEffectInterfaces.h"
21 
24 #include "circt/Dialect/HW/HWOps.h"
31 
32 #define GET_OP_CLASSES
33 #include "circt/Dialect/Seq/Seq.h.inc"
34 
35 namespace circt {
36 namespace seq {
37 
38 // Returns true if the given sequence of addresses match the shape of the given
39 // HLMemType'd handle.
40 bool isValidIndexValues(Value hlmemHandle, ValueRange addresses);
41 
42 /// Helper structure carrying information about FIR memory generated ops.
43 struct FirMemory {
44  size_t numReadPorts;
45  size_t numWritePorts;
47  size_t dataWidth;
48  size_t depth;
49  size_t maskGran;
50  size_t readLatency;
51  size_t writeLatency;
52  seq::RUW readUnderWrite;
53  seq::WUW writeUnderWrite;
54  SmallVector<int32_t> writeClockIDs;
55  StringRef initFilename;
58 
59  FirMemory(hw::HWModuleGeneratedOp op);
60 };
61 
62 } // namespace seq
63 } // namespace circt
64 
65 #endif // CIRCT_DIALECT_SEQ_SEQOPS_H
bool isValidIndexValues(Value hlmemHandle, ValueRange addresses)
Definition: SeqOps.cpp:29
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
Definition: seq.py:1
Helper structure carrying information about FIR memory generated ops.
Definition: SeqOps.h:43
size_t numWritePorts
Definition: SeqOps.h:45
size_t writeLatency
Definition: SeqOps.h:51
seq::WUW writeUnderWrite
Definition: SeqOps.h:53
seq::RUW readUnderWrite
Definition: SeqOps.h:52
FirMemory(hw::HWModuleGeneratedOp op)
Definition: SeqOps.cpp:963
size_t numReadPorts
Definition: SeqOps.h:44
size_t readLatency
Definition: SeqOps.h:50
SmallVector< int32_t > writeClockIDs
Definition: SeqOps.h:54
size_t numReadWritePorts
Definition: SeqOps.h:46
StringRef initFilename
Definition: SeqOps.h:55