Skip to content

Commit 5daa49b

Browse files
committed
dft_tag: Fix size extending $x[n]or and $reduce_{or,bool}/$logic_not
1 parent 2002490 commit 5daa49b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

passes/cmds/dft_tag.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ struct DftTagWorker {
405405
auto &sig_y = cell->getPort(ID::Y);
406406
auto sig_a = cell->getPort(ID::A);
407407
auto sig_b = cell->getPort(ID::B);
408-
if (cell->type.in(ID($and), ID($or))) {
408+
if (cell->type.in(ID($and), ID($or), ID($xor), ID($xnor))) {
409409
sig_a.extend_u0(GetSize(sig_y), cell->getParam(ID::A_SIGNED).as_bool());
410410
sig_b.extend_u0(GetSize(sig_y), cell->getParam(ID::B_SIGNED).as_bool());
411411
}
@@ -669,12 +669,12 @@ struct DftTagWorker {
669669
auto &sig_y = cell->getPort(ID::Y);
670670
auto sig_a = cell->getPort(ID::A);
671671

672-
if (cell->type.in(ID($reduce_or), ID($reduce_bool), ID($logic_not)))
673-
sig_a = autoNot(NEW_ID, sig_a);
674-
675672
auto group_sig_a = tag_group_signal(tag, sig_a);
676673
auto tag_sig_a = tag_signal(tag, sig_a);
677674

675+
if (cell->type.in(ID($reduce_or), ID($reduce_bool), ID($logic_not)))
676+
sig_a = autoNot(NEW_ID, sig_a);
677+
678678
auto filled = autoOr(NEW_ID, sig_a, group_sig_a);
679679

680680
auto prop = autoReduceAnd(NEW_ID, filled);

0 commit comments

Comments
 (0)