diff options
author | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-02-08 22:12:29 -0800 |
---|---|---|
committer | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-02-08 22:12:29 -0800 |
commit | 0d7e71f7abd49d1c95f0657993b55bb5f66317a1 (patch) | |
tree | b2f77c79c6335d9b2b9dde1938f445c48ba00164 /kernel/satgen.h | |
parent | 0c83a30f950d766ddd09bb744ee93e2433095b5c (diff) | |
parent | ef4a28e112be10d3d62395f68e53e8b7e42dbf68 (diff) | |
download | yosys-0d7e71f7abd49d1c95f0657993b55bb5f66317a1.tar.gz yosys-0d7e71f7abd49d1c95f0657993b55bb5f66317a1.tar.bz2 yosys-0d7e71f7abd49d1c95f0657993b55bb5f66317a1.zip |
Merge https://github.com/cliffordwolf/yosys
Diffstat (limited to 'kernel/satgen.h')
-rw-r--r-- | kernel/satgen.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/kernel/satgen.h b/kernel/satgen.h index 690f8e337..25a22fd8a 100644 --- a/kernel/satgen.h +++ b/kernel/satgen.h @@ -507,11 +507,7 @@ struct SatGen std::vector<int> undef_s = importUndefSigSpec(cell->getPort("\\S"), timestep); std::vector<int> undef_y = importUndefSigSpec(cell->getPort("\\Y"), timestep); - int maybe_one_hot = ez->CONST_FALSE; - int maybe_many_hot = ez->CONST_FALSE; - - int sure_one_hot = ez->CONST_FALSE; - int sure_many_hot = ez->CONST_FALSE; + int maybe_a = ez->CONST_TRUE; std::vector<int> bits_set = std::vector<int>(undef_y.size(), ez->CONST_FALSE); std::vector<int> bits_clr = std::vector<int>(undef_y.size(), ez->CONST_FALSE); @@ -524,18 +520,12 @@ struct SatGen int maybe_s = ez->OR(s.at(i), undef_s.at(i)); int sure_s = ez->AND(s.at(i), ez->NOT(undef_s.at(i))); - maybe_one_hot = ez->OR(maybe_one_hot, maybe_s); - maybe_many_hot = ez->OR(maybe_many_hot, ez->AND(maybe_one_hot, maybe_s)); - - sure_one_hot = ez->OR(sure_one_hot, sure_s); - sure_many_hot = ez->OR(sure_many_hot, ez->AND(sure_one_hot, sure_s)); + maybe_a = ez->AND(maybe_a, ez->NOT(sure_s)); - bits_set = ez->vec_ite(maybe_s, ez->vec_or(bits_set, ez->vec_or(bits_set, ez->vec_or(part_of_b, part_of_undef_b))), bits_set); - bits_clr = ez->vec_ite(maybe_s, ez->vec_or(bits_clr, ez->vec_or(bits_clr, ez->vec_or(ez->vec_not(part_of_b), part_of_undef_b))), bits_clr); + bits_set = ez->vec_ite(maybe_s, ez->vec_or(bits_set, ez->vec_or(part_of_b, part_of_undef_b)), bits_set); + bits_clr = ez->vec_ite(maybe_s, ez->vec_or(bits_clr, ez->vec_or(ez->vec_not(part_of_b), part_of_undef_b)), bits_clr); } - int maybe_a = ez->NOT(maybe_one_hot); - bits_set = ez->vec_ite(maybe_a, ez->vec_or(bits_set, ez->vec_or(bits_set, ez->vec_or(a, undef_a))), bits_set); bits_clr = ez->vec_ite(maybe_a, ez->vec_or(bits_clr, ez->vec_or(bits_clr, ez->vec_or(ez->vec_not(a), undef_a))), bits_clr); |