aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/cells.h
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-22 19:21:39 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-22 19:21:39 +0200
commit8850f86a8ab23de1274f05b1729c106f875f693a (patch)
tree3834d0f2e6cb74d8a7558449de0b8a1f3cf4dabf /ice40/cells.h
parent6a783ef94f31eb47cbf6c14b0e8793638d90dc88 (diff)
downloadnextpnr-8850f86a8ab23de1274f05b1729c106f875f693a.tar.gz
nextpnr-8850f86a8ab23de1274f05b1729c106f875f693a.tar.bz2
nextpnr-8850f86a8ab23de1274f05b1729c106f875f693a.zip
ice40: SB_LFOSC support, fabric routing only
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/cells.h')
-rw-r--r--ice40/cells.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ice40/cells.h b/ice40/cells.h
index b1f3d516..3e5f6ebd 100644
--- a/ice40/cells.h
+++ b/ice40/cells.h
@@ -91,6 +91,16 @@ inline bool is_ram(const Context *ctx, const CellInfo *cell)
cell->type == ctx->id("SB_RAM40_4KNRNW");
}
+inline bool is_sb_lfosc(const Context *ctx, const CellInfo *cell)
+{
+ return cell->type == ctx->id("SB_LFOSC");
+}
+
+inline bool is_sb_hfosc(const Context *ctx, const CellInfo *cell)
+{
+ return cell->type == ctx->id("SB_HFOSC");
+}
+
// Convert a SB_LUT primitive to (part of) an ICESTORM_LC, swapping ports
// as needed. Set no_dff if a DFF is not being used, so that the output
// can be reconnected