summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-10-03 10:12:28 +0200
committerClifford Wolf <clifford@clifford.at>2014-10-03 10:12:28 +0200
commitc3e779a65f285afa123b990f3a717a7ae8e028f5 (patch)
tree5a095488026f2371f1a13556478af7f5e7cd3b6c /kernel
parent600c6cb013b6cf872f3b3f01c7d88df2092e84d9 (diff)
Added $_BUF_ cell type
Diffstat (limited to 'kernel')
-rw-r--r--kernel/celltypes.h3
-rw-r--r--kernel/rtlil.cc1
2 files changed, 4 insertions, 0 deletions
diff --git a/kernel/celltypes.h b/kernel/celltypes.h
index 85c21ef3..2774073d 100644
--- a/kernel/celltypes.h
+++ b/kernel/celltypes.h
@@ -130,6 +130,7 @@ struct CellTypes
void setup_stdcells()
{
+ setup_type("$_BUF_", {"\\A"}, {"\\Y"}, true);
setup_type("$_NOT_", {"\\A"}, {"\\Y"}, true);
setup_type("$_AND_", {"\\A", "\\B"}, {"\\Y"}, true);
setup_type("$_NAND_", {"\\A", "\\B"}, {"\\Y"}, true);
@@ -261,6 +262,8 @@ struct CellTypes
HANDLE_CELL_TYPE(neg)
#undef HANDLE_CELL_TYPE
+ if (type == "$_BUF_")
+ return arg1;
if (type == "$_NOT_")
return eval_not(arg1);
if (type == "$_AND_")
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 00be796f..89132ea2 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -870,6 +870,7 @@ namespace {
return;
}
+ if (cell->type == "$_BUF_") { check_gate("AY"); return; }
if (cell->type == "$_NOT_") { check_gate("AY"); return; }
if (cell->type == "$_AND_") { check_gate("ABY"); return; }
if (cell->type == "$_NAND_") { check_gate("ABY"); return; }