|
CIRCT 23.0.0git
|
#include "circt/Dialect/Synth/Transforms/CutRewriter.h"#include "circt/Dialect/Comb/CombOps.h"#include "circt/Dialect/HW/HWOps.h"#include "circt/Dialect/Synth/SynthOps.h"#include "circt/Support/LLVM.h"#include "circt/Support/TruthTable.h"#include "circt/Support/UnusedOpPruner.h"#include "mlir/Analysis/TopologicalSortUtils.h"#include "mlir/IR/Builders.h"#include "mlir/IR/Operation.h"#include "mlir/IR/RegionKindInterface.h"#include "mlir/IR/Value.h"#include "mlir/IR/ValueRange.h"#include "mlir/IR/Visitors.h"#include "mlir/Support/LLVM.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/Bitset.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/MapVector.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/ScopeExit.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/TypeSwitch.h"#include "llvm/ADT/iterator.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/LogicalResult.h"#include <algorithm>#include <functional>#include <memory>#include <optional>#include <string>
Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "synth-cut-rewriter" |
Functions | |
| static bool | isAlwaysCutInput (const LogicNetwork &network, uint32_t index) |
| static bool | compareDelayAndArea (OptimizationStrategy strategy, double newArea, ArrayRef< DelayType > newDelay, double oldArea, ArrayRef< DelayType > oldDelay) |
| static llvm::APInt | applyGateSemantics (LogicNetworkGate::Kind kind, const llvm::APInt &a) |
| Simulate a gate and return its truth table. | |
| static llvm::APInt | applyGateSemantics (LogicNetworkGate::Kind kind, const llvm::APInt &a, const llvm::APInt &b) |
| static llvm::APInt | applyGateSemantics (LogicNetworkGate::Kind kind, const llvm::APInt &a, const llvm::APInt &b, const llvm::APInt &c) |
| static llvm::APInt | simulateGate (const LogicNetwork &network, uint32_t index, llvm::DenseMap< uint32_t, llvm::APInt > &cache, unsigned numInputs) |
| Simulate a gate and return its truth table. | |
| static Cut | getAsTrivialCut (uint32_t index, const LogicNetwork &network) |
| static void | removeDuplicateAndNonMinimalCuts (SmallVectorImpl< Cut * > &cuts) |
| static StringRef | getTestVariableName (Value value, DenseMap< OperationName, unsigned > &opCounter) |
| Generate a human-readable name for a value used in test output. | |
| #define DEBUG_TYPE "synth-cut-rewriter" |
Definition at line 56 of file CutRewriter.cpp.
|
inlinestatic |
Simulate a gate and return its truth table.
Definition at line 466 of file CutRewriter.cpp.
References circt::synth::LogicNetworkGate::Identity.
Referenced by simulateGate().
|
inlinestatic |
Definition at line 476 of file CutRewriter.cpp.
References circt::synth::LogicNetworkGate::And2, and circt::synth::LogicNetworkGate::Xor2.
|
inlinestatic |
Definition at line 490 of file CutRewriter.cpp.
References circt::synth::LogicNetworkGate::Maj3.
|
static |
Definition at line 256 of file CutRewriter.cpp.
References circt::synth::OptimizationStrategyArea, circt::synth::OptimizationStrategyTiming, and strategy.
Referenced by circt::synth::CutSet::finalize(), and circt::synth::CutRewriter::patternMatchCut().
|
static |
Definition at line 599 of file CutRewriter.cpp.
References circt::synth::Cut::computeTruthTable(), and circt::synth::Cut::inputs.
Referenced by circt::synth::CutEnumerator::getCutSet(), and circt::synth::CutEnumerator::visitLogicOp().
|
static |
Generate a human-readable name for a value used in test output.
This function creates meaningful names for values to make debug output and test results more readable and understandable.
Definition at line 1079 of file CutRewriter.cpp.
Referenced by circt::synth::CutEnumerator::dump().
|
static |
Definition at line 249 of file CutRewriter.cpp.
References circt::synth::LogicNetwork::getGate(), and circt::synth::LogicNetworkGate::isAlwaysCutInput().
Referenced by circt::synth::Cut::getInputArrivalTimes(), and circt::synth::CutRewriter::runBottomUpRewrite().
|
static |
Definition at line 649 of file CutRewriter.cpp.
References circt::synth::Cut::getInputSize(), and circt::synth::Cut::inputs.
Referenced by circt::synth::CutSet::finalize().
|
static |
Simulate a gate and return its truth table.
Definition at line 504 of file CutRewriter.cpp.
References circt::synth::LogicNetworkGate::And2, applyGateSemantics(), circt::synth::LogicNetworkGate::Constant, circt::synth::LogicNetwork::getGate(), circt::synth::LogicNetwork::getIndex(), circt::synth::LogicNetworkGate::Identity, circt::synth::LogicNetwork::kConstant0, circt::synth::LogicNetworkGate::Maj3, circt::synth::LogicNetworkGate::PrimaryInput, simulateGate(), and circt::synth::LogicNetworkGate::Xor2.
Referenced by circt::synth::Cut::computeTruthTable(), and simulateGate().