3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Added sat -ignore_div_by_zero switch

This commit is contained in:
Clifford Wolf 2013-08-15 11:40:01 +02:00
parent d0e93e04d1
commit 2f3da54f26
2 changed files with 17 additions and 2 deletions

View file

@ -39,9 +39,10 @@ struct SatGen
SigMap *sigmap;
std::string prefix;
SigPool initial_state;
bool ignore_div_by_zero;
SatGen(ezSAT *ez, RTLIL::Design *design, SigMap *sigmap, std::string prefix = std::string()) :
ez(ez), design(design), sigmap(sigmap), prefix(prefix)
ez(ez), design(design), sigmap(sigmap), prefix(prefix), ignore_div_by_zero(false)
{
}
@ -310,6 +311,10 @@ struct SatGen
else
ez->assume(ez->vec_eq(y, chain_buf));
}
if (ignore_div_by_zero)
ez->assume(ez->expression(ezSAT::OpOr, b));
return true;
}