aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/cells.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/cells.cc')
-rw-r--r--ecp5/cells.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/ecp5/cells.cc b/ecp5/cells.cc
index 59504735..22e6a8dc 100644
--- a/ecp5/cells.cc
+++ b/ecp5/cells.cc
@@ -116,6 +116,14 @@ std::unique_ptr<CellInfo> create_ecp5_cell(Context *ctx, IdString type, std::str
add_port(ctx, new_cell.get(), "I", PORT_IN);
add_port(ctx, new_cell.get(), "T", PORT_IN);
add_port(ctx, new_cell.get(), "O", PORT_OUT);
+ } else if (type == ctx->id("LUT4")) {
+ new_cell->params[ctx->id("INIT")] = "0";
+
+ add_port(ctx, new_cell.get(), "A", PORT_IN);
+ add_port(ctx, new_cell.get(), "B", PORT_IN);
+ add_port(ctx, new_cell.get(), "C", PORT_IN);
+ add_port(ctx, new_cell.get(), "D", PORT_IN);
+ add_port(ctx, new_cell.get(), "Z", PORT_OUT);
} else {
log_error("unable to create ECP5 cell of type %s", type.c_str(ctx));
}