diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-08-06 15:18:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-06 15:18:18 +0200 |
commit | a4b59de5d48a89ba5e1b46eb44877a91ceb6fa44 (patch) | |
tree | e94e14733c13e234d5c5055082d732be26fd6d9b /kernel/satgen.h | |
parent | 44a9dcbbbf47f1a6f524c6328ff775f29573a935 (diff) | |
parent | 023086bd46bc828621ebb171b159efe1398aaecf (diff) | |
download | yosys-a4b59de5d48a89ba5e1b46eb44877a91ceb6fa44.tar.gz yosys-a4b59de5d48a89ba5e1b46eb44877a91ceb6fa44.tar.bz2 yosys-a4b59de5d48a89ba5e1b46eb44877a91ceb6fa44.zip |
Merge pull request #1251 from YosysHQ/clifford/nmux
Add $_NMUX_, add "abc -g cmos", add proper cmos cell costs
Diffstat (limited to 'kernel/satgen.h')
-rw-r--r-- | kernel/satgen.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/satgen.h b/kernel/satgen.h index 210cca3f3..e9f3ecd44 100644 --- a/kernel/satgen.h +++ b/kernel/satgen.h @@ -475,7 +475,7 @@ struct SatGen return true; } - if (cell->type == "$_MUX_" || cell->type == "$mux") + if (cell->type == "$_MUX_" || cell->type == "$mux" || cell->type == "$_NMUX_") { std::vector<int> a = importDefSigSpec(cell->getPort("\\A"), timestep); std::vector<int> b = importDefSigSpec(cell->getPort("\\B"), timestep); @@ -483,7 +483,10 @@ struct SatGen std::vector<int> y = importDefSigSpec(cell->getPort("\\Y"), timestep); std::vector<int> yy = model_undef ? ez->vec_var(y.size()) : y; - ez->assume(ez->vec_eq(ez->vec_ite(s.at(0), b, a), yy)); + if (cell->type == "$_NMUX_") + ez->assume(ez->vec_eq(ez->vec_not(ez->vec_ite(s.at(0), b, a)), yy)); + else + ez->assume(ez->vec_eq(ez->vec_ite(s.at(0), b, a), yy)); if (model_undef) { |