diff options
Diffstat (limited to 'ice40/arch.h')
-rw-r--r-- | ice40/arch.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ice40/arch.h b/ice40/arch.h index 3aec25a2..5905b115 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -739,6 +739,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(0); + } }; NEXTPNR_NAMESPACE_END |