Skip to content

Commit fe62f39

Browse files
[circt-bmc] Apply clang-format
1 parent ab59127 commit fe62f39

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

lib/Conversion/VerifToSMT/VerifToSMT.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,12 @@ struct VerifBoundedModelCheckingOpConversion
438438
// that drives it. We need this mapping so we can correctly route
439439
// We extract this mapping now and then immediately erase the
440440
// verif.clocked_by ops because they are auxiliary metadata operations
441-
// that the downstream SMT dialect converter does not know how to legalize.
441+
// that the downstream SMT dialect converter does not know how to
442+
// legalize.
442443
auto &circuitBlock = circuitFuncOp.getBody().front();
443444
auto *circuitYield = circuitBlock.getTerminator();
444-
for (auto clockedBy :
445-
llvm::make_early_inc_range(circuitBlock.getOps<verif::ClockedByOp>())) {
445+
for (auto clockedBy : llvm::make_early_inc_range(
446+
circuitBlock.getOps<verif::ClockedByOp>())) {
446447
auto nextState = clockedBy.getNextState();
447448
auto clockArg = cast<BlockArgument>(clockedBy.getClock());
448449
unsigned nextStateIdx = 0;
@@ -670,10 +671,11 @@ struct VerifBoundedModelCheckingOpConversion
670671
clockIdx = clockIndexes[0];
671672
auto isPosedge = isPosedgePerClock[clockIdx];
672673
// Create an ITE (If-Then-Else) to calculate the next reg state.
673-
// For multi-clock designs, each register's next-state update is strictly
674-
// gated by the specific `isPosedge` condition of the clock that drives it.
675-
// If a register's specific clock didn't tick in this SMT frame, the ITE
676-
// forces it to hold its previous state.
674+
// For multi-clock designs, each register's next-state update is
675+
// strictly gated by the specific `isPosedge` condition of the
676+
// clock that drives it. If a register's specific clock didn't
677+
// tick in this SMT frame, the ITE forces it to hold its previous
678+
// state.
677679
// TODO: we create a lot of ITEs here that will slow things down
678680
// - these could be avoided by making init/loop regions concrete
679681
nextRegStates.push_back(smt::IteOp::create(

lib/Tools/circt-bmc/ExternalizeRegisters.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ void ExternalizeRegistersPass::runOnOperation() {
178178
builder.getArrayAttr(resultNames), instanceOp.getParametersAttr(),
179179
instanceOp.getInnerSymAttr(), instanceOp.getDoNotPrintAttr());
180180

181-
for (auto [i, clockPortIdx] : llvm::enumerate(childClockPortIndices)) {
181+
for (auto [i, clockPortIdx] :
182+
llvm::enumerate(childClockPortIndices)) {
182183
auto clockVal = newInst.getOperand(clockPortIdx);
183184
auto nextVal = newInst.getResult(instanceOp->getNumResults() + i);
184185
verif::ClockedByOp::create(builder, instanceOp.getLoc(), clockVal,

lib/Tools/circt-bmc/LowerToBMC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ void LowerToBMCPass::runOnOperation() {
158158
// Update clocks each step. Each clock independently decides whether to
159159
// toggle using a symbolic value. Instead of mechanically toggling the
160160
// clock every cycle, XORing it with a `verif.symbolic_value` creates a
161-
// non-deterministic SMT variable. This forces the underlying solver (e.g. Z3)
162-
// to mathematically explore all possible asynchronous interleavings of
161+
// non-deterministic SMT variable. This forces the underlying solver (e.g.
162+
// Z3) to mathematically explore all possible asynchronous interleavings of
163163
// multiple clocks, which is necessary to catch CDC (Clock Domain Crossing)
164164
// violations.
165165
auto *loopBlock = builder.createBlock(&bmcOp.getLoop());

0 commit comments

Comments
 (0)