From 8df72a1f3454da1d16059f465a6d205b9337dd1a Mon Sep 17 00:00:00 2001 From: David Shah Date: Sun, 4 Nov 2018 14:13:53 +0000 Subject: [PATCH] ice40: Fix SPRAM and IO globals Signed-off-by: David Shah --- ice40/cells.cc | 4 ++++ 1 file changed, 4 insertions(+) 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; }