aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/satgen.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-02-07 17:44:57 +0100
committerClifford Wolf <clifford@clifford.at>2014-02-07 17:44:57 +0100
commitfc3b3c4ec3955b165166d9f44965fac0e1879505 (patch)
tree2552ece4d6e1709f7ef17d838b00f7f774faf95b /kernel/satgen.h
parenta1ac710ab8740ae781e0274f63633e8ed2650da4 (diff)
downloadyosys-fc3b3c4ec3955b165166d9f44965fac0e1879505.tar.gz
yosys-fc3b3c4ec3955b165166d9f44965fac0e1879505.tar.bz2
yosys-fc3b3c4ec3955b165166d9f44965fac0e1879505.zip
Added $slice and $concat cell types
Diffstat (limited to 'kernel/satgen.h')
-rw-r--r--kernel/satgen.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/satgen.h b/kernel/satgen.h
index 473aa6166..840700cbd 100644
--- a/kernel/satgen.h
+++ b/kernel/satgen.h
@@ -761,6 +761,27 @@ struct SatGen
return true;
}
+ if (cell->type == "$slice")
+ {
+ RTLIL::SigSpec a = cell->connections.at("\\A");
+ RTLIL::SigSpec y = cell->connections.at("\\Y");
+ ez->assume(signals_eq(a.extract(cell->parameters.at("\\OFFSET").as_int(), y.width), y, timestep));
+ return true;
+ }
+
+ if (cell->type == "$concat")
+ {
+ RTLIL::SigSpec a = cell->connections.at("\\A");
+ RTLIL::SigSpec b = cell->connections.at("\\B");
+ RTLIL::SigSpec y = cell->connections.at("\\Y");
+
+ RTLIL::SigSpec ab = a;
+ ab.append(b);
+
+ ez->assume(signals_eq(ab, y, timestep));
+ return true;
+ }
+
if (timestep > 0 && (cell->type == "$dff" || cell->type == "$_DFF_N_" || cell->type == "$_DFF_P_"))
{
if (timestep == 1)