Skip to content

Commit f8e67c7

Browse files
committed
satgen: Fix $macc_v2 x-prop
1 parent 05cd1e2 commit f8e67c7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

kernel/satgen.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,12 +788,18 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
788788
{
789789
std::vector<int> undef_a = importUndefSigSpec(cell->getPort(ID::A), timestep);
790790
std::vector<int> undef_b = importUndefSigSpec(cell->getPort(ID::B), timestep);
791+
std::vector<int> undef_c;
792+
793+
if (cell->type == ID($macc_v2))
794+
undef_c = importUndefSigSpec(cell->getPort(ID::C), timestep);
791795

792796
int undef_any_a = ez->expression(ezSAT::OpOr, undef_a);
793797
int undef_any_b = ez->expression(ezSAT::OpOr, undef_b);
798+
int undef_any_c = ez->expression(ezSAT::OpOr, undef_c);
799+
int undef_any = ez->OR(undef_any_a, ez->OR(undef_any_b, undef_any_c));
794800

795801
std::vector<int> undef_y = importUndefSigSpec(cell->getPort(ID::Y), timestep);
796-
ez->assume(ez->vec_eq(undef_y, std::vector<int>(GetSize(y), ez->OR(undef_any_a, undef_any_b))));
802+
ez->assume(ez->vec_eq(undef_y, std::vector<int>(GetSize(y), undef_any)));
797803

798804
undefGating(y, tmp, undef_y);
799805
}

0 commit comments

Comments
 (0)