aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-11-04 14:13:53 +0000
committerDavid Shah <dave@ds0.me>2018-11-04 14:13:53 +0000
commit8df72a1f3454da1d16059f465a6d205b9337dd1a (patch)
tree28515adbc5f400b3c1684d626f027398f4ebfa22 /ice40
parent429db5c7e788c5f97d0e043331ce05bcb1500316 (diff)
downloadnextpnr-8df72a1f3454da1d16059f465a6d205b9337dd1a.tar.gz
nextpnr-8df72a1f3454da1d16059f465a6d205b9337dd1a.tar.bz2
nextpnr-8df72a1f3454da1d16059f465a6d205b9337dd1a.zip
ice40: Fix SPRAM and IO globals
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ice40')
-rw-r--r--ice40/cells.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc
index 76e67ab7..fbb77b0c 100644
--- a/ice40/cells.cc
+++ b/ice40/cells.cc
@@ -383,6 +383,10 @@ bool is_clock_port(const BaseCtx *ctx, const PortRef &port)
port.port == ctx->id("WCLKN");
if (is_sb_mac16(ctx, port.cell) || port.cell->type == ctx->id("ICESTORM_DSP"))
return port.port == ctx->id("CLK");
+ if (is_sb_spram(ctx, port.cell) || port.cell->type == ctx->id("ICESTORM_SPRAM"))
+ return port.port == id_CLOCK;
+ if (is_sb_io(ctx, port.cell))
+ return port.port == id_INPUT_CLK || port.port == id_OUTPUT_CLK;
return false;
}