Skip to content

Commit 160fd50

Browse files
committed
kernel: remove $barrier from cellaigs and satgen
* this was added earlier in the PR with the intention of making equiv_opt work, but it means barriers are lost through passes like aigmap and can potentially be used in optimization passes so it is better to remove it
1 parent 3247d50 commit 160fd50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kernel/cellaigs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Aig::Aig(Cell *cell)
291291
}
292292
}
293293

294-
if (cell->type.in(ID($not), ID($_NOT_), ID($pos), ID($buf), ID($barrier), ID($_BUF_)))
294+
if (cell->type.in(ID($not), ID($_NOT_), ID($pos), ID($buf), ID($_BUF_)))
295295
{
296296
for (int i = 0; i < GetSize(cell->getPort(ID::Y)); i++) {
297297
int A = mk.inport(ID::A, i);

kernel/satgen.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,15 +430,15 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
430430
return true;
431431
}
432432

433-
if (cell->type.in(ID($pos), ID($buf), ID($barrier), ID($neg)))
433+
if (cell->type.in(ID($pos), ID($buf), ID($neg)))
434434
{
435435
std::vector<int> a = importDefSigSpec(cell->getPort(ID::A), timestep);
436436
std::vector<int> y = importDefSigSpec(cell->getPort(ID::Y), timestep);
437437
extendSignalWidthUnary(a, y, cell);
438438

439439
std::vector<int> yy = model_undef ? ez->vec_var(y.size()) : y;
440440

441-
if (cell->type.in(ID($pos), ID($buf), ID($barrier))) {
441+
if (cell->type.in(ID($pos), ID($buf))) {
442442
ez->assume(ez->vec_eq(a, yy));
443443
} else {
444444
std::vector<int> zero(a.size(), ez->CONST_FALSE);
@@ -451,7 +451,7 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
451451
std::vector<int> undef_y = importUndefSigSpec(cell->getPort(ID::Y), timestep);
452452
extendSignalWidthUnary(undef_a, undef_y, cell);
453453

454-
if (cell->type.in(ID($pos), ID($buf), ID($barrier))) {
454+
if (cell->type.in(ID($pos), ID($buf))) {
455455
ez->assume(ez->vec_eq(undef_a, undef_y));
456456
} else {
457457
int undef_any_a = ez->expression(ezSAT::OpOr, undef_a);

0 commit comments

Comments
 (0)