summaryrefslogtreecommitdiff
path: root/kernel/satgen.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-01-22 13:40:26 +0100
committerClifford Wolf <clifford@clifford.at>2015-01-22 13:42:04 +0100
commita6aa32e762d29f050d0b6d49e288514964a5aac5 (patch)
tree57a49aeb765b1d9ec1b34d78b77d43a22645e5fd /kernel/satgen.h
parent0a225f8b273bfd036efa89f660114d4ab9cb190f (diff)
Various equiv_simple improvements
Diffstat (limited to 'kernel/satgen.h')
-rw-r--r--kernel/satgen.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/satgen.h b/kernel/satgen.h
index 2c69663c..c874099b 100644
--- a/kernel/satgen.h
+++ b/kernel/satgen.h
@@ -1163,6 +1163,25 @@ struct SatGen
return true;
}
+ if (cell->type == "$_BUF_" || cell->type == "$equiv")
+ {
+ std::vector<int> a = importDefSigSpec(cell->getPort("\\A"), timestep);
+ std::vector<int> y = importDefSigSpec(cell->getPort("\\Y"), timestep);
+ extendSignalWidthUnary(a, y, cell);
+
+ std::vector<int> yy = model_undef ? ez->vec_var(y.size()) : y;
+ ez->assume(ez->vec_eq(a, yy));
+
+ if (model_undef) {
+ std::vector<int> undef_a = importUndefSigSpec(cell->getPort("\\A"), timestep);
+ std::vector<int> undef_y = importUndefSigSpec(cell->getPort("\\Y"), timestep);
+ extendSignalWidthUnary(undef_a, undef_y, cell, false);
+ ez->assume(ez->vec_eq(undef_a, undef_y));
+ undefGating(y, yy, undef_y);
+ }
+ return true;
+ }
+
if (cell->type == "$assert")
{
std::string pf = prefix + (timestep == -1 ? "" : stringf("@%d:", timestep));