From 5daa49bafbcb40816e9a56f249568127d275c59d Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Thu, 28 Sep 2023 17:32:19 +0200 Subject: [PATCH] dft_tag: Fix size extending $x[n]or and $reduce_{or,bool}/$logic_not --- passes/cmds/dft_tag.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/passes/cmds/dft_tag.cc b/passes/cmds/dft_tag.cc index 9fd356ef65d..2b2340dab53 100644 --- a/passes/cmds/dft_tag.cc +++ b/passes/cmds/dft_tag.cc @@ -405,7 +405,7 @@ struct DftTagWorker { auto &sig_y = cell->getPort(ID::Y); auto sig_a = cell->getPort(ID::A); auto sig_b = cell->getPort(ID::B); - if (cell->type.in(ID($and), ID($or))) { + if (cell->type.in(ID($and), ID($or), ID($xor), ID($xnor))) { sig_a.extend_u0(GetSize(sig_y), cell->getParam(ID::A_SIGNED).as_bool()); sig_b.extend_u0(GetSize(sig_y), cell->getParam(ID::B_SIGNED).as_bool()); } @@ -669,12 +669,12 @@ struct DftTagWorker { auto &sig_y = cell->getPort(ID::Y); auto sig_a = cell->getPort(ID::A); - if (cell->type.in(ID($reduce_or), ID($reduce_bool), ID($logic_not))) - sig_a = autoNot(NEW_ID, sig_a); - auto group_sig_a = tag_group_signal(tag, sig_a); auto tag_sig_a = tag_signal(tag, sig_a); + if (cell->type.in(ID($reduce_or), ID($reduce_bool), ID($logic_not))) + sig_a = autoNot(NEW_ID, sig_a); + auto filled = autoOr(NEW_ID, sig_a, group_sig_a); auto prop = autoReduceAnd(NEW_ID, filled);