aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/cells.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/cells.cc')
-rw-r--r--ice40/cells.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc
index 52356711..4cc4f29c 100644
--- a/ice40/cells.cc
+++ b/ice40/cells.cc
@@ -196,7 +196,9 @@ bool is_clock_port(const PortRef &port)
return false;
if (is_ff(port.cell))
return port.port == "C";
- if (is_ram(port.cell))
+ if (port.cell->type == "ICESTORM_LC")
+ return port.port == "CLK";
+ if (is_ram(port.cell) || port.cell->type == "ICESTORM_RAM")
return port.port == "RCLK" || port.port == "WCLK";
return false;
}
@@ -207,6 +209,19 @@ bool is_reset_port(const PortRef &port)
return false;
if (is_ff(port.cell))
return port.port == "R" || port.port == "S";
+ if (port.cell->type == "ICESTORM_LC")
+ return port.port == "SR";
+ return false;
+}
+
+bool is_enable_port(const PortRef &port)
+{
+ if (port.cell == nullptr)
+ return false;
+ if (is_ff(port.cell))
+ return port.port == "E";
+ if (port.cell->type == "ICESTORM_LC")
+ return port.port == "CEN";
return false;
}