aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-07-27 15:41:22 +0200
committerClifford Wolf <clifford@clifford.at>2016-07-27 15:41:22 +0200
commit40563129872f5a2287f54cb0dbd79534b493a5d6 (patch)
tree0ef8462549bafba7356efd94570a19d230b68af9 /kernel
parenta7b07696238dbfd8e4fb5fd41d597200abef4909 (diff)
downloadyosys-40563129872f5a2287f54cb0dbd79534b493a5d6.tar.gz
yosys-40563129872f5a2287f54cb0dbd79534b493a5d6.tar.bz2
yosys-40563129872f5a2287f54cb0dbd79534b493a5d6.zip
Added $anyconst and $aconst
Diffstat (limited to 'kernel')
-rw-r--r--kernel/celltypes.h2
-rw-r--r--kernel/rtlil.cc6
2 files changed, 8 insertions, 0 deletions
diff --git a/kernel/celltypes.h b/kernel/celltypes.h
index 1eea0530c..9eb1523e9 100644
--- a/kernel/celltypes.h
+++ b/kernel/celltypes.h
@@ -118,6 +118,8 @@ struct CellTypes
setup_type("$assume", {A, EN}, pool<RTLIL::IdString>(), true);
setup_type("$predict", {A, EN}, pool<RTLIL::IdString>(), true);
setup_type("$initstate", pool<RTLIL::IdString>(), {Y}, true);
+ setup_type("$anyconst", pool<RTLIL::IdString>(), {Y}, true);
+ setup_type("$aconst", pool<RTLIL::IdString>(), {Y}, true);
setup_type("$equiv", {A, B}, {Y}, true);
}
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 2e5157e85..ad90965fb 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -1030,6 +1030,12 @@ namespace {
return;
}
+ if (cell->type.in("$aconst", "$anyconst")) {
+ port("\\Y", param("\\WIDTH"));
+ check_expected();
+ return;
+ }
+
if (cell->type == "$equiv") {
port("\\A", 1);
port("\\B", 1);