dft_tag: Fix size extending $x[n]or and $reduce_{or,bool}/$logic_not

This commit is contained in:
Jannis Harder 2023-09-28 17:32:19 +02:00
parent 20024900d9
commit 5daa49bafb
1 changed files with 4 additions and 4 deletions

View File

@ -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);