CIRCT
20.0.0git
|
#include "circt/Dialect/Arc/ArcOps.h"
#include "circt/Dialect/Arc/ArcPasses.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Support/LLVM.h"
#include "mlir/Pass/Pass.h"
#include "circt/Dialect/Arc/ArcPasses.h.inc"
Go to the source code of this file.
Namespaces | |
circt | |
The InstanceGraph op interface, see InstanceGraphInterface.td for more details. | |
circt::arc | |
Macros | |
#define | DEBUG_TYPE "arc-infer-state-properties" |
#define | GEN_PASS_DEF_INFERSTATEPROPERTIES |
Functions | |
static bool | isConstZero (Value value) |
static bool | isConstTrue (Value value) |
static LogicalResult | applyResetTransformation (arc::DefineOp arcOp, ArrayRef< ResetInfo > resetInfos) |
Take an arc and a detected reset per output value and apply it to the arc if applicable (but does not change the state ops referring to the arc). More... | |
static void | setResetOperandOfStateOp (arc::StateOp stateOp, unsigned resetConditionIndex) |
Transform the given state operation to match the changes done to the arc in 'applyResetTransformation' without any additional checks. More... | |
static LogicalResult | applyEnableTransformation (arc::DefineOp arcOp, arc::StateOp stateOp, ArrayRef< EnableInfo > enableInfos) |
Take an arc and a detected enable per output value and apply it to the given state if applicable (no changes required to the arc::DefineOp operation for enables). More... | |
static ResetInfo | getIfMuxBasedReset (OpOperand &output) |
A reset represented with a single mux operation. More... | |
static ResetInfo | getIfAndBasedReset (OpOperand &output) |
A reset represented by an AND and XOR operation for i1 values only. More... | |
static EnableInfo | checkOperandsForEnable (arc::StateOp stateOp, Value selfArg, Value cond, unsigned outputNr, bool isDisable) |
Just a helper function for the following two patterns. More... | |
static EnableInfo | getIfMuxBasedEnable (OpOperand &output, StateOp stateOp) |
An enable represented by a single mux operation. More... | |
static EnableInfo | getIfMuxBasedDisable (OpOperand &output, StateOp stateOp) |
A negated enable represented by a single mux operation. More... | |
ResetInfo | computeResetInfoFromPattern (OpOperand &output) |
Combine all the reset patterns to one. More... | |
EnableInfo | computeEnableInfoFromPattern (OpOperand &output, StateOp stateOp) |
Combine all the enable patterns to one. More... | |
#define DEBUG_TYPE "arc-infer-state-properties" |
Definition at line 16 of file InferStateProperties.cpp.
#define GEN_PASS_DEF_INFERSTATEPROPERTIES |
Definition at line 20 of file InferStateProperties.cpp.
|
static |
Take an arc and a detected enable per output value and apply it to the given state if applicable (no changes required to the arc::DefineOp operation for enables).
Definition at line 163 of file InferStateProperties.cpp.
References assert(), and hw.ConstantOp::create().
|
static |
Take an arc and a detected reset per output value and apply it to the arc if applicable (but does not change the state ops referring to the arc).
Definition at line 100 of file InferStateProperties.cpp.
References assert().
|
static |
Just a helper function for the following two patterns.
Definition at line 299 of file InferStateProperties.cpp.
Referenced by getIfMuxBasedDisable(), and getIfMuxBasedEnable().
EnableInfo computeEnableInfoFromPattern | ( | OpOperand & | output, |
StateOp | stateOp | ||
) |
Combine all the enable patterns to one.
Definition at line 368 of file InferStateProperties.cpp.
References getIfMuxBasedDisable(), and getIfMuxBasedEnable().
ResetInfo computeResetInfoFromPattern | ( | OpOperand & | output | ) |
Combine all the reset patterns to one.
Definition at line 358 of file InferStateProperties.cpp.
References getIfAndBasedReset(), and getIfMuxBasedReset().
|
static |
A reset represented by an AND and XOR operation for i1 values only.
out = and(X); X being a list containing all of {xor(resetCond, true), arcArgument} ==> out = and(X\xor(resetCond, true)) + add resetCond to StateOp
Definition at line 254 of file InferStateProperties.cpp.
References assert(), and isConstTrue().
Referenced by computeResetInfoFromPattern().
|
static |
A negated enable represented by a single mux operation.
out = mux(enableCond, arcArgument, x) where x is the 'out' of the last cycle ==> out = arcArgument + set xor(enableCond, true) as enable operand to the StateOp
Definition at line 338 of file InferStateProperties.cpp.
References assert(), and checkOperandsForEnable().
Referenced by computeEnableInfoFromPattern().
|
static |
An enable represented by a single mux operation.
out = mux(enableCond, x, arcArgument) where x is the 'out' of the last cycle ==> out = arcArgument + set enableCond as enable operand to the StateOp
Definition at line 318 of file InferStateProperties.cpp.
References assert(), and checkOperandsForEnable().
Referenced by computeEnableInfoFromPattern().
|
static |
A reset represented with a single mux operation.
out = mux(resetCondition, 0, arcArgument) ==> return arcArgument directly and add resetCondition to the StateOp
Definition at line 231 of file InferStateProperties.cpp.
References assert(), and isConstZero().
Referenced by computeResetInfoFromPattern().
|
static |
Definition at line 39 of file InferStateProperties.cpp.
Referenced by getIfAndBasedReset().
|
static |
Definition at line 32 of file InferStateProperties.cpp.
Referenced by getIfMuxBasedReset().
|
static |
Transform the given state operation to match the changes done to the arc in 'applyResetTransformation' without any additional checks.
Definition at line 145 of file InferStateProperties.cpp.