diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-02-26 21:31:34 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-02-26 21:31:34 +0100 |
commit | aaaa604853caaecf8dcbfa928914495efb5556c6 (patch) | |
tree | 770f79edf5f75f865aea1a44796cb3b6b172f7d5 /kernel | |
parent | 6bc94b7eb2ecc7c2836c2fc10029542ce92eae11 (diff) | |
download | yosys-aaaa604853caaecf8dcbfa928914495efb5556c6.tar.gz yosys-aaaa604853caaecf8dcbfa928914495efb5556c6.tar.bz2 yosys-aaaa604853caaecf8dcbfa928914495efb5556c6.zip |
Added support for $bu0 to SatGen
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/satgen.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/satgen.h b/kernel/satgen.h index 539210442..d9bcb4250 100644 --- a/kernel/satgen.h +++ b/kernel/satgen.h @@ -385,7 +385,7 @@ struct SatGen return true; } - if (cell->type == "$pos" || cell->type == "$neg") + if (cell->type == "$pos" || cell->type == "$bu0" || cell->type == "$neg") { std::vector<int> a = importDefSigSpec(cell->connections.at("\\A"), timestep); std::vector<int> y = importDefSigSpec(cell->connections.at("\\Y"), timestep); @@ -393,7 +393,7 @@ struct SatGen std::vector<int> yy = model_undef ? ez->vec_var(y.size()) : y; - if (cell->type == "$pos") { + if (cell->type == "$pos" || cell->type == "$bu0") { ez->assume(ez->vec_eq(a, yy)); } else { std::vector<int> zero(a.size(), ez->FALSE); @@ -404,9 +404,9 @@ struct SatGen { std::vector<int> undef_a = importUndefSigSpec(cell->connections.at("\\A"), timestep); std::vector<int> undef_y = importUndefSigSpec(cell->connections.at("\\Y"), timestep); - extendSignalWidthUnary(undef_a, undef_y, cell, true); + extendSignalWidthUnary(undef_a, undef_y, cell, cell->type != "$bu0"); - if (cell->type == "$pos") { + if (cell->type == "$pos" || cell->type == "$bu0") { ez->assume(ez->vec_eq(undef_a, undef_y)); } else { int undef_any_a = ez->expression(ezSAT::OpOr, undef_a); |