Skip to content

Commit aa86cd9

Browse files
committed
[Synth] Add LogicNetwork flat IR representation for CutRewriter
Add mockturtle-style flat logic network representation for efficient cut enumeration and truth table computation: - LogicEdge: 32-bit value encoding node index and inversion in LSB - LogicNetworkGate: Gate struct with Kind enum and up to 3 edges - LogicNetwork: Value numbering with indices 0/1 reserved for constants The LogicNetwork is now built during CutEnumerator::enumerateCuts() and provides O(1) gate lookup by index. This is the foundation for converting Cut.inputs from Value pointers to integer indices.
1 parent 4d0819d commit aa86cd9

File tree

11 files changed

+1341
-546
lines changed

11 files changed

+1341
-546
lines changed

include/circt/Dialect/Synth/Transforms/CutRewriter.h

Lines changed: 341 additions & 91 deletions
Large diffs are not rendered by default.

lib/Dialect/Synth/Transforms/AIGERRunner.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,15 @@ LogicalResult AIGERRunner::runSolver(hw::HWModuleOp module, StringRef inputPath,
356356
commandArgs.push_back(processedArg);
357357

358358
// Execute the solver
359+
auto startTime = std::chrono::high_resolution_clock::now();
359360
int executionResult = llvm::sys::ExecuteAndWait(
360361
solverProgram.get(), commandArgs,
361362
/*Env=*/std::nullopt, /*Redirects=*/{},
362363
/*SecondsToWait=*/0, /*MemoryLimit=*/0, &executionError);
364+
auto endTime = std::chrono::high_resolution_clock::now();
365+
std::chrono::duration<double> elapsedSeconds = endTime - startTime;
366+
llvm::dbgs() << "Solver execution time: " << elapsedSeconds.count()
367+
<< " seconds\n";
363368

364369
// Check for execution failure
365370
if (executionResult != 0)

0 commit comments

Comments
 (0)