aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/arch.h')
-rw-r--r--ice40/arch.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ice40/arch.h b/ice40/arch.h
index a4d43cd4..bdd43901 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -740,6 +740,18 @@ struct Arch : BaseCtx
IdString id_cen, id_clk, id_sr;
IdString id_i0, id_i1, id_i2, id_i3;
IdString id_dff_en, id_neg_clk;
+
+ // -------------------------------------------------
+ BelPin getIOBSharingPLLPin(BelId pll, PortPin pll_pin) const
+ {
+ auto wire = getBelPinWire(pll, pll_pin);
+ for (auto src_bel : getWireBelPins(wire)) {
+ if (getBelType(src_bel.bel) == TYPE_SB_IO && src_bel.pin == PIN_D_IN_0) {
+ return src_bel;
+ }
+ }
+ NPNR_ASSERT_FALSE("Expected PLL pin to share an output with an SB_IO D_IN_{0,1}");
+ }
};
NEXTPNR_NAMESPACE_END