aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/cells.h
diff options
context:
space:
mode:
authorEddie Hung <e.hung@imperial.ac.uk>2018-07-24 22:20:10 -0700
committerEddie Hung <e.hung@imperial.ac.uk>2018-07-24 22:20:10 -0700
commit9382938661613b84e3ad3155e414aaae2fa87da2 (patch)
tree107c14811cf2e91c82ee4f9ea983260ee7acea8c /ice40/cells.h
parent4920cf18fa1128758dac2ffd12bf88d194863f17 (diff)
parent32c7247785f48b2307e559a0af50d9387bda8b49 (diff)
downloadnextpnr-9382938661613b84e3ad3155e414aaae2fa87da2.tar.gz
nextpnr-9382938661613b84e3ad3155e414aaae2fa87da2.tar.bz2
nextpnr-9382938661613b84e3ad3155e414aaae2fa87da2.zip
Merge branch 'master' into redist_slack
Diffstat (limited to 'ice40/cells.h')
-rw-r--r--ice40/cells.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ice40/cells.h b/ice40/cells.h
index 2f9c77e8..16135448 100644
--- a/ice40/cells.h
+++ b/ice40/cells.h
@@ -71,6 +71,21 @@ inline bool is_sb_spram(const BaseCtx *ctx, const CellInfo *cell) { return cell-
inline bool is_sb_mac16(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_MAC16"); }
+inline bool is_sb_pll40(const BaseCtx *ctx, const CellInfo *cell)
+{
+ return cell->type == ctx->id("SB_PLL40_PAD") || cell->type == ctx->id("SB_PLL40_2_PAD") ||
+ cell->type == ctx->id("SB_PLL40_2F_PAD") || cell->type == ctx->id("SB_PLL40_CORE") ||
+ cell->type == ctx->id("SB_PLL40_2F_CORE");
+}
+
+inline bool is_sb_pll40_pad(const BaseCtx *ctx, const CellInfo *cell)
+{
+ return cell->type == ctx->id("SB_PLL40_PAD") || cell->type == ctx->id("SB_PLL40_2_PAD") ||
+ cell->type == ctx->id("SB_PLL40_2F_PAD");
+}
+
+uint8_t sb_pll40_type(const BaseCtx *ctx, const CellInfo *cell);
+
// 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